Separate Dependency Initializations

This commit is contained in:
GreenComfyTea
2023-08-05 11:24:26 +03:00
parent 30672922c4
commit 4bdb4ee2e6
52 changed files with 284 additions and 72 deletions

View File

@@ -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;

View File

@@ -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)