Better compatibility with farming_plus strawberries

Specifically, override the unattractive ones from that mod with the ones
from this, instead of having two kinds of strawberries, ugly and not
ugly.
This commit is contained in:
Ciaran Gultnieks 2014-05-24 17:28:07 -04:00 committed by Vanessa Ezekowitz
parent 753cb01234
commit dde8ca5955

View File

@ -44,12 +44,26 @@ for i, berry in ipairs(bushes_classic.bushes) do
}) })
if berry ~= "mixed_berry" then if berry ~= "mixed_berry" then
if berry == "strawberry" and minetest.registered_nodes["farming_plus:strawberry"] then
-- Special case for strawberries, when farming_plus is in use. Use
-- the item from that mod, but redefine it so it has the right
-- groups and does't look so ugly!
minetest.register_craftitem(":farming_plus:strawberry_item", {
description = S("Strawberry"),
inventory_image = "bushes_"..berry..".png",
on_use = minetest.item_eat(2),
groups = {berry=1, strawberry=1}
})
minetest.register_alias("bushes:strawberry", "farming_plus:strawberry_item")
else
minetest.register_craftitem(":bushes:"..berry, { minetest.register_craftitem(":bushes:"..berry, {
description = S(desc), description = desc,
inventory_image = "bushes_"..berry..".png", inventory_image = "bushes_"..berry..".png",
groups = {berry = 1, [berry] = 1}, groups = {berry = 1, [berry] = 1},
on_use = minetest.item_eat(1), on_use = minetest.item_eat(1),
}) })
end
if minetest.registered_nodes["farming:soil"] then if minetest.registered_nodes["farming:soil"] then
minetest.register_craft({ minetest.register_craft({
@ -111,15 +125,6 @@ for i, berry in ipairs(bushes_classic.bushes) do
}) })
end end
if minetest.registered_nodes["farming_plus:strawberry"] then
minetest.register_craftitem(":farming_plus:strawberry_item", {
description = S("Strawberry"),
inventory_image = "farming_strawberry.png",
on_use = minetest.item_eat(2),
groups = {berry=1, strawberry=1}
})
end
if minetest.registered_nodes["farming:soil"] then if minetest.registered_nodes["farming:soil"] then
minetest.register_craft({ minetest.register_craft({
output = "bushes:mixed_berry_pie_raw 2", output = "bushes:mixed_berry_pie_raw 2",