diff --git a/hatch/init.lua b/hatch/init.lua index 0e6f138..7215766 100644 --- a/hatch/init.lua +++ b/hatch/init.lua @@ -19,10 +19,12 @@ hatch = {} ------------------------------------------------------------- Functions -------- function hatch.open( p, n ) + minetest.sound_play("hatch_toggle", {pos = q}) minetest.env:set_node( p, { name='hatch:hatch_o', param2=n.param2 } ) end function hatch.close( p, n ) + minetest.sound_play("hatch_toggle", {pos = q}) minetest.env:set_node( p, { name='hatch:hatch_c', param2=n.param2 } ) end diff --git a/hatch/sounds/hatch_toggle.ogg b/hatch/sounds/hatch_toggle.ogg new file mode 100644 index 0000000..8cff204 Binary files /dev/null and b/hatch/sounds/hatch_toggle.ogg differ diff --git a/zdoor/init.lua b/zdoor/init.lua index 86a081b..c2f9f5e 100644 --- a/zdoor/init.lua +++ b/zdoor/init.lua @@ -22,6 +22,7 @@ function door.toggle( p, n ) local q = xyz( p.x, p.y+1, p.z ) local a = minetest.env:get_meta( p ) local b = minetest.env:get_meta( q ) + minetest.sound_play("zdoor_toggle", {pos = q}) minetest.env:set_node( p, {name=a:get_string('alt'), param2=n.param2} ) minetest.env:set_node( q, {name=b:get_string('alt'), param2=n.param2} ) end @@ -118,7 +119,7 @@ minetest.register_node( 'zdoor:door_wood_b_t', { node_box = { type = "fixed", fixed = { -1/2, -1/2, -1/2, 1/2, 1/2, -5/16 } }, selection_box = { type = "fixed", - fixed = { -1/2, -1/2, -1/2, 1/2, 1/2, -5/16 } }, + fixed = { -1/2, -1/2, -1/2, 1/2, 3/2, -5/16 } }, drop = 'zdoor:door_wood', sounds = default.node_sound_wood_defaults(), on_construct = function( p ) @@ -150,7 +151,7 @@ minetest.register_node( 'zdoor:door_wood_b_f', { node_box = { type = "fixed", fixed = { -1/2, -1/2, -1/2, -5/16, 1/2, 1/2 } }, selection_box = { type = "fixed", - fixed = { -1/2, -1/2, -1/2, -5/16, 1/2, 1/2 } }, + fixed = { -1/2, -1/2, -1/2, -5/16, 3/2, 1/2 } }, drop = 'zdoor:door_wood', sounds = default.node_sound_wood_defaults(), on_construct = function( p ) diff --git a/zdoor/sounds/zdoor_toggle.ogg b/zdoor/sounds/zdoor_toggle.ogg new file mode 100644 index 0000000..8cff204 Binary files /dev/null and b/zdoor/sounds/zdoor_toggle.ogg differ