mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-12-17 07:35:23 +01:00
[farming] Update for #443
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
|
||||
--= Raspberries
|
||||
local S = farming.intllib
|
||||
|
||||
-- raspberries
|
||||
minetest.register_craftitem("farming:raspberries", {
|
||||
description = "Raspberries",
|
||||
description = S("Raspberries"),
|
||||
inventory_image = "farming_raspberries.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
||||
@@ -10,10 +11,9 @@ minetest.register_craftitem("farming:raspberries", {
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
|
||||
-- Raspberry Smoothie
|
||||
|
||||
-- raspberry smoothie
|
||||
minetest.register_craftitem("farming:smoothie_raspberry", {
|
||||
description = "Raspberry Smoothie",
|
||||
description = S("Raspberry Smoothie"),
|
||||
inventory_image = "farming_raspberry_smoothie.png",
|
||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||
})
|
||||
@@ -27,9 +27,8 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
-- Define Raspberry growth stages
|
||||
|
||||
minetest.register_node("farming:raspberry_1", {
|
||||
-- raspberries definition
|
||||
local crop_def = {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_raspberry_1.png"},
|
||||
paramtype = "light",
|
||||
@@ -42,64 +41,28 @@ minetest.register_node("farming:raspberry_1", {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
}
|
||||
|
||||
minetest.register_node("farming:raspberry_2", {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_raspberry_2.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
-- stage 1
|
||||
minetest.register_node("farming:raspberry_1", table.copy(crop_def))
|
||||
|
||||
minetest.register_node("farming:raspberry_3", {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_raspberry_3.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
-- stage 2
|
||||
crop_def.tiles = {"farming_raspberry_2.png"}
|
||||
minetest.register_node("farming:raspberry_2", table.copy(crop_def))
|
||||
|
||||
-- Last stage of growth does not have growing group so abm never checks these
|
||||
-- stage 3
|
||||
crop_def.tiles = {"farming_raspberry_3.png"}
|
||||
minetest.register_node("farming:raspberry_3", table.copy(crop_def))
|
||||
|
||||
minetest.register_node("farming:raspberry_4", {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_raspberry_4.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
waving = 1,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {'farming:raspberries 2'}, rarity = 1},
|
||||
{items = {'farming:raspberries'}, rarity = 2},
|
||||
{items = {'farming:raspberries'}, rarity = 3},
|
||||
}
|
||||
},
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
-- stage 4 (final)
|
||||
crop_def.tiles = {"farming_raspberry_4.png"}
|
||||
crop_def.groups.growing = 0
|
||||
crop_def.drop = {
|
||||
items = {
|
||||
{items = {'farming:raspberries 2'}, rarity = 1},
|
||||
{items = {'farming:raspberries'}, rarity = 2},
|
||||
{items = {'farming:raspberries'}, rarity = 3},
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:raspberry_4", table.copy(crop_def))
|
||||
|
||||
Reference in New Issue
Block a user