Add mod option to enable testing nodes

master
Joachim Stolberg 2021-07-23 20:30:12 +02:00
parent 5e1ce2055c
commit 99c2e44995
2 changed files with 10 additions and 5 deletions

View File

@ -30,8 +30,11 @@ dofile(MP .. "/power.lua")
dofile(MP .. "/liquid.lua")
dofile(MP .. "/control.lua")
-- Only for testing/demo purposes
--dofile(MP .. "/test/test_liquid.lua")
--local Cable = dofile(MP .. "/test/test_power.lua")
--assert(loadfile(MP .. "/test/test_control.lua"))(Cable)
--dofile(MP .. "/test/test_tool.lua")
print("networks_test_enabled", minetest.settings:get_bool("networks_test_enabled"))
if minetest.settings:get_bool("networks_test_enabled") == true then
-- Only for testing/demo purposes
dofile(MP .. "/test/test_liquid.lua")
local Cable = dofile(MP .. "/test/test_power.lua")
assert(loadfile(MP .. "/test/test_control.lua"))(Cable)
dofile(MP .. "/test/test_tool.lua")
end

2
settingtypes.txt Normal file
View File

@ -0,0 +1,2 @@
# Enable some nodes for testing/demo purposes
networks_test_enabled (test nodes enabled) bool false