diff --git a/init.lua b/init.lua index 3a95abe..2490e78 100644 --- a/init.lua +++ b/init.lua @@ -129,14 +129,12 @@ modlib = setmetatable({ end }) -modlib.mod = minetest and dofile(get_resource(modlib.modname, "mod.lua")) --- HACK force load minetest/gametime.lua to ensure that the globalstep is registered earlier than globalsteps of mods depending on modlib if minetest then + modlib.mod = dofile(get_resource(modlib.modname, "mod.lua")) + -- HACK force load minetest/gametime.lua to ensure that the globalstep is registered earlier than globalsteps of mods depending on modlib + _ = modlib.minetest dofile(get_resource(modlib.modname, "minetest", "gametime.lua")) -end - -if minetest then local ie = minetest.request_insecure_environment() if ie then -- Force load persistence namespace to pass insecure require