Fix get_gametime force loading

This commit is contained in:
Lars Mueller 2021-08-16 17:21:28 +02:00
parent f2c79ca258
commit 7eed42c68d

@ -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