Make dependency on default optional

This commit is contained in:
Wuzzy 2015-02-24 00:15:05 +01:00
parent f1f33a7fc4
commit 02db771b42
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
hudbars
default
default?
animalmaterials?
bucket?
bushes?

View File

@ -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