forked from MineClone5/MineClone5
Fix silent ladder placement
This commit is contained in:
parent
ef9eae3c2f
commit
7a4b107d75
|
@ -1203,9 +1203,15 @@ minetest.register_node("mcl_core:ladder", {
|
||||||
end
|
end
|
||||||
local success = minetest.item_place_node(itemstack, placer, pointed_thing)
|
local success = minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
if success and not minetest.setting_getbool("creative_mode") then
|
local idef = itemstack:get_definition()
|
||||||
|
if success then
|
||||||
|
if idef.sounds and idef.sounds.place then
|
||||||
|
minetest.sound_play(idef.sounds.place, {pos=above, gain=1})
|
||||||
|
end
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue