From 7eed42c68d8cb40637db132050e47b92608df1cc Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Mon, 16 Aug 2021 17:21:28 +0200 Subject: [PATCH] Fix get_gametime force loading --- init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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