diff --git a/vmf/scripts/mods/vmf/modules/vmf_mod_manager.lua b/vmf/scripts/mods/vmf/modules/vmf_mod_manager.lua index 4a08ef6..be368fc 100644 --- a/vmf/scripts/mods/vmf/modules/vmf_mod_manager.lua +++ b/vmf/scripts/mods/vmf/modules/vmf_mod_manager.lua @@ -1,11 +1,11 @@ local vmf = nil -local _MODS = {} -local _MODS_UNLOADING_ORDER = {} +local _mods = {} +local _mods_unloading_order = {} --- #################################################################################################################### --- ##### Local functions ############################################################################################## --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### Local functions ############################################################################################### +-- ##################################################################################################################### -- WORKING WITH XPCALL @@ -27,16 +27,16 @@ end local function create_mod(mod_name) - if _MODS[mod_name] then + if _mods[mod_name] then vmf:error("(new_mod): you can't use name \"%s\" for your mod, because " .. "the mod with the same name already exists.", mod_name) return end - table.insert(_MODS_UNLOADING_ORDER, 1, mod_name) + table.insert(_mods_unloading_order, 1, mod_name) local mod = VMFMod:new() - _MODS[mod_name] = mod + _mods[mod_name] = mod mod._data = {} mod._data.name = mod_name @@ -48,9 +48,9 @@ local function create_mod(mod_name) return mod end --- #################################################################################################################### --- ##### Public functions ############################################################################################# --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### Public functions ############################################################################################## +-- ##################################################################################################################### function new_mod(mod_name, mod_resources) @@ -117,12 +117,12 @@ end function get_mod(mod_name) - return _MODS[mod_name] + return _mods[mod_name] end --- #################################################################################################################### --- ##### VMFMod ####################################################################################################### --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### VMFMod ######################################################################################################## +-- ##################################################################################################################### VMFMod = class(VMFMod) @@ -168,15 +168,15 @@ function VMFMod:dofile(file_path) return unpack(return_values, 1, return_values.n) end --- #################################################################################################################### --- ##### VMF Initialization ########################################################################################### --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### VMF Initialization ############################################################################################ +-- ##################################################################################################################### vmf = create_mod("VMF") --- #################################################################################################################### --- ##### VMF internal functions and variables ######################################################################### --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### VMF internal functions and variables ########################################################################## +-- ##################################################################################################################### -- XPCALL @@ -264,5 +264,5 @@ end -- VARIABLES -vmf.mods = _MODS -vmf.mods_unloading_order = _MODS_UNLOADING_ORDER \ No newline at end of file +vmf.mods = _mods +vmf.mods_unloading_order = _mods_unloading_order \ No newline at end of file