mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +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
|
||||
})
|
||||
|
||||
_ml = modlib
|
||||
|
||||
if minetest then
|
||||
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
|
||||
_ = modlib.minetest
|
||||
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)
|
||||
end
|
||||
modlib.conf.build_setting_tree()
|
||||
modlib.mod.get_resource = get_resource
|
||||
end
|
||||
|
||||
_ml = modlib
|
||||
|
Loading…
Reference in New Issue
Block a user