From 1dc64d9206b2a127f29d979b085c33ea9d637e33 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 8 Jul 2017 15:07:07 +0200 Subject: [PATCH] Reduce node sound hear distance to 16 --- mods/CORE/mcl_sounds/init.lua | 72 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/mods/CORE/mcl_sounds/init.lua b/mods/CORE/mcl_sounds/init.lua index be63ade25..aa67f14ef 100644 --- a/mods/CORE/mcl_sounds/init.lua +++ b/mods/CORE/mcl_sounds/init.lua @@ -4,27 +4,29 @@ mcl_sounds = {} +local mhd = 16 -- default max_hear_distance + function mcl_sounds.node_sound_defaults(table) table = table or {} table.footstep = table.footstep or {name="", gain=1.0} table.dug = table.dug or - {name="default_dug_node", gain=0.25} + {name="default_dug_node", gain=0.25, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_oddly_breakable_by_hand", gain=1.0} + {name="default_dig_oddly_breakable_by_hand", gain=1.0, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node_hard", gain=1.0} + {name="default_place_node_hard", gain=1.0, max_hear_distance=mhd} return table end function mcl_sounds.node_sound_stone_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_hard_footstep", gain=0.5} + {name="default_hard_footstep", gain=0.5, max_hear_distance=mhd} table.dug = table.dug or - {name="default_hard_footstep", gain=1.0} + {name="default_hard_footstep", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_cracky", gain=1.0} + {name="default_dig_cracky", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -32,13 +34,13 @@ end function mcl_sounds.node_sound_metal_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_metal_footstep", gain=0.5} + {name="default_metal_footstep", gain=0.5, max_hear_distance=mhd} table.dug = table.dug or - {name="default_dug_metal", gain=1.0} + {name="default_dug_metal", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_metal", gain=1.0} + {name="default_dig_metal", gain=1.0, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node_metal", gain=1.0} + {name="default_place_node_metal", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -46,13 +48,13 @@ end function mcl_sounds.node_sound_dirt_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_dirt_footstep", gain=1.0} + {name="default_dirt_footstep", gain=1.0, max_hear_distance=mhd} table.dug = table.dug or - {name="default_dirt_footstep", gain=1.5} + {name="default_dirt_footstep", gain=1.5, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="default_dig_crumbly", gain=1.0, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node", gain=1.0} + {name="default_place_node", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -60,13 +62,13 @@ end function mcl_sounds.node_sound_sand_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_sand_footstep", gain=0.5} + {name="default_sand_footstep", gain=0.5, max_hear_distance=mhd} table.dug = table.dug or - {name="default_sand_footstep", gain=1.0} + {name="default_sand_footstep", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="default_dig_crumbly", gain=1.0, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node", gain=1.0} + {name="default_place_node", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -74,13 +76,13 @@ end function mcl_sounds.node_sound_snow_defaults(table) table = table or {} table.footstep = table.footstep or - {name="pedology_snow_soft_footstep", gain=0.7} + {name="pedology_snow_soft_footstep", gain=0.7, max_hear_distance=mhd} table.dug = table.dug or - {name="pedology_snow_soft_footstep", gain=1.0} + {name="pedology_snow_soft_footstep", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="default_dig_crumbly", gain=1.0, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node", gain=1.0} + {name="default_place_node", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -88,11 +90,11 @@ end function mcl_sounds.node_sound_wood_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_wood_footstep", gain=0.5} + {name="default_wood_footstep", gain=0.5, max_hear_distance=mhd} table.dug = table.dug or - {name="default_wood_footstep", gain=1.0} + {name="default_wood_footstep", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_choppy", gain=1.0} + {name="default_dig_choppy", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -100,13 +102,13 @@ end function mcl_sounds.node_sound_leaves_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_grass_footstep", gain=0.35} + {name="default_grass_footstep", gain=0.35, max_hear_distance=mhd} table.dug = table.dug or - {name="default_grass_footstep", gain=0.85} + {name="default_grass_footstep", gain=0.85, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_snappy", gain=0.4} + {name="default_dig_snappy", gain=0.4, max_hear_distance=mhd} table.place = table.place or - {name="default_place_node", gain=1.0} + {name="default_place_node", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -114,11 +116,11 @@ end function mcl_sounds.node_sound_glass_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_glass_footstep", gain=0.5} + {name="default_glass_footstep", gain=0.5, max_hear_distance=mhd} table.dug = table.dug or - {name="default_break_glass", gain=1.0} + {name="default_break_glass", gain=1.0, max_hear_distance=mhd} table.dig = table.dig or - {name="default_dig_cracky", gain=1.0} + {name="default_dig_cracky", gain=1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end @@ -126,11 +128,11 @@ end function mcl_sounds.node_sound_water_defaults(table) table = table or {} table.footstep = table.footstep or - {name = "default_water_footstep", gain = 0.2} + {name = "default_water_footstep", gain = 0.2, max_hear_distance=mhd} table.place = table.place or - {name = "mcl_sounds_place_node_water", gain = 1.0} + {name = "mcl_sounds_place_node_water", gain = 1.0, max_hear_distance=mhd} table.dug = table.dug or - {name = "mcl_sounds_dug_water", gain = 1.0} + {name = "mcl_sounds_dug_water", gain = 1.0, max_hear_distance=mhd} mcl_sounds.node_sound_defaults(table) return table end