diff --git a/nodes.lua b/nodes.lua index 376356b..d2a3ade 100644 --- a/nodes.lua +++ b/nodes.lua @@ -196,7 +196,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) table.insert(donos, fields.novo_acesso) meta:set_string("permitidos", minetest.serialize(donos)) - minetest.sound_play("bau_coop_blip", {gain = 0.3, + minetest.sound_play("bau_coop_blip", {gain = 0.2, pos = pos, max_hear_distance = 10}) return minetest.show_formspec( @@ -246,7 +246,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) ) end - minetest.sound_play("bau_coop_blip", {gain = 0.3, + minetest.sound_play("bau_coop_blip", {gain = 0.2, pos = pos, max_hear_distance = 10}) return minetest.show_formspec( @@ -350,7 +350,7 @@ minetest.register_node("bau_coop:bau_compartilhado", { if verificar_acesso(meta, clicker) then if minetest.get_node(pos).name == "bau_coop:bau_compartilhado" then - minetest.sound_play("bau_coop_open", {gain = 0.3, + minetest.sound_play("bau_coop_open", {gain = 0.2, pos = pos, max_hear_distance = 10}) minetest.after(0.1 , minetest.swap_node, minetest.deserialize(minetest.serialize(pos)), { name = "bau_coop:bau_compartilhado_aceso", @@ -440,7 +440,17 @@ do minetest.register_node("bau_coop:bau_compartilhado_open", def) end - +-- Fecha baus que ficaram abertos ao fechar o mundo +minetest.register_lbm({ + name = "bau_coop:fechar_bau", + nodenames = {"bau_coop:bau_compartilhado_open"}, + run_at_every_load = true, + action = function(pos, node) + minetest.chat_send_all("fechando") + minetest.swap_node(pos, { name = "bau_coop:bau_compartilhado", + param2 = node.param2 }) + end, +}) minetest.register_craft({ output = 'bau_coop:bau_compartilhado', diff --git a/sounds/bau_coop_blip.ogg b/sounds/bau_coop_blip.ogg index a57450e..40d52c6 100644 Binary files a/sounds/bau_coop_blip.ogg and b/sounds/bau_coop_blip.ogg differ diff --git a/sounds/bau_coop_close.ogg b/sounds/bau_coop_close.ogg index eb9e388..e6d0d59 100644 Binary files a/sounds/bau_coop_close.ogg and b/sounds/bau_coop_close.ogg differ diff --git a/sounds/bau_coop_open.ogg b/sounds/bau_coop_open.ogg index a3567b2..36160ff 100644 Binary files a/sounds/bau_coop_open.ogg and b/sounds/bau_coop_open.ogg differ