2018-05-17 12:04:54 +02:00
|
|
|
|
2023-08-14 09:22:28 +02:00
|
|
|
local S = farming.translate
|
2020-04-26 20:34:43 +02:00
|
|
|
|
2018-08-15 17:22:20 +02:00
|
|
|
--= Helpers
|
|
|
|
|
2018-08-15 17:12:54 +02:00
|
|
|
local eth = minetest.get_modpath("ethereal")
|
|
|
|
local alias = function(orig, new)
|
|
|
|
minetest.register_alias(orig, new)
|
|
|
|
end
|
|
|
|
|
|
|
|
--= Aliases
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Banana
|
|
|
|
if eth then
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling")
|
|
|
|
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
|
|
|
alias("farming_plus:banana", "ethereal:banana")
|
2014-11-09 20:06:28 +01:00
|
|
|
else
|
2016-11-03 11:03:08 +01:00
|
|
|
minetest.register_node(":ethereal:banana", {
|
2020-04-26 20:34:43 +02:00
|
|
|
description = S("Banana"),
|
2016-11-03 11:03:08 +01:00
|
|
|
drawtype = "torchlike",
|
2021-04-02 20:51:10 +02:00
|
|
|
tiles = {"farming_banana_single.png"},
|
|
|
|
inventory_image = "farming_banana_single.png",
|
|
|
|
wield_image = "farming_banana_single.png",
|
2016-11-03 11:03:08 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
|
|
|
|
},
|
2018-03-12 17:45:15 +01:00
|
|
|
groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
2016-11-03 11:03:08 +01:00
|
|
|
on_use = minetest.item_eat(2),
|
2020-07-02 15:31:12 +02:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2016-11-03 11:03:08 +01:00
|
|
|
})
|
|
|
|
|
2018-08-15 17:22:20 +02:00
|
|
|
minetest.register_node(":ethereal:bananaleaves", {
|
2020-04-26 20:34:43 +02:00
|
|
|
description = S("Banana Leaves"),
|
2021-04-02 20:51:10 +02:00
|
|
|
tiles = {"farming_banana_leaf.png"},
|
|
|
|
inventory_image = "farming_banana_leaf.png",
|
|
|
|
wield_image = "farming_banana_leaf.png",
|
2018-08-15 17:22:20 +02:00
|
|
|
paramtype = "light",
|
|
|
|
waving = 1,
|
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2020-07-02 15:31:12 +02:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2018-08-15 17:22:20 +02:00
|
|
|
})
|
|
|
|
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:banana_sapling", "default:sapling")
|
2018-08-15 17:22:20 +02:00
|
|
|
alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:banana", "ethereal:banana")
|
2014-11-09 20:06:28 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Carrot
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:carrot_seed", "farming:carrot")
|
|
|
|
alias("farming_plus:carrot_1", "farming:carrot_1")
|
|
|
|
alias("farming_plus:carrot_2", "farming:carrot_4")
|
|
|
|
alias("farming_plus:carrot_3", "farming:carrot_6")
|
|
|
|
alias("farming_plus:carrot", "farming:carrot_8")
|
|
|
|
alias("farming_plus:carrot_item", "farming:carrot")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Cocoa
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:cocoa_sapling", "farming:cocoa_beans")
|
|
|
|
alias("farming_plus:cocoa_leaves", "default:leaves")
|
|
|
|
alias("farming_plus:cocoa", "default:apple")
|
|
|
|
alias("farming_plus:cocoa_bean", "farming:cocoa_beans")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Orange
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:orange_1", "farming:tomato_1")
|
|
|
|
alias("farming_plus:orange_2", "farming:tomato_4")
|
|
|
|
alias("farming_plus:orange_3", "farming:tomato_6")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
if eth then
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:orange_item", "ethereal:orange")
|
|
|
|
alias("farming_plus:orange", "ethereal:orange")
|
|
|
|
alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
|
2014-11-09 20:06:28 +01:00
|
|
|
else
|
2016-11-03 11:03:08 +01:00
|
|
|
minetest.register_node(":ethereal:orange", {
|
2020-04-26 20:34:43 +02:00
|
|
|
description = S("Orange"),
|
2016-11-03 11:03:08 +01:00
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"farming_orange.png"},
|
|
|
|
inventory_image = "farming_orange.png",
|
|
|
|
wield_image = "farming_orange.png",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
|
|
|
|
},
|
2018-03-12 17:45:15 +01:00
|
|
|
groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2},
|
2016-11-03 11:03:08 +01:00
|
|
|
on_use = minetest.item_eat(4),
|
2020-07-02 15:31:12 +02:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2016-11-03 11:03:08 +01:00
|
|
|
})
|
|
|
|
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:orange_item", "ethereal:orange")
|
|
|
|
alias("farming_plus:orange", "ethereal:orange")
|
|
|
|
alias("farming_plus:orange_seed", "default:sapling")
|
2014-11-09 20:06:28 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Potato
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:potato_item", "farming:potato")
|
|
|
|
alias("farming_plus:potato_1", "farming:potato_1")
|
|
|
|
alias("farming_plus:potato_2", "farming:potato_2")
|
|
|
|
alias("farming_plus:potato", "farming:potato_3")
|
|
|
|
alias("farming_plus:potato_seed", "farming:potato")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Pumpkin
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming:pumpkin_seed", "farming:pumpkin_slice")
|
|
|
|
alias("farming:pumpkin_face", "farming:jackolantern")
|
|
|
|
alias("farming:pumpkin_face_light", "farming:jackolantern_on")
|
|
|
|
alias("farming:big_pumpkin", "farming:jackolantern")
|
|
|
|
alias("farming:big_pumpkin_side", "air")
|
|
|
|
alias("farming:big_pumpkin_top", "air")
|
|
|
|
alias("farming:big_pumpkin_corner", "air")
|
|
|
|
alias("farming:scarecrow", "farming:jackolantern")
|
|
|
|
alias("farming:scarecrow_light", "farming:jackolantern_on")
|
|
|
|
alias("farming:pumpkin_flour", "farming:pumpkin_dough")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Rhubarb
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:rhubarb_seed", "farming:rhubarb")
|
|
|
|
alias("farming_plus:rhubarb_1", "farming:rhubarb_1")
|
|
|
|
alias("farming_plus:rhubarb_2", "farming:rhubarb_2")
|
|
|
|
alias("farming_plus:rhubarb", "farming:rhubarb_3")
|
|
|
|
alias("farming_plus:rhubarb_item", "farming:rhubarb")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Strawberry
|
2022-09-15 09:25:44 +02:00
|
|
|
alias("farming_plus:strawberry_item", "ethereal:strawberry")
|
|
|
|
alias("farming_plus:strawberry_seed", "ethereal:strawberry")
|
|
|
|
alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
|
|
|
|
alias("farming_plus:strawberry_2", "ethereal:strawberry_3")
|
|
|
|
alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
|
|
|
|
alias("farming_plus:strawberry", "ethereal:strawberry_7")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Tomato
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming_plus:tomato_seed", "farming:tomato")
|
|
|
|
alias("farming_plus:tomato_item", "farming:tomato")
|
|
|
|
alias("farming_plus:tomato_1", "farming:tomato_2")
|
|
|
|
alias("farming_plus:tomato_2", "farming:tomato_4")
|
|
|
|
alias("farming_plus:tomato_3", "farming:tomato_6")
|
|
|
|
alias("farming_plus:tomato", "farming:tomato_8")
|
2014-11-09 20:06:28 +01:00
|
|
|
|
|
|
|
-- Weed
|
2018-08-15 17:12:54 +02:00
|
|
|
alias("farming:weed", "default:grass_2")
|