Skip to content

Commit

Permalink
Balance sounds, remove silent water footstep
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat authored and appgurueu committed Jan 23, 2022
1 parent 760581b commit 0c1252b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
1 change: 0 additions & 1 deletion mods/default/README.txt
Expand Up @@ -299,7 +299,6 @@ https://www.freesound.org/people/AGFX/packs/1253/
default_water_footstep.1.ogg
default_water_footstep.2.ogg
default_water_footstep.3.ogg
(default_water_footstep.4.ogg is silent)

blukotek (CC0 1.0):
https://www.freesound.org/people/blukotek/sounds/251660/
Expand Down
18 changes: 11 additions & 7 deletions mods/default/functions.lua
Expand Up @@ -16,7 +16,7 @@ end
function default.node_sound_stone_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_hard_footstep", gain = 0.3}
{name = "default_hard_footstep", gain = 0.2}
table.dug = table.dug or
{name = "default_hard_footstep", gain = 1.0}
default.node_sound_defaults(table)
Expand All @@ -26,7 +26,9 @@ end
function default.node_sound_dirt_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_dirt_footstep", gain = 0.4}
{name = "default_dirt_footstep", gain = 0.25}
table.dig = table.dig or
{name = "default_dig_crumbly", gain = 0.4}
table.dug = table.dug or
{name = "default_dirt_footstep", gain = 1.0}
table.place = table.place or
Expand All @@ -50,7 +52,7 @@ end
function default.node_sound_gravel_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_gravel_footstep", gain = 0.1}
{name = "default_gravel_footstep", gain = 0.25}
table.dig = table.dig or
{name = "default_gravel_dig", gain = 0.35}
table.dug = table.dug or
Expand All @@ -64,7 +66,9 @@ end
function default.node_sound_wood_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_wood_footstep", gain = 0.3}
{name = "default_wood_footstep", gain = 0.15}
table.dig = table.dig or
{name = "default_dig_choppy", gain = 0.4}
table.dug = table.dug or
{name = "default_wood_footstep", gain = 1.0}
default.node_sound_defaults(table)
Expand Down Expand Up @@ -98,7 +102,7 @@ end
function default.node_sound_ice_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_ice_footstep", gain = 0.3}
{name = "default_ice_footstep", gain = 0.15}
table.dig = table.dig or
{name = "default_ice_dig", gain = 0.5}
table.dug = table.dug or
Expand All @@ -110,7 +114,7 @@ end
function default.node_sound_metal_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_metal_footstep", gain = 0.4}
{name = "default_metal_footstep", gain = 0.2}
table.dig = table.dig or
{name = "default_dig_metal", gain = 0.5}
table.dug = table.dug or
Expand Down Expand Up @@ -155,7 +159,7 @@ default.cool_lava = function(pos, node)
minetest.set_node(pos, {name = "default:stone"})
end
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
{pos = pos, max_hear_distance = 16, gain = 0.2}, true)
end

if minetest.settings:get_bool("enable_lavacooling") ~= false then
Expand Down
6 changes: 3 additions & 3 deletions mods/default/furnace.lua
Expand Up @@ -159,7 +159,7 @@ local function furnace_node_timer(pos, elapsed)
end
-- Play cooling sound
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.1}, true)
{pos = pos, max_hear_distance = 16, gain = 0.07}, true)
else
-- Item could not be cooked: probably missing fuel
update = true
Expand Down Expand Up @@ -252,9 +252,9 @@ local function furnace_node_timer(pos, elapsed)
result = true

-- Play sound every 5 seconds while the furnace is active
if timer_elapsed == 0 or (timer_elapsed+1) % 5 == 0 then
if timer_elapsed == 0 or (timer_elapsed + 1) % 5 == 0 then
minetest.sound_play("default_furnace_active",
{pos = pos, max_hear_distance = 16, gain = 0.5}, true)
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
end
else
if fuellist and not fuellist[1]:is_empty() then
Expand Down
1 change: 1 addition & 0 deletions mods/default/item_entity.lua
Expand Up @@ -19,6 +19,7 @@ local item = {
self.object:remove()
minetest.sound_play("default_item_smoke", {
pos = p,
gain = 1.0,
max_hear_distance = 8,
}, true)
minetest.add_particlespawner({
Expand Down
Binary file removed mods/default/sounds/default_water_footstep.4.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion mods/default/torch.lua
Expand Up @@ -11,7 +11,7 @@ local function on_flood(pos, oldnode, newnode)
nodedef.groups.igniter and nodedef.groups.igniter > 0) then
minetest.sound_play(
"default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.1},
{pos = pos, max_hear_distance = 16, gain = 0.07},
true
)
end
Expand Down
2 changes: 1 addition & 1 deletion mods/farming/api.lua
Expand Up @@ -60,7 +60,7 @@ farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
minetest.set_node(pt.under, {name = regN[under.name].soil.dry})
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
gain = 0.3,
}, true)

if not minetest.is_creative_enabled(player_name) then
Expand Down
2 changes: 1 addition & 1 deletion mods/fire/init.lua
Expand Up @@ -92,7 +92,7 @@ minetest.register_tool("fire:flint_and_steel", {
on_use = function(itemstack, user, pointed_thing)
local sound_pos = pointed_thing.above or user:get_pos()
minetest.sound_play("fire_flint_and_steel",
{pos = sound_pos, gain = 0.5, max_hear_distance = 8}, true)
{pos = sound_pos, gain = 0.2, max_hear_distance = 8}, true)
local player_name = user:get_player_name()
if pointed_thing.type == "node" then
local node_under = minetest.get_node(pointed_thing.under).name
Expand Down
4 changes: 2 additions & 2 deletions mods/tnt/init.lua
Expand Up @@ -279,7 +279,7 @@ function tnt.burn(pos, nodename)
def.on_ignite(pos)
elseif minetest.get_item_group(name, "tnt") > 0 then
minetest.swap_node(pos, {name = name .. "_burning"})
minetest.sound_play("tnt_ignite", {pos = pos}, true)
minetest.sound_play("tnt_ignite", {pos = pos, gain = 1.0}, true)
minetest.get_node_timer(pos):start(1)
end
end
Expand Down Expand Up @@ -555,7 +555,7 @@ minetest.register_node("tnt:gunpowder_burning", {
on_blast = function() end,
on_construct = function(pos)
minetest.sound_play("tnt_gunpowder_burning", {pos = pos,
gain = 2}, true)
gain = 1.0}, true)
minetest.get_node_timer(pos):start(1)
end,
})
Expand Down

0 comments on commit 0c1252b

Please sign in to comment.