mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +01:00
Fix mod.get_resource being unavailable
This commit is contained in:
parent
7eed42c68d
commit
4268a05d5a
3
init.lua
3
init.lua
@ -129,9 +129,11 @@ modlib = setmetatable({
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
_ml = modlib
|
||||||
|
|
||||||
if minetest then
|
if minetest then
|
||||||
modlib.mod = dofile(get_resource(modlib.modname, "mod.lua"))
|
modlib.mod = dofile(get_resource(modlib.modname, "mod.lua"))
|
||||||
|
modlib.mod.get_resource = get_resource
|
||||||
-- HACK force load minetest/gametime.lua to ensure that the globalstep is registered earlier than globalsteps of mods depending on modlib
|
-- HACK force load minetest/gametime.lua to ensure that the globalstep is registered earlier than globalsteps of mods depending on modlib
|
||||||
_ = modlib.minetest
|
_ = modlib.minetest
|
||||||
dofile(get_resource(modlib.modname, "minetest", "gametime.lua"))
|
dofile(get_resource(modlib.modname, "minetest", "gametime.lua"))
|
||||||
@ -142,7 +144,6 @@ if minetest then
|
|||||||
modlib.persistence = assert(loadfile(get_resource"persistence.lua"))(ie.require)
|
modlib.persistence = assert(loadfile(get_resource"persistence.lua"))(ie.require)
|
||||||
end
|
end
|
||||||
modlib.conf.build_setting_tree()
|
modlib.conf.build_setting_tree()
|
||||||
modlib.mod.get_resource = get_resource
|
|
||||||
end
|
end
|
||||||
|
|
||||||
_ml = modlib
|
_ml = modlib
|
||||||
|
Loading…
Reference in New Issue
Block a user