summaryrefslogtreecommitdiff
path: root/hunger.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-02-24 00:15:05 +0100
committerWuzzy <almikes@aol.com>2015-02-24 00:15:05 +0100
commit02db771b42d275e73120a337b5984423ae19ab33 (patch)
treec8b0832b1e39a6f2e98fe7f4d5c585a6895ba986 /hunger.lua
parentf1f33a7fc49e6f4c369d31dc481ce88ec57e0e29 (diff)
Make dependency on default optional
Diffstat (limited to 'hunger.lua')
-rw-r--r--hunger.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/hunger.lua b/hunger.lua
index f108951..191b235 100644
--- a/hunger.lua
+++ b/hunger.lua
@@ -60,7 +60,9 @@ local function overwrite(name, hunger_change, replace_with_item, poisen, heal)
minetest.registered_items[name] = tab
end
-overwrite("default:apple", 2)
+if minetest.get_modpath("default") ~= nil then
+ overwrite("default:apple", 2)
+end
if minetest.get_modpath("farming") ~= nil then
overwrite("farming:bread", 4)
end