diff --git a/init.lua b/init.lua index a1f5e2e..c4c622f 100644 --- a/init.lua +++ b/init.lua @@ -44,7 +44,7 @@ end) dofile(modpath .. "/src/commands.lua") -if minetest.get_modpath("mtt") then +if minetest.get_modpath("mtt") and mtt.enabled then -- register tests dofile(modpath .. "/mtt.lua") end diff --git a/mtt.lua b/mtt.lua index a8a15a5..e407cfe 100644 --- a/mtt.lua +++ b/mtt.lua @@ -4,4 +4,7 @@ mtt.emerge_area({ x=0, y=0, z=0 }, { x=10, y=10, z=10 }) -- check nodelist local mtt_nodelist = minetest.settings:get("mtt_nodelist") -mtt.validate_nodenames(minetest.get_modpath("xcompat") .. "/test/nodelist/" .. mtt_nodelist) +if mtt_nodelist then + -- nodelist specified, check if all the required nodes are present + mtt.validate_nodenames(minetest.get_modpath("xcompat") .. "/test/nodelist/" .. mtt_nodelist) +end \ No newline at end of file