mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-30 23:52:59 +00:00
Don't play place sound when failed to place torch
This commit is contained in:
parent
a3f9d14cc1
commit
a993ed6f06
1 changed files with 2 additions and 2 deletions
|
@ -71,11 +71,11 @@ mcl_torches.register_torch = function(substring, description, icon, mesh_floor,
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir)
|
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing, wdir)
|
||||||
itemstack:set_name(itemstring)
|
itemstack:set_name(itemstring)
|
||||||
|
|
||||||
local idef = itemstack:get_definition()
|
local idef = itemstack:get_definition()
|
||||||
if idef.sounds and idef.sounds.place then
|
if success and idef.sounds and idef.sounds.place then
|
||||||
minetest.sound_play(idef.sounds.place, {pos=under, gain=1})
|
minetest.sound_play(idef.sounds.place, {pos=under, gain=1})
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
Loading…
Reference in a new issue