diff --git a/locale/arena_lib.it.tr b/locale/arena_lib.it.tr index d424011..f1fc1d6 100644 --- a/locale/arena_lib.it.tr +++ b/locale/arena_lib.it.tr @@ -119,6 +119,7 @@ Arena sign=Cartello dell'arena [!] Only the party leader can enter the queue!=[!] Solo il capo gruppo può entrare nella coda! [!] There is no enough space for the whole party!=[!] Non c'è abbastanza spazio per tutto il gruppo! [!] There is no team with enough space for the whole party!=[!] Non c'è un team con abbastanza spazio per tutto il gruppo! +[!] Only the party leader can leave the queue!=[!] Solo il capo gruppo può abbandonare la coda! [!] The arena is not enabled!=[!] L'arena non è attiva! [!] The arena is already full!=[!] L'arena è già piena! [!] The arena is loading, try again in a few seconds!=[!] L'arena è in caricamento, riprova tra qualche secondo! diff --git a/locale/template.txt b/locale/template.txt index ccdaead..a099fb5 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -123,6 +123,7 @@ Arena sign= [!] The arena is already full!= [!] The arena is loading, try again in a few seconds!= [!] This minigame doesn't allow to join while in progress!= +[!] Only the party leader can leave the queue!= Waiting for more players...= The queue has been cancelled due to not enough players= @1 seconds for the match to start= diff --git a/signs.lua b/signs.lua index d82fe6a..b29d1b1 100644 --- a/signs.lua +++ b/signs.lua @@ -54,7 +54,7 @@ signs_lib.register_sign("arena_lib:sign", { if minetest.get_modpath("parties") and parties.is_player_in_party(p_name) and arena_lib.get_queueID_by_player(p_name) ~= arenaID then -- se non si è il capo gruppo - if parties.get_party_leader(p_name) ~= p_name then + if not parties.is_player_party_leader(p_name) then minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] Only the party leader can enter the queue!"))) return end @@ -116,6 +116,11 @@ signs_lib.register_sign("arena_lib:sign", { -- se è un party, rimuovo tutto il gruppo if minetest.get_modpath("parties") and parties.is_player_in_party(p_name) then + -- (se è il capogruppo, sennò annullo) + if not parties.is_player_party_leader(p_name) then + minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] Only the party leader can leave the queue!"))) + return end + local party_members = parties.get_party_members(p_name) sign_arena.players_amount = sign_arena.players_amount - #party_members