corrected the syntax of the sound play commands for gates/doors

This commit is contained in:
Vanessa Ezekowitz 2013-06-09 20:02:07 -04:00
parent cf717ce73f
commit 333a74418f

View File

@ -305,21 +305,19 @@ function homedecor_flip_door(pos, node, player, name, side)
rside = "right"
nfdir=node.param2 - 1
if nfdir < 0 then nfdir = 3 end
minetest.sound_play({
name="homedecor_door_open",
minetest.sound_play("homedecor_door_open", {
pos=pos,
max_hear_distance = 5,
gain = 1,
gain = 2,
})
else
rside = "left"
nfdir=node.param2 + 1
if nfdir > 3 then nfdir = 0 end
minetest.sound_play({
name="homedecor_door_close",
minetest.sound_play("homedecor_door_close", {
pos=pos,
max_hear_distance = 5,
gain = 1,
gain = 2,
})
end
minetest.env:add_node({x=pos.x, y=pos.y+1, z=pos.z}, { name = "homedecor:door_"..name.."_top_"..rside, param2=nfdir})
@ -327,11 +325,10 @@ function homedecor_flip_door(pos, node, player, name, side)
end
function homedecor_flip_gate(pos, node, player, gate, oc)
minetest.sound_play({
name="homedecor_gate_open_close",
minetest.sound_play("homedecor_gate_open_close", {
pos=pos,
max_hear_distance = 5,
gain = 1,
gain = 2,
})
local fdir = node.param2