VMF Mod Manager: little style changes
This commit is contained in:
parent
c3579d4e68
commit
1ee5beaa76
1 changed files with 23 additions and 23 deletions
|
@ -1,11 +1,11 @@
|
||||||
local vmf = nil
|
local vmf = nil
|
||||||
|
|
||||||
local _MODS = {}
|
local _mods = {}
|
||||||
local _MODS_UNLOADING_ORDER = {}
|
local _mods_unloading_order = {}
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### Local functions ##############################################################################################
|
-- ##### Local functions ###############################################################################################
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
||||||
-- WORKING WITH XPCALL
|
-- WORKING WITH XPCALL
|
||||||
|
|
||||||
|
@ -27,16 +27,16 @@ end
|
||||||
|
|
||||||
local function create_mod(mod_name)
|
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 " ..
|
vmf:error("(new_mod): you can't use name \"%s\" for your mod, because " ..
|
||||||
"the mod with the same name already exists.", mod_name)
|
"the mod with the same name already exists.", mod_name)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(_MODS_UNLOADING_ORDER, 1, mod_name)
|
table.insert(_mods_unloading_order, 1, mod_name)
|
||||||
|
|
||||||
local mod = VMFMod:new()
|
local mod = VMFMod:new()
|
||||||
_MODS[mod_name] = mod
|
_mods[mod_name] = mod
|
||||||
|
|
||||||
mod._data = {}
|
mod._data = {}
|
||||||
mod._data.name = mod_name
|
mod._data.name = mod_name
|
||||||
|
@ -48,9 +48,9 @@ local function create_mod(mod_name)
|
||||||
return mod
|
return mod
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### Public functions #############################################################################################
|
-- ##### Public functions ##############################################################################################
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
||||||
function new_mod(mod_name, mod_resources)
|
function new_mod(mod_name, mod_resources)
|
||||||
|
|
||||||
|
@ -117,12 +117,12 @@ end
|
||||||
|
|
||||||
|
|
||||||
function get_mod(mod_name)
|
function get_mod(mod_name)
|
||||||
return _MODS[mod_name]
|
return _mods[mod_name]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### VMFMod #######################################################################################################
|
-- ##### VMFMod ########################################################################################################
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
||||||
VMFMod = class(VMFMod)
|
VMFMod = class(VMFMod)
|
||||||
|
|
||||||
|
@ -168,15 +168,15 @@ function VMFMod:dofile(file_path)
|
||||||
return unpack(return_values, 1, return_values.n)
|
return unpack(return_values, 1, return_values.n)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### VMF Initialization ###########################################################################################
|
-- ##### VMF Initialization ############################################################################################
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
||||||
vmf = create_mod("VMF")
|
vmf = create_mod("VMF")
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### VMF internal functions and variables #########################################################################
|
-- ##### VMF internal functions and variables ##########################################################################
|
||||||
-- ####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
|
||||||
-- XPCALL
|
-- XPCALL
|
||||||
|
|
||||||
|
@ -264,5 +264,5 @@ end
|
||||||
|
|
||||||
-- VARIABLES
|
-- VARIABLES
|
||||||
|
|
||||||
vmf.mods = _MODS
|
vmf.mods = _mods
|
||||||
vmf.mods_unloading_order = _MODS_UNLOADING_ORDER
|
vmf.mods_unloading_order = _mods_unloading_order
|
Loading…
Add table
Reference in a new issue