Move global core variables to mcl_init
This commit is contained in:
parent
f652d5ecb5
commit
91950ee026
19 changed files with 44 additions and 34 deletions
1
mods/CORE/mcl_init/description.txt
Normal file
1
mods/CORE/mcl_init/description.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Initialization mod of MineClone 2. Defines some common shared variables and sets up initial default settings which have to be set at the beginning.
|
18
mods/CORE/mcl_init/init.lua
Normal file
18
mods/CORE/mcl_init/init.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
-- Some global variables (don't overwrite them!)
|
||||
mcl_vars = {}
|
||||
|
||||
--- GUI / inventory menu colors
|
||||
mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]"
|
||||
mcl_vars.gui_bg = "bgcolor[#080808BB;true]"
|
||||
mcl_vars.gui_bg_img = ""
|
||||
|
||||
mcl_vars.inventory_header = mcl_vars.gui_slots .. mcl_vars.gui_bg
|
||||
|
||||
-- Set default stack sizes
|
||||
minetest.nodedef_default.stack_max = 64
|
||||
minetest.craftitemdef_default.stack_max = 64
|
||||
|
||||
-- Set random seed for all other mods (Remember to make sure no other mod calls this function)
|
||||
math.randomseed(os.time())
|
||||
|
||||
|
1
mods/CORE/mcl_init/mod.conf
Normal file
1
mods/CORE/mcl_init/mod.conf
Normal file
|
@ -0,0 +1 @@
|
|||
name = mcl_init
|
Loading…
Add table
Add a link
Reference in a new issue