diff --git a/mods/default/bucket.lua b/mods/default/bucket.lua index 606883d..d33d092 100644 --- a/mods/default/bucket.lua +++ b/mods/default/bucket.lua @@ -54,7 +54,7 @@ for b=1, #water_buckets do if not above_nodedef.walkable then minetest.add_node(pos, {name = bucket[4]}) - minetest.sound_play({name="default_place_node_water", gain=1.0}, {pos=pos}) + minetest.sound_play({name="default_place_node_water", gain=1.0}, {pos=pos}, true) end return itemstack @@ -103,7 +103,7 @@ minetest.register_craftitem( end end minetest.remove_node(pointed_thing.under) - minetest.sound_play({name="default_dug_water", gain=1.0}, {pos=pointed_thing.pos}) + minetest.sound_play({name="default_dug_water", gain=1.0}, {pos=pointed_thing.pos}, true) return itemstack end diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 57ce99e..98d2187 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -1036,7 +1036,7 @@ minetest.register_node( -- Trim tall grass with shears _on_trim = function(pos, node, player, itemstack) -- This turns it to a normal grass clump and drops one bonus grass clump - minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = player:get_pos(), max_hear_distance = 8}) + minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = player:get_pos(), max_hear_distance = 8}, true) minetest.set_node(pos, {name = "default:grass"}) item_drop.drop_item(pos, "default:grass") diff --git a/mods/door/init.lua b/mods/door/init.lua index d7f1e7f..b858e6a 100644 --- a/mods/door/init.lua +++ b/mods/door/init.lua @@ -85,7 +85,7 @@ function door.register_door(name, def) minetest.get_meta(pt2):set_int("right", 1) end if def.sounds and def.sounds.place then - minetest.sound_play(def.sounds.place, {pos=pt}) + minetest.sound_play(def.sounds.place, {pos=pt}, true) end if not minetest.settings:get_bool("creative_mode") then @@ -133,7 +133,7 @@ function door.register_door(name, def) pos = pos, gain = 0.8, max_hear_distance = 10 - }) + }, true) else minetest.sound_play( snd_2, @@ -141,7 +141,7 @@ function door.register_door(name, def) pos = pos, gain = 0.8, max_hear_distance = 10 - }) + }, true) end end diff --git a/mods/farming/nodes.lua b/mods/farming/nodes.lua index 0829ab0..8af3cf4 100644 --- a/mods/farming/nodes.lua +++ b/mods/farming/nodes.lua @@ -203,7 +203,7 @@ local trim_cotton = function(pos, node, player, tool) -- This cuts down the cotton plant to stage 1 and might drop some bonus goodies local name = tool:get_name() - minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = player:get_pos(), max_hear_distance = 8}) + minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = player:get_pos(), max_hear_distance = 8}, true) minetest.set_node(pos, {name = "farming:cotton_2"}) -- Drop some seeds diff --git a/mods/hunger/init.lua b/mods/hunger/init.lua index 757e2ea..a145b00 100644 --- a/mods/hunger/init.lua +++ b/mods/hunger/init.lua @@ -200,7 +200,7 @@ local function on_item_eat(hpdata, replace_with_item, itemstack, local headpos = player:get_pos() headpos.y = headpos.y + 1 - minetest.sound_play("hunger_eat", {pos = headpos, max_hear_distance = 8, object=player}) + minetest.sound_play("hunger_eat", {pos = headpos, max_hear_distance = 8, object=player}, true) particlespawners[name] = minetest.add_particlespawner( { @@ -303,7 +303,7 @@ local function on_globalstep(dtime) if (oldhng == 5 or oldhng == 3) and hp >= 0 then minetest.chat_send_player(name, minetest.colorize("#ff0", S("You are hungry."))) local pos_sound = player:get_pos() - minetest.sound_play({name="hunger_hungry"}, {pos=pos_sound, max_hear_distance=3, object=player}) + minetest.sound_play({name="hunger_hungry"}, {pos=pos_sound, max_hear_distance=3, object=player}, true) end if hunger.userdata[name].hunger <= 0 and hp >= 0 then player:set_hp(hp - 1) @@ -343,7 +343,7 @@ local function fake_on_item_eat(hpdata, replace_with_item, itemstack, pos = headpos, max_hear_distance = 8, object = player, - }) + }, true) if not minetest.settings:get_bool("creative_mode") then itemstack:take_item(1) diff --git a/mods/item_drop/init.lua b/mods/item_drop/init.lua index c34ec14..258687a 100644 --- a/mods/item_drop/init.lua +++ b/mods/item_drop/init.lua @@ -98,7 +98,7 @@ minetest.register_globalstep( pos = pos, gain = 0.3, max_hear_distance = 16 - }) + }, true) end -- Notify nav mod of inventory change if nav_mod and lua.itemstring == "nav:map" then diff --git a/mods/jewels/init.lua b/mods/jewels/init.lua index ce967a0..19f95c6 100644 --- a/mods/jewels/init.lua +++ b/mods/jewels/init.lua @@ -340,14 +340,14 @@ minetest.register_node( itemstack_changed = true end - minetest.sound_play({name="jewels_jewelling_a_tool"}, {gain=0.8, pos=pos, max_hear_distance=8}) + minetest.sound_play({name="jewels_jewelling_a_tool"}, {gain=0.8, pos=pos, max_hear_distance=8}, true) -- TODO: Graphical effect achievements.trigger_achievement(player, "jeweler") achievements.trigger_achievement(player, "master_jeweler") else -- Failure - minetest.sound_play({name="jewels_jewelling_fail"}, {gain=0.8, pos=pos, max_hear_distance=8}) + minetest.sound_play({name="jewels_jewelling_fail"}, {gain=0.8, pos=pos, max_hear_distance=8}, true) end end diff --git a/mods/locks/init.lua b/mods/locks/init.lua index 9d3638d..4eb36be 100644 --- a/mods/locks/init.lua +++ b/mods/locks/init.lua @@ -119,10 +119,10 @@ minetest.register_tool( minetest.colorize("#0f0", S("You have broken the lock!"))) end achievements.trigger_achievement(player, "burglar") - minetest.sound_play({name="locks_unlock",gain=0.8},{pos=pos, max_hear_distance=16}) + minetest.sound_play({name="locks_unlock",gain=0.8},{pos=pos, max_hear_distance=16}, true) else -- Failure! - minetest.sound_play({name="locks_pick",gain=0.5},{pos=pos, max_hear_distance=16}) + minetest.sound_play({name="locks_pick",gain=0.5},{pos=pos, max_hear_distance=16}, true) end if not minetest.settings:get_bool("creative_mode") then diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index fb28664..915e7df 100644 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -62,7 +62,7 @@ local function mob_sound(self, sound, keep_pitch) pitch = pitch, object = self.object, max_hear_distance = self.sounds.distance - }) + }, true) end @@ -1078,7 +1078,7 @@ function mobs:register_mob(name, def) pos = pos, gain = 1.0, max_hear_distance = 16 - }) + }, true) end effect(pos, 15, "tnt_smoke.png", 5) return @@ -1386,7 +1386,7 @@ function mobs:register_mob(name, def) minetest.sound_play("default_punch", { object = hitter, max_hear_distance = 5 - }) + }, true) -- exit here if dead if check_for_death(self, hitter, damage) then diff --git a/mods/mobs/mob_sheep.lua b/mods/mobs/mob_sheep.lua index c039c93..c08a799 100644 --- a/mods/mobs/mob_sheep.lua +++ b/mods/mobs/mob_sheep.lua @@ -102,7 +102,7 @@ mobs:register_mob( local pos = self.object:get_pos() pos.y = pos.y + 0.5 local obj = minetest.add_item(pos, ItemStack("mobs:wool")) - minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = clicker:get_pos(), max_hear_distance = 8}) + minetest.sound_play({name = "default_shears_cut", gain = 0.5}, {pos = clicker:get_pos(), max_hear_distance = 8}, true) if obj then obj:set_velocity( { diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 46ceeb2..5aca5d7 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -159,7 +159,7 @@ end function tnt.burn(pos) local name = minetest.get_node(pos).name if tnt_enable and name == "tnt:tnt" then - minetest.sound_play("tnt_ignite", {pos = pos}) + minetest.sound_play("tnt_ignite", {pos = pos}, true) minetest.set_node(pos, {name = "tnt:tnt_burning"}) minetest.get_node_timer(pos):start(2) end @@ -174,7 +174,7 @@ function tnt.explode(pos, radius, sound) pos = pos, gain = 1.5, max_hear_distance = 128 - }) + }, true) local pos = vector.round(pos) local vm = VoxelManip()