Add source code and include lua_async as submodule
This commit is contained in:
parent
d990959c4d
commit
cbef4c8f8d
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src"]
|
||||||
|
path = src
|
||||||
|
url = https://github.com/EliasFleckenstein03/lua_async
|
15
init.lua
Normal file
15
init.lua
Normal file
@ -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
|
1
src
Submodule
1
src
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a2770298f040307f8dd59c7a88d7e40d37faec14
|
Loading…
x
Reference in New Issue
Block a user