Add source code and include lua_async as submodule
parent
d990959c4d
commit
cbef4c8f8d
|
@ -0,0 +1,3 @@
|
|||
[submodule "src"]
|
||||
path = src
|
||||
url = https://github.com/EliasFleckenstein03/lua_async
|
|
@ -0,0 +1,15 @@
|
|||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/src/"
|
||||
|
||||
dofile(path .. "init.lua")(path)
|
||||
|
||||
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
|
||||
coroutine.yield(true)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a2770298f040307f8dd59c7a88d7e40d37faec14
|
Loading…
Reference in New Issue