Move configuration to in-game settings
This commit is contained in:
10
init.lua
10
init.lua
@@ -19,9 +19,11 @@ local modpath=minetest.get_modpath("industrialtest")
|
||||
-- table with global functions, variables etc
|
||||
industrialtest={}
|
||||
|
||||
-- Initial constants
|
||||
industrialtest.updateDelay=1 -- Note: Make this value smaller to make machines update more frequently (it may make server more laggy)
|
||||
industrialtest.developerMode=true -- Enables additional utils useful when developing mod
|
||||
-- Settings
|
||||
industrialtest.config={
|
||||
updateDelay=minetest.settings:get("industrialtest.updateDelay") or 1,
|
||||
developerMode=minetest.settings:get_bool("industrialtest.developerMode",false)
|
||||
}
|
||||
|
||||
-- Others
|
||||
industrialtest.random=PseudoRandom(os.time())
|
||||
@@ -92,7 +94,7 @@ dofile(modpath.."/tools/wrench.lua")
|
||||
dofile(modpath.."/upgrades.lua")
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
if industrialtest.developerMode then
|
||||
if industrialtest.config.developerMode then
|
||||
dofile(modpath.."/utils.lua")
|
||||
end
|
||||
dofile(modpath.."/cables.lua")
|
||||
|
||||
Reference in New Issue
Block a user