diff --git a/carrots.lua b/carrots.lua index fa68d91..da11db9 100644 --- a/carrots.lua +++ b/carrots.lua @@ -15,7 +15,7 @@ minetest.register_node("farming_plus:carrot_1", { walkable = false, drawtype = "plantlike", waving = 1, - drop = "", + drop = "farming_plus:carrot_seed", tiles = {"farming_carrot_1.png"}, selection_box = { type = "fixed", @@ -32,7 +32,7 @@ minetest.register_node("farming_plus:carrot_2", { walkable = false, drawtype = "plantlike", waving = 1, - drop = "", + drop = "farming_plus:carrot_seed", tiles = {"farming_carrot_2.png"}, selection_box = { type = "fixed", diff --git a/corn.lua b/corn.lua index fd92099..ed4a48e 100644 --- a/corn.lua +++ b/corn.lua @@ -12,7 +12,7 @@ minetest.register_node('farming_plus:corn_1', { walkable = false, drawtype = 'plantlike', waving = 1, - drop = '', + drop = 'farming_plus:corn_seed', tiles = {'corn1.png'}, selection_box = { type = 'fixed', diff --git a/cucumber.lua b/cucumber.lua index 70ace91..34b0266 100644 --- a/cucumber.lua +++ b/cucumber.lua @@ -14,7 +14,7 @@ minetest.register_node("farming_plus:cucumber_1", { paramtype = "light", walkable = false, drawtype = "plantlike", - drop = "", + drop = "farming_plus:cucumber_seed", tiles = {"cucumber1.png"}, selection_box = { type = "fixed", diff --git a/potatoes.lua b/potatoes.lua index ad3e332..23e66bc 100644 --- a/potatoes.lua +++ b/potatoes.lua @@ -15,7 +15,7 @@ minetest.register_node('farming_plus:potato_1', { walkable = false, drawtype = 'plantlike', waving = 1, - drop = '', + drop = 'farming_plus:potato_seed', tiles = {'farming_potato_1.png'}, selection_box = { type = 'fixed', diff --git a/pumpkin.lua b/pumpkin.lua index 0d70003..e14dffe 100644 --- a/pumpkin.lua +++ b/pumpkin.lua @@ -13,7 +13,7 @@ core.register_node(':farming:pumpkin_1', { paramtype = 'light', sunlight_propagates = true, drawtype = 'nodebox', - drop = '', + drop = ':farming:pumpkin_seed', tiles = { "farming_pumpkin_top.png", "farming_pumpkin_bottom.png", @@ -111,9 +111,13 @@ core.register_node(':farming:pumpkin', { on_punch = function(pos, node, puncher) local tool = puncher:get_wielded_item():get_name() - if tool and string.match(tool, 'sword') then - node.name = 'farming:pumpkin_face' - core.set_node(pos, node) + if minetest.is_protected(pos, puncher:get_player_name()) or minetest.is_protected({x=pos.x, y=pos.y+1, z=pos.z}, puncher:get_player_name()) then + return False + else + if tool and string.match(tool, 'sword') then + node.name = 'farming:pumpkin_face' + core.set_node(pos, node) + end end end }) diff --git a/rhubarb.lua b/rhubarb.lua index 07519a1..191073b 100644 --- a/rhubarb.lua +++ b/rhubarb.lua @@ -15,7 +15,7 @@ minetest.register_node('farming_plus:rhubarb_1', { walkable = false, drawtype = 'plantlike', waving = 1, - drop = '', + drop = 'farming_plus:rhubarb_seed', tiles = {'farming_rhubarb_1.png'}, selection_box = { type = 'fixed', diff --git a/strawberries.lua b/strawberries.lua index 03ae754..965f921 100644 --- a/strawberries.lua +++ b/strawberries.lua @@ -15,7 +15,7 @@ minetest.register_node('farming_plus:strawberry_1', { walkable = false, drawtype = 'plantlike', waving = 1, - drop = '', + drop = 'farming_plus:strawberry_seed', tiles = {'farming_strawberry_1.png'}, selection_box = { type = 'fixed', diff --git a/tomatoes.lua b/tomatoes.lua index 7dcd0ca..f774b98 100644 --- a/tomatoes.lua +++ b/tomatoes.lua @@ -15,7 +15,7 @@ minetest.register_node('farming_plus:tomato_1', { walkable = false, drawtype = 'plantlike', waving = 1, - drop = '', + drop = 'farming_plus:tomato_seed', tiles = {'farming_tomato_1.png'}, selection_box = { type = 'fixed',