mirror of
https://github.com/mt-mods/xcompat.git
synced 2024-12-22 09:00:17 +01:00
register tests only if enabled (#38)
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
parent
cb6471e266
commit
655486f465
2
init.lua
2
init.lua
@ -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
|
||||||
|
5
mtt.lua
5
mtt.lua
@ -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")
|
||||||
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
|
Loading…
Reference in New Issue
Block a user