Merge pull request 'Drop pumpkins, melons and buttons via piston or dirt next to piston' (#3777) from pumpkin_stuff into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3777
This commit is contained in:
ancientmarinerdev 2023-06-07 21:21:43 +00:00
commit f57f73681a
4 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -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 = {

View file

@ -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(),