forked from mtcontrib/minetest_hbhunger
More reliable food overrides
Use reliable optional dependencies instead of a 0.5 second delay.
This commit is contained in:
parent
09fc5ee48a
commit
d23d5d4cfe
10
depends.txt
10
depends.txt
@ -1 +1,11 @@
|
|||||||
default
|
default
|
||||||
|
mobs?
|
||||||
|
moretrees?
|
||||||
|
dwarves?
|
||||||
|
animalmaterials?
|
||||||
|
fishing?
|
||||||
|
glooptest?
|
||||||
|
bushes?
|
||||||
|
docfarming?
|
||||||
|
farmingplus?
|
||||||
|
mtfoods?
|
||||||
|
@ -54,7 +54,6 @@ local function overwrite(name, hunger_change, replace_with_item, poisen)
|
|||||||
minetest.registered_items[name] = tab
|
minetest.registered_items[name] = tab
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.after(0.5, function()--ensure all other mods get loaded
|
|
||||||
overwrite("default:apple", 2)
|
overwrite("default:apple", 2)
|
||||||
if minetest.get_modpath("farming") ~= nil then
|
if minetest.get_modpath("farming") ~= nil then
|
||||||
overwrite("farming:bread", 4)
|
overwrite("farming:bread", 4)
|
||||||
@ -164,4 +163,3 @@ if minetest.get_modpath("mtfoods") ~= nil then
|
|||||||
overwrite("mtfoods:apple_cider", 2)
|
overwrite("mtfoods:apple_cider", 2)
|
||||||
overwrite("mtfoods:cider_rack", 2)
|
overwrite("mtfoods:cider_rack", 2)
|
||||||
end
|
end
|
||||||
end)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user