aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..256e3f0
--- /dev/null
+++ b/init.lua
@@ -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