Add support for custom bed sounds
authorBaptiste Pouget <baba@firemail.cc>
Thu, 12 Jan 2017 17:45:59 +0000 (18:45 +0100)
committerAuke Kok <sofar+github@foo-projects.org>
Thu, 12 Jan 2017 20:42:38 +0000 (12:42 -0800)
mods/beds/api.lua

index 3b2bb0d51ffd4e683176c12249c41a27e15f1c81..4df6b4a3282f6649cb297958f8abbb548843a292 100644 (file)
@@ -34,7 +34,7 @@ function beds.register_bed(name, def)
                is_ground_content = false,
                stack_max = 1,
                groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1},
-               sounds = default.node_sound_wood_defaults(),
+               sounds = def.sounds or default.node_sound_wood_defaults(),
                node_box = {
                        type = "fixed",
                        fixed = def.nodebox.bottom,
@@ -138,7 +138,7 @@ function beds.register_bed(name, def)
                is_ground_content = false,
                pointable = false,
                groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
-               sounds = default.node_sound_wood_defaults(),
+               sounds = def.sounds or default.node_sound_wood_defaults(),
                drop = name .. "_bottom",
                node_box = {
                        type = "fixed",