If farming:seed_spelt exists, drop that instead of wheat

(for Realtest compatibility)
This commit is contained in:
Vanessa Ezekowitz 2015-07-27 02:44:11 -04:00
parent e110b09920
commit 273ad9d1da
2 changed files with 13 additions and 9 deletions

View File

@ -1,2 +1,2 @@
plants_lib
farming?

View File

@ -225,6 +225,11 @@ local box = {
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
}
local sunflower_drop = "farming:seed_wheat"
if minetest.registered_items["farming:seed_spelt"] then
sunflower_drop = "farming:seed_spelt"
end
minetest.register_node(":flowers:sunflower", {
description = "Sunflower",
drawtype = "mesh",
@ -240,15 +245,14 @@ minetest.register_node(":flowers:sunflower", {
sounds = default.node_sound_leaves_defaults(),
selection_box = box,
collision_box = box,
})
minetest.override_item("flowers:sunflower", {drop = {
max_items = 1,
items = {
{items = {"farming:seed_wheat"}, rarity = 8},
{items = {"flowers:sunflower"}},
drop = {
max_items = 1,
items = {
{items = {sunflower_drop}, rarity = 8},
{items = {"flowers:sunflower"}},
}
}
}})
})
local extra_aliases = {
"waterlily",