mirror of
https://codeberg.org/tenplus1/farming.git
synced 2024-12-28 11:40:16 +01:00
fix strawberry issue
This commit is contained in:
parent
2a41f1e9d5
commit
c34bb8a5ed
@ -131,29 +131,12 @@ alias("farming_plus:rhubarb", "farming:rhubarb_3")
|
|||||||
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
||||||
|
|
||||||
-- Strawberry
|
-- Strawberry
|
||||||
if eth then
|
|
||||||
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
||||||
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
||||||
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
||||||
alias("farming_plus:strawberry_2", "ethereal:strawberry_3")
|
alias("farming_plus:strawberry_2", "ethereal:strawberry_3")
|
||||||
alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
|
alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
|
||||||
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
||||||
else
|
|
||||||
minetest.register_craftitem(":ethereal:strawberry", {
|
|
||||||
description = S("Strawberry"),
|
|
||||||
inventory_image = "farming_strawberry.png",
|
|
||||||
wield_image = "farming_strawberry.png",
|
|
||||||
groups = {food_strawberry = 1, flammable = 2},
|
|
||||||
on_use = minetest.item_eat(1)
|
|
||||||
})
|
|
||||||
|
|
||||||
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
|
||||||
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
|
||||||
alias("farming_plus:strawberry_1", "farming:raspberry_1")
|
|
||||||
alias("farming_plus:strawberry_2", "farming:raspberry_2")
|
|
||||||
alias("farming_plus:strawberry_3", "farming:raspberry_3")
|
|
||||||
alias("farming_plus:strawberry", "farming:raspberry_4")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Tomato
|
-- Tomato
|
||||||
alias("farming_plus:tomato_seed", "farming:tomato")
|
alias("farming_plus:tomato_seed", "farming:tomato")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
local S = farming.intllib
|
local S = farming.intllib
|
||||||
|
|
||||||
-- Strawberry (can also be planted as seed)
|
-- Strawberry (can also be planted as seed)
|
||||||
minetest.register_craftitem("farming:strawberry", {
|
minetest.register_craftitem(":ethereal:strawberry", {
|
||||||
description = S("Strawberry"),
|
description = S("Strawberry"),
|
||||||
inventory_image = "ethereal_strawberry.png",
|
inventory_image = "ethereal_strawberry.png",
|
||||||
groups = {seed = 2, food_strawberry = 1, food_berry = 1, flammable = 2},
|
groups = {seed = 2, food_strawberry = 1, food_berry = 1, flammable = 2},
|
||||||
@ -12,10 +12,6 @@ minetest.register_craftitem("farming:strawberry", {
|
|||||||
on_use = minetest.item_eat(1)
|
on_use = minetest.item_eat(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
-- weird engine bug stops us from using on_place for ethereal: item when mod not active
|
|
||||||
-- so instead use farming:strawberry and do quick alias for compatibility.
|
|
||||||
minetest.register_alias("farming:strawberry", "ethereal:strawberry")
|
|
||||||
|
|
||||||
-- Define Strawberry Bush growth stages
|
-- Define Strawberry Bush growth stages
|
||||||
local def = {
|
local def = {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -60,8 +56,8 @@ minetest.register_node(":ethereal:strawberry_5", table.copy(def))
|
|||||||
def.tiles = {"ethereal_strawberry_6.png"}
|
def.tiles = {"ethereal_strawberry_6.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:strawberry 1"}, rarity = 2},
|
{items = {"ethereal:strawberry 1"}, rarity = 2},
|
||||||
{items = {"farming:strawberry 2"}, rarity = 3}
|
{items = {"ethereal:strawberry 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node(":ethereal:strawberry_6", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_6", table.copy(def))
|
||||||
@ -70,8 +66,8 @@ minetest.register_node(":ethereal:strawberry_6", table.copy(def))
|
|||||||
def.tiles = {"ethereal_strawberry_7.png"}
|
def.tiles = {"ethereal_strawberry_7.png"}
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:strawberry 1"}, rarity = 1},
|
{items = {"ethereal:strawberry 1"}, rarity = 1},
|
||||||
{items = {"farming:strawberry 2"}, rarity = 3}
|
{items = {"ethereal:strawberry 2"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node(":ethereal:strawberry_7", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_7", table.copy(def))
|
||||||
@ -82,16 +78,16 @@ def.groups.growing = nil
|
|||||||
def.selection_box = farming.select_final
|
def.selection_box = farming.select_final
|
||||||
def.drop = {
|
def.drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {"farming:strawberry 2"}, rarity = 1},
|
{items = {"ethereal:strawberry 2"}, rarity = 1},
|
||||||
{items = {"farming:strawberry 3"}, rarity = 3}
|
{items = {"ethereal:strawberry 3"}, rarity = 3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
minetest.register_node(":ethereal:strawberry_8", table.copy(def))
|
minetest.register_node(":ethereal:strawberry_8", table.copy(def))
|
||||||
|
|
||||||
-- add to registered_plants
|
-- add to registered_plants
|
||||||
farming.registered_plants["ethereal:strawberry"] = {
|
farming.registered_plants["ethereal:strawberry"] = {
|
||||||
crop = "farming:strawberry",
|
crop = "ethereal:strawberry",
|
||||||
seed = "farming:strawberry",
|
seed = "ethereal:strawberry",
|
||||||
minlight = farming.min_light,
|
minlight = farming.min_light,
|
||||||
maxlight = farming.max_light,
|
maxlight = farming.max_light,
|
||||||
steps = 8
|
steps = 8
|
||||||
|
Loading…
Reference in New Issue
Block a user