lua_async_mt/init.lua

16 lines
364 B
Lua
Raw Normal View History

2022-05-18 09:01:31 -07:00
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/src"
2022-05-18 09:01:31 -07:00
dofile(path .. "/init.lua")(path, true)
minetest.register_globalstep(function(dtime)
lua_async.step(dtime)
end)
function lua_async.mt_validate_objs(...)
for _, ref in ipairs {...} do
if not ref:is_player() and not ref:get_luaentity() then
2021-08-06 11:47:20 -07:00
lua_async.kill_thread()
end
end
end