From d23d5d4cfeaf3e29a67e305d7c9b80c2a0ccfb56 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Sat, 22 Mar 2014 19:31:25 +0000 Subject: More reliable food overrides Use reliable optional dependencies instead of a 0.5 second delay. --- hunger.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'hunger.lua') diff --git a/hunger.lua b/hunger.lua index 106fe6c..28ca010 100644 --- a/hunger.lua +++ b/hunger.lua @@ -54,7 +54,6 @@ local function overwrite(name, hunger_change, replace_with_item, poisen) minetest.registered_items[name] = tab end -minetest.after(0.5, function()--ensure all other mods get loaded overwrite("default:apple", 2) if minetest.get_modpath("farming") ~= nil then overwrite("farming:bread", 4) @@ -164,4 +163,3 @@ if minetest.get_modpath("mtfoods") ~= nil then overwrite("mtfoods:apple_cider", 2) overwrite("mtfoods:cider_rack", 2) end -end) -- cgit v1.2.3 From 4eff5b785027801cf121a250519803be62def8d2 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Sat, 22 Mar 2014 19:36:58 +0000 Subject: Support for bushes_classic foods (plantlife modpack) --- hunger.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'hunger.lua') diff --git a/hunger.lua b/hunger.lua index 28ca010..30e7a21 100644 --- a/hunger.lua +++ b/hunger.lua @@ -116,6 +116,25 @@ if minetest.get_modpath("bushes") ~= nil then overwrite("bushes:basket_pies", 15) end +if minetest.get_modpath("bushes_classic") then + -- bushes_classic mod, as found in the plantlife modpack + local berries = { + "strawberry", + "blackberry", + "blueberry", + "raspberry", + "gooseberry", + "mixed_berry"} + for _, berry in ipairs(berries) do + if berry ~= "mixed_berry" then + overwrite("bushes:"..berry, 1) + end + overwrite("bushes:"..berry.."_pie_raw", 2) + overwrite("bushes:"..berry.."_pie_cooked", 5) + overwrite("bushes:basket_"..berry, 15) + end +end + if minetest.get_modpath("docfarming") ~= nil then overwrite("docfarming:carrot", 2) overwrite("docfarming:cucumber", 2) -- cgit v1.2.3 From c544da116111c176c464aaf630463188bf46fe25 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 24 Mar 2014 13:11:54 +0000 Subject: Add support for mushroom mod food/poison --- hunger.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hunger.lua') diff --git a/hunger.lua b/hunger.lua index 30e7a21..f1cfb39 100644 --- a/hunger.lua +++ b/hunger.lua @@ -135,6 +135,11 @@ if minetest.get_modpath("bushes_classic") then end end +if minetest.get_modpath("mushroom") ~= nil then + overwrite("mushroom:brown", 1) + overwrite("mushroom:red", 1, "", 3) +end + if minetest.get_modpath("docfarming") ~= nil then overwrite("docfarming:carrot", 2) overwrite("docfarming:cucumber", 2) -- cgit v1.2.3