Add a new 'pumpkin' group (#4012)

Creates a new 'pumpkin' group, which combines Pumpkin, Faceless Pumkin and Jack o'Lantern under a shared category. This helps tidy up the mesecons_noteblock code a bit, and possibly other mods too.

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/4012
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
Mikita Wiśniewski 2023-11-14 15:35:30 +00:00 committed by the-real-herowl
parent 32ef89aca3
commit a764818e13
2 changed files with 4 additions and 4 deletions

@ -152,8 +152,6 @@ function mesecon.noteblock_play(pos, param2)
soundname="mesecons_noteblock_xylophone_metal"
elseif block_below_name == "mcl_nether:soul_sand" then
soundname="mesecons_noteblock_cowbell"
elseif block_below_name == "mcl_farming:pumpkin" or block_below_name == "mcl_farming:pumpkin_face" or block_below_name == "mcl_farming:pumpkin_face_light" then
soundname="mesecons_noteblock_didgeridoo"
elseif block_below_name == "mcl_core:emeraldblock" then
soundname="mesecons_noteblock_squarewave"
elseif block_below_name == "mcl_farming:hay_block" then
@ -162,6 +160,8 @@ function mesecon.noteblock_play(pos, param2)
soundname="mesecons_noteblock_piano_digital"
elseif minetest.get_item_group(block_below_name, "wool") ~= 0 then
soundname="mesecons_noteblock_guitar"
elseif minetest.get_item_group(block_below_name, "pumpkin") ~= 0 then
soundname="mesecons_noteblock_didgeridoo"
elseif minetest.get_item_group(block_below_name, "material_glass") ~= 0 then
soundname="mesecons_noteblock_hit"
elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then

@ -101,7 +101,7 @@ local pumpkin_base_def = {
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {
handy = 1, axey = 1, plant = 1, building_block = 1, dig_by_piston = 1, dig_immediate_piston = 1,
enderman_takable = 1, compostability = 65
pumpkin = 1, enderman_takable = 1, compostability = 65
},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate,
@ -199,7 +199,7 @@ minetest.register_node("mcl_farming:pumpkin_face_light", {
paramtype2 = "facedir",
light_source = minetest.LIGHT_MAX,
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"},
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1 },
groups = {handy=1, axey=1, pumpkin=1, building_block=1, dig_by_piston=1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
-- Attempt to spawn iron golem or snow golem