disable place sounds - place sounds are played to all players even when to_player is specified - needs more work
parent
d50eb4aa41
commit
9c317fc9ff
33
api.lua
33
api.lua
|
@ -215,11 +215,12 @@ function obsidianmese.pick_engraved_place(itemstack, placer, pointed_thing)
|
|||
-- itemstack = obsidianmese.add_wear(itemstack)
|
||||
|
||||
-- play sound
|
||||
if udef.sounds then
|
||||
if udef.sounds.place then
|
||||
minetest.sound_play(udef.sounds.place)
|
||||
end
|
||||
end
|
||||
-- if udef.sounds then
|
||||
-- if udef.sounds.place then
|
||||
-- udef.sounds.place.to_player = placer:get_player_name()
|
||||
-- minetest.sound_play(udef.sounds.place)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
return itemstack
|
||||
elseif udef and udef.on_use then
|
||||
|
@ -252,11 +253,12 @@ function obsidianmese.pick_engraved_place(itemstack, placer, pointed_thing)
|
|||
-- itemstack = obsidianmese.add_wear(itemstack)
|
||||
|
||||
-- play sound
|
||||
if udef and udef.sounds then
|
||||
if udef.sounds.place then
|
||||
minetest.sound_play(udef.sounds.place)
|
||||
end
|
||||
end
|
||||
-- if udef and udef.sounds then
|
||||
-- if udef.sounds.place then
|
||||
-- udef.sounds.place.to_player = placer:get_player_name()
|
||||
-- minetest.sound_play(udef.sounds.place)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
|
@ -266,11 +268,12 @@ function obsidianmese.pick_engraved_place(itemstack, placer, pointed_thing)
|
|||
inv:set_stack("main", idx, stack)
|
||||
|
||||
-- play sound
|
||||
if udef and udef.sounds then
|
||||
if udef.sounds.place then
|
||||
minetest.sound_play(udef.sounds.place)
|
||||
end
|
||||
end
|
||||
-- if udef and udef.sounds then
|
||||
-- if udef.sounds.place then
|
||||
-- udef.sounds.place.to_player = placer:get_player_name()
|
||||
-- minetest.sound_play(udef.sounds.place)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue