From 563d537164661e04873f9f42fa7e93fc19fc55b0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 19 Feb 2017 19:48:16 +0100 Subject: [PATCH] Snow nodes make snow sounds --- mods/CORE/mcl_sounds/init.lua | 12 ++++++++++++ mods/ITEMS/mcl_core/nodes.lua | 8 ++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mods/CORE/mcl_sounds/init.lua b/mods/CORE/mcl_sounds/init.lua index 1fe07dd98..f7e14524d 100644 --- a/mods/CORE/mcl_sounds/init.lua +++ b/mods/CORE/mcl_sounds/init.lua @@ -52,6 +52,18 @@ function mcl_sounds.node_sound_sand_defaults(table) return table end +function mcl_sounds.node_sound_snow_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name="default_snow_footstep", gain=0.5} + table.dug = table.dug or + {name="default_snow_footstep", gain=1.0} + table.place = table.place or + {name="default_place_node", gain=1.0} + mcl_sounds.node_sound_defaults(table) + return table +end + function mcl_sounds.node_sound_wood_defaults(table) table = table or {} table.footstep = table.footstep or diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index bba5d5918..012744a3f 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -1418,9 +1418,7 @@ minetest.register_node("mcl_core:snow", { }, }, groups = {crumbly=3,falling_node=1,deco_block=1}, - sounds = mcl_sounds.node_sound_dirt_defaults({ - footstep = {name="default_grass_footstep", gain=0.4}, - }), + sounds = mcl_sounds.node_sound_snow_defaults(), drop = "mcl_throwing:snowball 2", }) @@ -1430,9 +1428,7 @@ minetest.register_node("mcl_core:snowblock", { is_ground_content = true, stack_max = 64, groups = {crumbly=3,building_block=1}, - sounds = mcl_sounds.node_sound_dirt_defaults({ - footstep = {name="default_grass_footstep", gain=0.4}, - }), + sounds = mcl_sounds.node_sound_snow_defaults(), drop = "mcl_throwing:snowball 4", })