diff --git a/init.lua b/init.lua index f3ab5fa..bed92ef 100644 --- a/init.lua +++ b/init.lua @@ -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 \ No newline at end of file diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..22d9819 --- /dev/null +++ b/settingtypes.txt @@ -0,0 +1,2 @@ +# Enable some nodes for testing/demo purposes +networks_test_enabled (test nodes enabled) bool false