forked from VoxeLibre/VoxeLibre
Fixing that annoying chest open
This commit is contained in:
parent
5e8bc16a0c
commit
f319a8d903
|
@ -72,9 +72,7 @@ minetest.register_entity("mcl_chests:chest", {
|
||||||
self.players[playername] = true
|
self.players[playername] = true
|
||||||
if not self.is_open then
|
if not self.is_open then
|
||||||
self:set_animation("open")
|
self:set_animation("open")
|
||||||
minetest.sound_play(self.sound_prefix .. "_open", {
|
minetest.sound_play(self.sound_prefix .. "_open", {pos=self.node_pos, gain=0.5, max_hear_distance = 16}, true)
|
||||||
pos = self.node_pos,
|
|
||||||
})
|
|
||||||
self.is_open = true
|
self.is_open = true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -87,9 +85,7 @@ minetest.register_entity("mcl_chests:chest", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:set_animation("close")
|
self:set_animation("close")
|
||||||
minetest.sound_play(self.sound_prefix .. "_close", {
|
minetest.sound_play(self.sound_prefix .. "_close", {pos=self.node_pos, gain=0.3, max_hear_distance = 16}, true)
|
||||||
pos = self.node_pos,
|
|
||||||
})
|
|
||||||
self.is_open = false
|
self.is_open = false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue