Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions carrots.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion corn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion cucumber.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion potatoes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 8 additions & 4 deletions pumpkin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
})
Expand Down
2 changes: 1 addition & 1 deletion rhubarb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion strawberries.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tomatoes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down