Cache all global variables

This commit is contained in:
GreenComfyTea
2023-02-06 16:31:59 +02:00
parent 9252beba11
commit 60bcd5770d
48 changed files with 1428 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
local damage_meter_UI = {};
local singletons;
local config;
local customization_menu;
@@ -10,6 +11,35 @@ local drawing;
local language;
local table_helpers;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
damage_meter_UI.last_displayed_players = {};
damage_meter_UI.freeze_displayed_players = false;

View File

@@ -1,4 +1,5 @@
local env_creature_UI = {};
local singletons;
local config;
local customization_menu;
@@ -12,6 +13,35 @@ local stamina_UI_entity;
local rage_UI_entity;
local env_creature;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
function env_creature_UI.draw()

View File

@@ -1,4 +1,5 @@
local large_monster_UI = {};
local singletons;
local config;
local customization_menu;
@@ -11,6 +12,35 @@ local health_UI_entity;
local stamina_UI_entity;
local rage_UI_entity;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
local get_boss_enemy_count_method = enemy_manager_type_def:get_method("getBossEnemyCount");
local get_boss_enemy_method = enemy_manager_type_def:get_method("getBossEnemy");
@@ -171,8 +201,7 @@ function large_monster_UI.draw_dynamic(displayed_monsters, highlighted_monster,
local position_on_screen = {};
local world_offset = Vector3f.new(cached_config.world_offset.x, cached_config.world_offset.y,
cached_config.world_offset.z);
local world_offset = Vector3f.new(cached_config.world_offset.x, cached_config.world_offset.y, cached_config.world_offset.z);
position_on_screen = draw.world_to_screen(monster.position + world_offset);

View File

@@ -1,4 +1,5 @@
local small_monster_UI = {};
local singletons;
local config;
local small_monster;
@@ -10,6 +11,35 @@ local table_helpers;
local health_UI_entity;
local stamina_UI_entity;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
local enemy_manager_type_def = sdk.find_type_definition("snow.enemy.EnemyManager");
local get_zako_enemy_count_method = enemy_manager_type_def:get_method("getZakoEnemyCount");
local get_zako_enemy_method = enemy_manager_type_def:get_method("getZakoEnemy");

View File

@@ -1,10 +1,40 @@
local time_UI = {};
local time;
local screen;
local config;
local drawing;
local table_helpers;
local sdk = sdk;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tonumber = tonumber;
local require = require;
local pcall = pcall;
local table = table;
local string = string;
local Vector3f = Vector3f;
local d2d = d2d;
local math = math;
local json = json;
local log = log;
local fs = fs;
local next = next;
local type = type;
local setmetatable = setmetatable;
local getmetatable = getmetatable;
local assert = assert;
local select = select;
local coroutine = coroutine;
local utf8 = utf8;
local re = re;
local imgui = imgui;
local draw = draw;
local Vector2f = Vector2f;
local reframework = reframework;
time_UI.label = nil;
function time_UI.draw()