Doors: place sound when placing a door.
authorAuke Kok <sofar@foo-projects.org>
Sat, 29 Apr 2017 04:09:07 +0000 (21:09 -0700)
committerAuke Kok <sofar+github@foo-projects.org>
Sat, 29 Apr 2017 04:52:59 +0000 (21:52 -0700)
Due to door items being the thing that's placed, we need to
explicitly play a sound when placing a door.

Fixes #1363

mods/doors/init.lua

index 05aa3e2f7c1380706b246f95b18e127107fbea90..5189dec7881ac56ee76e7cb4557d28bf0e77ede2 100644 (file)
@@ -332,6 +332,8 @@ function doors.register(name, def)
                                itemstack:take_item()
                        end
 
+                       minetest.sound_play(def.sounds.place, {pos = pos})
+
                        on_place_node(pos, minetest.get_node(pos),
                                placer, node, itemstack, pointed_thing)