Optimize small monster UI drawing function

This commit is contained in:
GreenComfyTea
2023-08-08 13:04:40 +03:00
parent e1d3754733
commit e09c82278d
10 changed files with 49 additions and 73 deletions

View File

@@ -247,12 +247,9 @@ local function draw_modules(module_visibility_config, flow_state_name)
local large_monster_UI_config = config.current_config.large_monster_UI;
local dynamic_enabled = large_monster_UI_config.dynamic.enabled and
module_visibility_config.large_monster_dynamic_UI;
local static_enabled = large_monster_UI_config.static.enabled and
module_visibility_config.large_monster_static_UI;
local highlighted_enabled = large_monster_UI_config.highlighted.enabled and
module_visibility_config.large_monster_highlighted_UI;
local dynamic_enabled = large_monster_UI_config.dynamic.enabled and module_visibility_config.large_monster_dynamic_UI;
local static_enabled = large_monster_UI_config.static.enabled and module_visibility_config.large_monster_static_UI;
local highlighted_enabled = large_monster_UI_config.highlighted.enabled and module_visibility_config.large_monster_highlighted_UI;
if dynamic_enabled or static_enabled or highlighted_enabled then
local success = pcall(large_monster_UI.draw, dynamic_enabled, static_enabled, highlighted_enabled);