diff --git a/reframework/autorun/MHR_Overlay.lua b/reframework/autorun/MHR_Overlay.lua index 3384d1f..12ef30b 100644 --- a/reframework/autorun/MHR_Overlay.lua +++ b/reframework/autorun/MHR_Overlay.lua @@ -94,15 +94,83 @@ local drawing = require("MHR_Overlay.UI.drawing"); ------------------------INIT MODULES------------------------- -- #region -screen.init_module(); -singletons.init_module(); -utils.init_module(); -time.init_module(); + +screen.init_dependencies(); +singletons.init_dependencies(); +utils.init_dependencies(); +time.init_dependencies(); + +language.init_dependencies(); +config.init_dependencies(); +part_names.init_dependencies(); + +damage_UI_entity.init_dependencies(); +health_UI_entity.init_dependencies(); +stamina_UI_entity.init_dependencies(); +rage_UI_entity.init_dependencies(); +ailment_UI_entity.init_dependencies(); +ailment_buildup_UI_entity.init_dependencies(); +body_part_UI_entity.init_dependencies(); +buff_UI_entity.init_dependencies(); + +buffs.init_dependencies(); +consumables.init_dependencies(); +melody_effects.init_dependencies(); + +damage_hook.init_dependencies(); +players.init_dependencies(); +non_players.init_dependencies(); +quest_status.init_dependencies(); + +env_creature_hook.init_dependencies(); +env_creature.init_dependencies(); + +body_part.init_dependencies(); +ailments.init_dependencies(); +large_monster.init_dependencies(); +monster_hook.init_dependencies(); +small_monster.init_dependencies(); +ailment_hook.init_dependencies(); +ailment_buildup.init_dependencies(); + +label_customization.init_dependencies(); +bar_customization.init_dependencies(); +line_customization.init_dependencies(); +large_monster_UI_customization.init_dependencies(); + +label_customization.init_dependencies(); +bar_customization.init_dependencies(); +health_customization.init_dependencies(); +stamina_customization.init_dependencies(); +rage_customization.init_dependencies(); +body_parts_customization.init_dependencies(); +ailments_customization.init_dependencies(); +ailment_buildups_customization.init_dependencies(); +module_visibility_customization.init_dependencies(); +customization_menu.init_dependencies(); + +drawing.init_dependencies(); + +damage_meter_UI.init_dependencies(); +large_monster_UI.init_dependencies(); +small_monster_UI.init_dependencies(); +time_UI.init_dependencies(); +env_creature_UI.init_dependencies(); +buff_UI.init_dependencies(); + +keyboard.init_dependencies(); + +------------------------------------------------------------ language.init_module(); config.init_module(); part_names.init_module(); +screen.init_module(); +singletons.init_module(); +utils.init_module(); +time.init_module(); + damage_UI_entity.init_module(); health_UI_entity.init_module(); stamina_UI_entity.init_module(); @@ -220,15 +288,8 @@ local function draw_modules(module_visibility_config, flow_state_name) end local function main_loop() - customization_menu.status = "OK"; - singletons.init(); - screen.update_window_size(); - players.update_myself_position(); - quest_status.update_is_online(); - --quest_status.update_is_quest_host(); time.update_timers(); - buffs.update(); if quest_status.flow_state == quest_status.flow_states.IN_TRAINING_AREA then @@ -338,10 +399,4 @@ end); if imgui.begin_table == nil then re.msg(language.current_language.customization_menu.reframework_outdated); -end - ---------------------------Timers----------------------------- -time.new_timer(buffs.update, 0.5); -time.new_timer(players.update_display_list, 0.5, 0.3); -time.new_timer(time.update_quest_time, 1 / 60, 0.6); ---------------------------Timers----------------------------- \ No newline at end of file +end \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Buffs/buffs.lua b/reframework/autorun/MHR_Overlay/Buffs/buffs.lua index 432d4c4..a6e13da 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/buffs.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/buffs.lua @@ -165,7 +165,7 @@ function this.update_timer(buff, timer) end end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity"); singletons = require("MHR_Overlay.Game_Handler.singletons"); @@ -178,4 +178,8 @@ function this.init_module() quest_status = require("MHR_Overlay.Game_Handler.quest_status"); end +function this.init_module() + time.new_timer(this.update, 0.5); +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Buffs/consumables.lua b/reframework/autorun/MHR_Overlay/Buffs/consumables.lua index f7def9e..212c152 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/consumables.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/consumables.lua @@ -400,7 +400,7 @@ function this.init_names() end end -function this.init_module() +function this.init_dependencies() buffs = require("MHR_Overlay.Buffs.buffs"); config = require("MHR_Overlay.Misc.config"); utils = require("MHR_Overlay.Misc.utils"); @@ -410,4 +410,7 @@ function this.init_module() language = require("MHR_Overlay.Misc.language"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua b/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua index 59f63ac..1053234 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua @@ -145,7 +145,7 @@ function this.init_names() end end -function this.init_module() +function this.init_dependencies() buffs = require("MHR_Overlay.Buffs.buffs"); config = require("MHR_Overlay.Misc.config"); utils = require("MHR_Overlay.Misc.utils"); @@ -155,4 +155,7 @@ function this.init_module() language = require("MHR_Overlay.Misc.language"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua index 1e38f04..602e6af 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/damage_hook.lua @@ -374,7 +374,7 @@ function this.on_anomaly_core_break(anomaly_core_part) players.update_damage(players.total, players.damage_types.anomaly_core, true, damage_object); end -function this.init_module() +function this.init_dependencies() quest_status = require("MHR_Overlay.Game_Handler.quest_status"); players = require("MHR_Overlay.Damage_Meter.players"); small_monster = require("MHR_Overlay.Monsters.small_monster"); @@ -383,6 +383,9 @@ function this.init_module() singletons = require("MHR_Overlay.Game_Handler.singletons"); non_players = require("MHR_Overlay.Damage_Meter.non_players"); utils = require("MHR_Overlay.Misc.utils"); +end + +function this.init_module() sdk.hook(stock_direct_marionette_finish_shoot_hit_parts_damage_method, function(args) local enemy = sdk.to_managed_object(args[2]); diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua index 000e76b..2484aca 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua @@ -377,7 +377,7 @@ function this.init_UI(non_player) end end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -387,7 +387,9 @@ function this.init_module() drawing = require("MHR_Overlay.UI.drawing"); language = require("MHR_Overlay.Misc.language"); players = require("MHR_Overlay.Damage_Meter.players"); +end +function this.init_module() this.init(); end diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua index 7583ca6..603cf1b 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/players.lua @@ -636,7 +636,7 @@ function this.draw(player, position_on_screen, opacity_scale, top_damage, top_dp damage_UI_entity.draw(player, position_on_screen, opacity_scale, top_damage, top_dps); end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -648,7 +648,12 @@ function this.init_module() non_players = require("MHR_Overlay.Damage_Meter.non_players"); utils = require("MHR_Overlay.Misc.utils"); +end + +function this.init_module() this.init(); + time.new_timer(this.update_display_list, 0.5); + time.new_timer(this.update_myself_position, 1); end return this; diff --git a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua index ff74c46..8dfb75a 100644 --- a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua +++ b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature.lua @@ -143,7 +143,7 @@ function this.init_list() this.list = {}; end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); config = require("MHR_Overlay.Misc.config"); @@ -156,4 +156,7 @@ function this.init_module() --ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua index b471e89..a448a72 100644 --- a/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua +++ b/reframework/autorun/MHR_Overlay/Endemic_Life/env_creature_hook.lua @@ -45,11 +45,13 @@ function this.update(REcreature) env_creature.update_position(REcreature, creature); end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); time = require("MHR_Overlay.Game_Handler.time"); +end +function this.init_module() sdk.hook(update_method, function(args) pcall(this.update, sdk.to_managed_object(args[2])); end, function(retval) diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/keyboard.lua b/reframework/autorun/MHR_Overlay/Game_Handler/keyboard.lua index b8e1061..4e80e87 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/keyboard.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/keyboard.lua @@ -604,7 +604,7 @@ function this.get_hotkey_name(hotkey) return hotkey_name .. tostring(this.keys[hotkey.key]); end -function this.init_module() +function this.init_dependencies() config = require "MHR_Overlay.Misc.config" singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -615,4 +615,7 @@ function this.init_module() time = require("MHR_Overlay.Game_Handler.time"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua b/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua index 8f784a9..4be7d18 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/quest_status.lua @@ -370,7 +370,7 @@ function this.update_is_training_area() end end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); players = require("MHR_Overlay.Damage_Meter.players"); @@ -380,9 +380,13 @@ function this.init_module() time = require("MHR_Overlay.Game_Handler.time"); env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); non_players = require("MHR_Overlay.Damage_Meter.non_players"); +end +function this.init_module() this.init(); + time.new_timer(this.update_is_online, 1); + sdk.hook(on_changed_game_status_method, function(args) this.on_changed_game_status(sdk.to_int64(args[3])); end, function(retval) return retval; end); diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/screen.lua b/reframework/autorun/MHR_Overlay/Game_Handler/screen.lua index 61d8531..75f1d03 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/screen.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/screen.lua @@ -2,6 +2,8 @@ local this = {}; local config; local singletons; +local utils; +local time; local sdk = sdk; local tostring = tostring; @@ -131,9 +133,15 @@ function this.calculate_absolute_coordinates(position) return { x = _position.x, y = _position.y }; end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); singletons = require("MHR_Overlay.Game_Handler.singletons"); + time = require("MHR_Overlay.Game_Handler.time"); + utils = require("MHR_Overlay.Misc.utils"); +end + +function this.init_module() + time.new_timer(this.update_window_size, 1); end return this; diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/singletons.lua b/reframework/autorun/MHR_Overlay/Game_Handler/singletons.lua index 2ee5e76..b68c458 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/singletons.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/singletons.lua @@ -1,5 +1,8 @@ local this = {}; +local time; +local utils; + local sdk = sdk; local tostring = tostring; local pairs = pairs; @@ -231,8 +234,13 @@ function this.init_otomo_manager() return this.otomo_manager; end +function this.init_dependencies() + time = require("MHR_Overlay.Game_Handler.time"); + utils = require("MHR_Overlay.Misc.utils"); +end + function this.init_module() - this.init(); + time.new_timer(this.init, 1); end return this; diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/time.lua b/reframework/autorun/MHR_Overlay/Game_Handler/time.lua index b021cd1..134b4d9 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/time.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/time.lua @@ -55,7 +55,7 @@ this.last_elapsed_script_seconds = 0; this.list = {}; function this.new_timer(callback, cooldown_seconds, start_offset_seconds) - start_offset_seconds = start_offset_seconds or 0; + start_offset_seconds = start_offset_seconds or utils.math.random(); if callback == nil or cooldown_seconds == nil then return; @@ -114,7 +114,7 @@ function this.update_quest_time() this.elapsed_seconds = quest_time_total_elapsed_seconds - quest_time_elapsed_minutes * 60; end -function this.init_module() +function this.init_dependencies() players = require("MHR_Overlay.Damage_Meter.players"); singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -125,4 +125,8 @@ function this.init_module() utils = require("MHR_Overlay.Misc.utils"); end +function this.init_module() + this.new_timer(this.update_quest_time, 1 / 60); +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Misc/config.lua b/reframework/autorun/MHR_Overlay/Misc/config.lua index c983b1f..ae953f4 100644 --- a/reframework/autorun/MHR_Overlay/Misc/config.lua +++ b/reframework/autorun/MHR_Overlay/Misc/config.lua @@ -7716,10 +7716,12 @@ function this.update(index) this.save_current_config_name(); end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); +end +function this.init_module() this.init_default(); this.load_current_config_value(); this.load_configs(); diff --git a/reframework/autorun/MHR_Overlay/Misc/language.lua b/reframework/autorun/MHR_Overlay/Misc/language.lua index 7a20ddf..78bc4db 100644 --- a/reframework/autorun/MHR_Overlay/Misc/language.lua +++ b/reframework/autorun/MHR_Overlay/Misc/language.lua @@ -659,9 +659,11 @@ function this.update(index) this.current_language = this.languages[index]; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); - +end + +function this.init_module() this.save_default(); this.load(); this.current_language = this.default_language; diff --git a/reframework/autorun/MHR_Overlay/Misc/part_names.lua b/reframework/autorun/MHR_Overlay/Misc/part_names.lua index ae9a358..7b9d644 100644 --- a/reframework/autorun/MHR_Overlay/Misc/part_names.lua +++ b/reframework/autorun/MHR_Overlay/Misc/part_names.lua @@ -954,9 +954,11 @@ function this.get_part_name(monster_id, part_id) return part_name; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); +end +function this.init_module() this.init(); end diff --git a/reframework/autorun/MHR_Overlay/Misc/utils.lua b/reframework/autorun/MHR_Overlay/Misc/utils.lua index 119b94c..1b0e587 100644 --- a/reframework/autorun/MHR_Overlay/Misc/utils.lua +++ b/reframework/autorun/MHR_Overlay/Misc/utils.lua @@ -413,6 +413,9 @@ function this.unicode.sub(str, i, j) return string.sub(str, i, b + c - 1); end +function this.init_dependencies() +end + function this.init_module() end diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua index 7735472..c64ddbc 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_buildup.lua @@ -227,11 +227,9 @@ function this.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_ ::continue:: end - - end -function this.init_module() +function this.init_dependencies() players = require("MHR_Overlay.Damage_Meter.players"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -243,4 +241,7 @@ function this.init_module() drawing = require("MHR_Overlay.UI.drawing"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua index 1177eea..5ce2063 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailment_hook.lua @@ -144,12 +144,14 @@ function this.stock_damage() end end -function this.init_module() +function this.init_dependencies() small_monster = require("MHR_Overlay.Monsters.small_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster"); config = require("MHR_Overlay.Misc.config"); ailments = require("MHR_Overlay.Monsters.ailments"); +end +function this.init_module() sdk.hook(stock_damage_method, function(args) pcall(this.stock_damage, sdk.to_managed_object(args[2])); end, function(retval) diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua index 5299aba..4496a41 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua @@ -814,7 +814,7 @@ function this.apply_ailment_damage(monster, ailment_type, ailment_damage) players.update_damage(players.total, damage_source_type, monster.is_large, damage_object); end -function this.init_module() +function this.init_dependencies() players = require("MHR_Overlay.Damage_Meter.players"); non_players = require("MHR_Overlay.Damage_Meter.non_players"); language = require("MHR_Overlay.Misc.language"); @@ -826,4 +826,7 @@ function this.init_module() large_monster = require("MHR_Overlay.Monsters.large_monster"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Monsters/body_part.lua b/reframework/autorun/MHR_Overlay/Monsters/body_part.lua index 0359f82..28a32f4 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/body_part.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/body_part.lua @@ -462,7 +462,7 @@ function this.draw(monster, part_UI, cached_config, parts_position_on_screen, op return last_part_position_on_screen; end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); config = require("MHR_Overlay.Misc.config"); @@ -477,4 +477,7 @@ function this.init_module() utils = require("MHR_Overlay.Misc.utils"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua index 0a797e3..7f4d7f5 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua @@ -1033,7 +1033,7 @@ function this.init_list() this.list = {}; end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); language = require("MHR_Overlay.Misc.language"); @@ -1056,4 +1056,7 @@ function this.init_module() ailment_buildup = require("MHR_Overlay.Monsters.ailment_buildup"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua b/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua index f357e3d..ec798f9 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/monster_hook.lua @@ -255,14 +255,16 @@ function this.update_rage_timer(anger_param, enemy) large_monster.update_rage_timer(enemy, monster, anger_param); end -function this.init_module() +function this.init_dependencies() small_monster = require("MHR_Overlay.Monsters.small_monster"); large_monster = require("MHR_Overlay.Monsters.large_monster"); config = require("MHR_Overlay.Misc.config"); ailments = require("MHR_Overlay.Monsters.ailments"); players = require("MHR_Overlay.Damage_Meter.players"); quest_status = require("MHR_Overlay.Game_Handler.quest_status"); +end +function this.init_module() sdk.hook(enemy_character_base_update_method, function(args) pcall(this.update_monster, sdk.to_managed_object(args[2])); end, function(retval) diff --git a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua index b53efb2..e5384a6 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/small_monster.lua @@ -249,7 +249,7 @@ function this.init_list() this.list = {}; end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); customization_menu = require("MHR_Overlay.UI.customization_menu"); config = require("MHR_Overlay.Misc.config"); @@ -264,4 +264,7 @@ function this.init_module() ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua index 9634fb3..2d0cefe 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/ailment_buildups_customization.lua @@ -255,7 +255,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -273,4 +273,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/ailments_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/ailments_customization.lua index 64d256d..788f0a7 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/ailments_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/ailments_customization.lua @@ -386,7 +386,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -403,4 +403,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/bar_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/bar_customization.lua index 065df65..a4a4e48 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/bar_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/bar_customization.lua @@ -243,7 +243,7 @@ function this.draw(bar_name, bar) return bar_changed; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -259,4 +259,7 @@ function this.init_module() line_customization = require("MHR_Overlay.UI.Customizations.line_customization"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/body_parts_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/body_parts_customization.lua index 8667985..566a233 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/body_parts_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/body_parts_customization.lua @@ -511,7 +511,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -528,4 +528,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/health_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/health_customization.lua index 6efe13d..b4a3e98 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/health_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/health_customization.lua @@ -88,7 +88,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -104,4 +104,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/label_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/label_customization.lua index 800b3dc..26c6d52 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/label_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/label_customization.lua @@ -122,7 +122,7 @@ function this.draw(label_name, label) return label_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -136,4 +136,7 @@ function this.init_module() customization_menu = require("MHR_Overlay.UI.customization_menu"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/large_monster_UI_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/large_monster_UI_customization.lua index 150da47..dda5772 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/large_monster_UI_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/large_monster_UI_customization.lua @@ -81,7 +81,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -104,4 +104,7 @@ function this.init_module() ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/line_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/line_customization.lua index cc7aebb..b3fd159 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/line_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/line_customization.lua @@ -95,7 +95,7 @@ function this.draw(line_name, line) return line_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -109,4 +109,7 @@ function this.init_module() customization_menu = require("MHR_Overlay.UI.customization_menu"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/module_visibility_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/module_visibility_customization.lua index ff57448..2c2e818 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/module_visibility_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/module_visibility_customization.lua @@ -101,7 +101,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -115,4 +115,7 @@ function this.init_module() customization_menu = require("MHR_Overlay.UI.customization_menu"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/rage_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/rage_customization.lua index 03f490c..0243761 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/rage_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/rage_customization.lua @@ -91,7 +91,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -107,4 +107,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Customizations/stamina_customization.lua b/reframework/autorun/MHR_Overlay/UI/Customizations/stamina_customization.lua index 1b08d09..467fd98 100644 --- a/reframework/autorun/MHR_Overlay/UI/Customizations/stamina_customization.lua +++ b/reframework/autorun/MHR_Overlay/UI/Customizations/stamina_customization.lua @@ -91,7 +91,7 @@ function this.draw(cached_config) return config_changed; end -function this.init_module() +function this.init_dependencies() language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); screen = require("MHR_Overlay.Game_Handler.screen"); @@ -107,4 +107,7 @@ function this.init_module() bar_customization = require("MHR_Overlay.UI.Customizations.bar_customization"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua index 0a6b415..03db777 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua @@ -122,7 +122,7 @@ function this.draw() end end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity"); consumables = require("MHR_Overlay.Buffs.consumables"); @@ -139,4 +139,7 @@ function this.init_module() utils = require("MHR_Overlay.Misc.utils"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/damage_meter_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/damage_meter_UI.lua index c96c78b..c9ef634 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/damage_meter_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/damage_meter_UI.lua @@ -175,7 +175,7 @@ function this.draw() end end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); config = require("MHR_Overlay.Misc.config"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -188,4 +188,7 @@ function this.init_module() utils = require("MHR_Overlay.Misc.utils"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/env_creature_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/env_creature_UI.lua index edfafb7..edd2e44 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/env_creature_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/env_creature_UI.lua @@ -94,7 +94,7 @@ function this.draw() end end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); config = require("MHR_Overlay.Misc.config"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -108,4 +108,7 @@ function this.init_module() env_creature = require("MHR_Overlay.Endemic_Life.env_creature"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua index 9ecc781..dd2fe82 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/large_monster_UI.lua @@ -328,7 +328,7 @@ function this.draw_highlighted(monster, cached_config) large_monster.draw(monster, "highlighted", cached_config, position_on_screen, 1); end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); config = require("MHR_Overlay.Misc.config"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -341,4 +341,7 @@ function this.init_module() rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua index c78beb1..14da957 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/small_monster_UI.lua @@ -186,7 +186,7 @@ function this.draw() end end -function this.init_module() +function this.init_dependencies() singletons = require("MHR_Overlay.Game_Handler.singletons"); config = require("MHR_Overlay.Misc.config"); customization_menu = require("MHR_Overlay.UI.customization_menu"); @@ -198,4 +198,7 @@ function this.init_module() stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/time_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/time_UI.lua index 12ca62b..00d828e 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/time_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/time_UI.lua @@ -62,13 +62,15 @@ function this.init_UI() this.label.offset.y = this.label.offset.y * global_scale_modifier; end -function this.init_module() +function this.init_dependencies() time = require("MHR_Overlay.Game_Handler.time"); screen = require("MHR_Overlay.Game_Handler.screen"); config = require("MHR_Overlay.Misc.config"); drawing = require("MHR_Overlay.UI.drawing"); utils = require("MHR_Overlay.Misc.utils"); +end +function this.init_module() this.init_UI() end diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua index 3192f2a..9876be1 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_UI_entity.lua @@ -118,11 +118,14 @@ function this.draw(ailment, ailment_UI, cached_config, position_on_screen, opaci end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); config = require("MHR_Overlay.Misc.config"); language = require("MHR_Overlay.Misc.language"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua index 704a623..5159e8d 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/ailment_buildup_UI_entity.lua @@ -117,7 +117,7 @@ function this.draw(player, player_buildup, ailment_buildup_UI, cached_config, po drawing.draw_label(ailment_buildup_UI.buildup_percentage_label, position_on_screen, opacity_scale, 100 * player_buildup.buildup_share); end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); config = require("MHR_Overlay.Misc.config"); @@ -125,4 +125,7 @@ function this.init_module() language = require("MHR_Overlay.Misc.language"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua index dc50140..91510db 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/body_part_UI_entity.lua @@ -302,10 +302,13 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); config = require("MHR_Overlay.Misc.config"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/buff_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/buff_UI_entity.lua index 42d9d2f..441cad5 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/buff_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/buff_UI_entity.lua @@ -81,11 +81,14 @@ function this.draw(buff, buff_UI, position_on_screen, opacity_scale) end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); config = require("MHR_Overlay.Misc.config"); language = require("MHR_Overlay.Misc.language"); end +function this.init_module() +end + return this; \ No newline at end of file diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua index 1948155..41a0e7b 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/damage_UI_entity.lua @@ -233,7 +233,7 @@ function this.draw(player, position_on_screen, opacity_scale, top_damage, top_dp end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); config = require("MHR_Overlay.Misc.config"); @@ -243,4 +243,7 @@ function this.init_module() non_players = require("MHR_Overlay.Damage_Meter.non_players"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua index 5cac172..cacc06b 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/health_UI_entity.lua @@ -91,11 +91,14 @@ function this.draw(monster, health_UI, position_on_screen, opacity_scale) drawing.draw_label(health_UI.percentage_label, position_on_screen, opacity_scale, 100 * monster.health_percentage); end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua index 9866c19..f5bc101 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/rage_UI_entity.lua @@ -105,11 +105,14 @@ function this.draw(monster, rage_UI, position_on_screen, opacity_scale) end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua b/reframework/autorun/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua index f030313..29942bd 100644 --- a/reframework/autorun/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua +++ b/reframework/autorun/MHR_Overlay/UI/UI_Entities/stamina_UI_entity.lua @@ -102,11 +102,14 @@ function this.draw(monster, stamina_UI, position_on_screen, opacity_scale) end end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); drawing = require("MHR_Overlay.UI.drawing"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); end +function this.init_module() +end + return this; diff --git a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua index 7ae7918..e37ec1c 100644 --- a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua +++ b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua @@ -2264,7 +2264,7 @@ function this.draw_buff_UI() return config_changed; end -function this.init_module() +function this.init_dependencies() utils = require("MHR_Overlay.Misc.utils"); language = require("MHR_Overlay.Misc.language"); config = require("MHR_Overlay.Misc.config"); @@ -2291,7 +2291,9 @@ function this.init_module() ailments_customization = require("MHR_Overlay.UI.Customizations.ailments_customization"); ailment_buildups_customization = require("MHR_Overlay.UI.Customizations.ailment_buildups_customization"); module_visibility_customization = require("MHR_Overlay.UI.Customizations.module_visibility_customization"); +end +function this.init_module() this.init(); this.reload_font(); end diff --git a/reframework/autorun/MHR_Overlay/UI/drawing.lua b/reframework/autorun/MHR_Overlay/UI/drawing.lua index 3af5d14..3658b48 100644 --- a/reframework/autorun/MHR_Overlay/UI/drawing.lua +++ b/reframework/autorun/MHR_Overlay/UI/drawing.lua @@ -376,9 +376,12 @@ function this.draw_capture_line(health_UI, position, opacity_scale, percentage) end end -function this.init_module() +function this.init_dependencies() config = require("MHR_Overlay.Misc.config"); utils = require("MHR_Overlay.Misc.utils"); end +function this.init_module() +end + return this;