1
0
espelhamento de https://github.com/mt-mods/xcompat.git sincronizado 2025-10-25 22:55:25 +02:00

register tests only if enabled (#38)

Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
Esse commit está contido em:
Buckaroo Banzai
2024-08-19 07:07:07 +02:00
commit de GitHub
commit 655486f465
2 arquivos alterados com 5 adições e 2 exclusões

Ver arquivo

@@ -44,7 +44,7 @@ end)
dofile(modpath .. "/src/commands.lua") dofile(modpath .. "/src/commands.lua")
if minetest.get_modpath("mtt") then if minetest.get_modpath("mtt") and mtt.enabled then
-- register tests -- register tests
dofile(modpath .. "/mtt.lua") dofile(modpath .. "/mtt.lua")
end end

Ver arquivo

@@ -4,4 +4,7 @@ mtt.emerge_area({ x=0, y=0, z=0 }, { x=10, y=10, z=10 })
-- check nodelist -- check nodelist
local mtt_nodelist = minetest.settings:get("mtt_nodelist") local mtt_nodelist = minetest.settings:get("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) mtt.validate_nodenames(minetest.get_modpath("xcompat") .. "/test/nodelist/" .. mtt_nodelist)
end