Use ephemeral sounds
This commit is contained in:
parent
b2c75acd68
commit
c5e4ec5e27
61 changed files with 123 additions and 122 deletions
|
@ -27,7 +27,7 @@ mesecon.push_button = function(pos, node)
|
|||
local def = minetest.registered_nodes[node.name]
|
||||
minetest.set_node(pos, {name="mesecons_button:button_"..def._mcl_button_basename.."_on", param2=node.param2})
|
||||
mesecon.receptor_on(pos, button_get_output_rules(node))
|
||||
minetest.sound_play("mesecons_button_push", {pos=pos})
|
||||
minetest.sound_play("mesecons_button_push", {pos=pos}, true)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(def._mcl_button_timer)
|
||||
end
|
||||
|
@ -73,7 +73,7 @@ local on_button_place = function(itemstack, placer, pointed_thing)
|
|||
|
||||
if success then
|
||||
if idef.sounds and idef.sounds.place then
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1})
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
|
@ -179,7 +179,7 @@ mesecon.register_button = function(basename, description, texture, recipeitem, s
|
|||
|
||||
-- Normal operation: Un-press the button
|
||||
minetest.set_node(pos, {name="mesecons_button:button_"..basename.."_off",param2=node.param2})
|
||||
minetest.sound_play("mesecons_button_pop", {pos=pos})
|
||||
minetest.sound_play("mesecons_button_pop", {pos=pos}, true)
|
||||
mesecon.receptor_off(pos, button_get_output_rules(node))
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -64,7 +64,7 @@ local piston_remove_pusher = function (pos, oldnode)
|
|||
pos = pos,
|
||||
max_hear_distance = 31,
|
||||
gain = 0.3,
|
||||
})
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -85,7 +85,7 @@ local piston_remove_base = function (pos, oldnode)
|
|||
pos = pos,
|
||||
max_hear_distance = 31,
|
||||
gain = 0.3,
|
||||
})
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -108,7 +108,7 @@ local piston_on = function (pos, node)
|
|||
pos = pos,
|
||||
max_hear_distance = 31,
|
||||
gain = 0.3,
|
||||
})
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ local torch_get_input_rules = function(node)
|
|||
end
|
||||
|
||||
local torch_overheated = function(pos)
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.02, max_hear_distance = 6})
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.02, max_hear_distance = 6}, true)
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x, y=pos.y+0.2, z=pos.z},
|
||||
velocity = {x = 0, y = 0.6, z = 0},
|
||||
|
|
|
@ -53,7 +53,7 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
|
|||
on_rightclick = function (pos, node)
|
||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_on", param2=node.param2})
|
||||
mesecon.receptor_on(pos, lever_get_output_rules(node))
|
||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||
minetest.sound_play("mesecons_lever", {pos=pos}, true)
|
||||
end,
|
||||
node_placement_prediction = "",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -116,7 +116,7 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
|
|||
|
||||
if success then
|
||||
if idef.sounds and idef.sounds.place then
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1})
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
|
@ -152,7 +152,7 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
|
|||
on_rightclick = function (pos, node)
|
||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_off", param2=node.param2})
|
||||
mesecon.receptor_off(pos, lever_get_output_rules(node))
|
||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||
minetest.sound_play("mesecons_lever", {pos=pos}, true)
|
||||
end,
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue