From a764818e13522dac881bb5078da78bc10d92956a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= Date: Tue, 14 Nov 2023 15:35:30 +0000 Subject: [PATCH] Add a new 'pumpkin' group (#4012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Co-authored-by: Mikita Wiśniewski Co-committed-by: Mikita Wiśniewski --- mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua | 4 ++-- mods/ITEMS/mcl_farming/pumpkin.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua index ac56d8bc5..b841545b3 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua @@ -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 diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index 7387a78c9..7354c0038 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -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