aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/unittests/init.lua
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-06-14 12:40:17 +0200
committersfan5 <sfan5@live.de>2022-06-15 17:20:07 +0200
commit46e7b5135292ae7aa233577d1cc364d60fc932f8 (patch)
treec36463b4c811eb1f93d4a1f30092dbb63adc7890 /games/devtest/mods/unittests/init.lua
parente9e721b9371445d5b96455092079833df3d961b9 (diff)
downloadminetest-46e7b5135292ae7aa233577d1cc364d60fc932f8.tar.xz
Add unittests for entity lifecycle and callbacks
Diffstat (limited to 'games/devtest/mods/unittests/init.lua')
-rw-r--r--games/devtest/mods/unittests/init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/games/devtest/mods/unittests/init.lua b/games/devtest/mods/unittests/init.lua
index 0608f2dd2..96651a878 100644
--- a/games/devtest/mods/unittests/init.lua
+++ b/games/devtest/mods/unittests/init.lua
@@ -112,7 +112,7 @@ local function wait_for_map(player, callback)
if core.get_node_or_nil(player:get_pos()) ~= nil then
callback()
else
- minetest.after(0, check)
+ core.after(0, check)
end
end
check()
@@ -170,12 +170,13 @@ end
--------------
-local modpath = minetest.get_modpath("unittests")
+local modpath = core.get_modpath("unittests")
dofile(modpath .. "/misc.lua")
dofile(modpath .. "/player.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/itemdescription.lua")
dofile(modpath .. "/async_env.lua")
+dofile(modpath .. "/entity.lua")
--------------
@@ -184,7 +185,7 @@ if core.settings:get_bool("devtest_unittests_autostart", false) then
coroutine.wrap(unittests.run_all)()
end)
else
- minetest.register_chatcommand("unittests", {
+ core.register_chatcommand("unittests", {
privs = {basic_privs=true},
description = "Runs devtest unittests (may modify player or map state)",
func = function(name, param)