Drop pumpkins, melons and buttons via piston or dirt next to piston
parent
47f64f63a3
commit
60c996b5ac
|
@ -215,6 +215,10 @@ function mcl_autogroup.can_harvest(nodename, toolname, player)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if minetest.get_item_group(nodename, "dig_immediate_piston") >= 1 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- Check if it can be dug by tool
|
-- Check if it can be dug by tool
|
||||||
local tdef = minetest.registered_tools[toolname]
|
local tdef = minetest.registered_tools[toolname]
|
||||||
if tdef and tdef._mcl_diggroups then
|
if tdef and tdef._mcl_diggroups then
|
||||||
|
|
|
@ -92,6 +92,7 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
|
||||||
groups_off.dig_by_water=1
|
groups_off.dig_by_water=1
|
||||||
groups_off.destroy_by_lava_flow=1
|
groups_off.destroy_by_lava_flow=1
|
||||||
groups_off.dig_by_piston=1
|
groups_off.dig_by_piston=1
|
||||||
|
groups_off.dig_immediate_piston=1
|
||||||
groups_off.button=1 -- button (off)
|
groups_off.button=1 -- button (off)
|
||||||
|
|
||||||
local groups_on = table.copy(groups_off)
|
local groups_on = table.copy(groups_off)
|
||||||
|
|
|
@ -22,7 +22,7 @@ local melon_base_def = {
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"},
|
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"},
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1,
|
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1, dig_immediate_piston = 1,
|
||||||
enderman_takable = 1, compostability = 65
|
enderman_takable = 1, compostability = 65
|
||||||
},
|
},
|
||||||
drop = {
|
drop = {
|
||||||
|
|
|
@ -100,7 +100,7 @@ local pumpkin_base_def = {
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
|
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
|
||||||
groups = {
|
groups = {
|
||||||
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1,
|
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1, dig_immediate_piston = 1,
|
||||||
enderman_takable = 1, compostability = 65
|
enderman_takable = 1, compostability = 65
|
||||||
},
|
},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
|
Loading…
Reference in New Issue