English as default language + Italian translations added using the 5.0+ Minetest translation system

This commit is contained in:
Marco 2020-04-17 21:04:37 +02:00
parent 89f5fee1d7
commit f896b26b23
7 changed files with 173 additions and 91 deletions

44
api.lua
View File

@ -182,12 +182,12 @@ function arena_lib.remove_arena(sender, mod, arena_name)
local mod_ref = arena_lib.mods[mod]
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix ..S("L'arena per la quale eri in coda è stata rimossa... :("))
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix ..S("The arena you were queueing for has been removed... :("))
-- rimozione arena e aggiornamento storage
mod_ref.arenas[id] = nil
update_storage()
minetest.chat_send_player(sender, mod_ref.prefix .. S("Arena @1 rimossa con successo", arena_name))
minetest.chat_send_player(sender, mod_ref.prefix .. S("Arena @1 successfully removed", arena_name))
end
@ -202,19 +202,19 @@ function arena_lib.set_spawner(sender, mod, arena_name, spawner_ID)
-- controllo se esiste l'arena
if arena == nil then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Quest'arena non esiste!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] This arena doesn't exist!")))
return end
local spawn_points_count = arena_lib.get_arena_spawners_count(arena)
-- se provo a settare uno spawn point di troppo, annullo
if spawn_points_count == arena.max_players and spawner_ID == nil then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Gli spawn point non possono superare i giocatori massimi! Se desideri, puoi sovrascriverli indicando l'ID dello spawn come parametro")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Spawn points can't exceed the maximum number of players! If requested, you can overwrite them specifying the ID of the spawn as a parameter")))
return end
-- se l'ID dello spawner da sovrascrivere non corrisponde a nessun altro ID, annullo
if spawner_ID ~= nil and spawner_ID > spawn_points_count then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Nessuno spawner con quell'ID da sovrascrivere!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] No spawner with that ID to overwrite!")))
return end
local pos = vector.floor(minetest.get_player_by_name(sender):get_pos()) --tolgo i decimali per storare un int
@ -223,12 +223,12 @@ function arena_lib.set_spawner(sender, mod, arena_name, spawner_ID)
-- se il blocco sotto i piedi è aria, annullo
if minetest.get_node(pos_feet).name == "air" then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Non puoi impostare spawn point nell'aria!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] You can't set the spawn point in the air!")))
return end
-- se c'è già uno spawner in quel punto, annullo
for id, spawn in pairs(arena.spawn_points) do
if minetest.serialize(pos_Y_up) == minetest.serialize(spawn) then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] C'è già uno spawn in questo punto!")))
if minetest.serialize(pos_Y_up) == minetest.serialize(spawn) then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] There's already a spawn in this point!")))
return end
end
@ -237,10 +237,10 @@ function arena_lib.set_spawner(sender, mod, arena_name, spawner_ID)
-- sovrascrivo/creo lo spawnpoint
if spawner_ID ~= nil then
arena.spawn_points[spawner_ID] = pos_Y_up
minetest.chat_send_player(sender, mod_ref.prefix .. S("Spawn point @1 sovrascritto con successo", spawner_ID))
minetest.chat_send_player(sender, mod_ref.prefix .. S("Spawn point #@1 successfully overwritten", spawner_ID))
else
arena.spawn_points[spawn_points_count +1] = pos_Y_up
minetest.chat_send_player(sender, mod_ref.prefix .. S("Spawn point @1 impostato con successo", spawn_points_count +1))
minetest.chat_send_player(sender, mod_ref.prefix .. S("Spawn point #@1 successfully set", spawn_points_count +1))
end
update_storage()
@ -255,17 +255,17 @@ function arena_lib.enable_arena(sender, mod, arena_ID)
-- controllo se esiste l'arena
if not arena then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Non esiste nessun'arena associata a questo ID!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] There is no arena associated with this ID!")))
return end
-- check requisiti: spawner e cartello
if arena_lib.get_arena_spawners_count(arena) < arena.max_players then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Spawner insufficienti, arena disabilitata!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Insufficient spawners, the arena has been disabled!")))
arena.enabled = false
return end
if not arena.sign.x then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Cartello non impostato, arena disabilitata!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Sign not set, the arena has been disabled!")))
arena.enabled = false
return end
@ -273,7 +273,7 @@ function arena_lib.enable_arena(sender, mod, arena_ID)
arena.enabled = true
arena_lib.update_sign(arena.sign, arena)
update_storage()
minetest.chat_send_player(sender, mod_ref.prefix .. S("Arena abilitata con successo"))
minetest.chat_send_player(sender, mod_ref.prefix .. S("Arena successfully enabled"))
end
@ -286,17 +286,17 @@ function arena_lib.disable_arena(sender, mod, arena_ID)
-- controllo se esiste l'arena
if not arena then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Non esiste nessun'arena associata a questo ID!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] There is no arena associated with this ID!")))
return end
-- se è già disabilitata, annullo
if not arena.enabled then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] L'arena è già disabilitata")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] The arena is already disabled")))
return end
-- se una partita è in corso, annullo
if arena.in_loading or arena.in_game or arena.in_celebration then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Non puoi disabilitare un'arena mentre una partita è in corso!")))
minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] You can't disable an arena during an ongoing game!")))
return end
-- se c'è gente rimasta è in coda: annullo la coda e li avviso della disabilitazione
@ -305,7 +305,7 @@ function arena_lib.disable_arena(sender, mod, arena_ID)
players_in_queue[pl_name] = nil
arena.players[pl_name] = nil
arena.in_queue = false
minetest.chat_send_player(pl_name, minetest.colorize("#e6482e", S("[!] L'arena per la quale eri in coda è stata disabilitata!")))
minetest.chat_send_player(pl_name, minetest.colorize("#e6482e", S("[!] The arena you were queueing for has been disabled!")))
end
@ -313,7 +313,7 @@ function arena_lib.disable_arena(sender, mod, arena_ID)
arena.enabled = false
arena_lib.update_sign(arena.sign, arena)
update_storage()
minetest.chat_send_player(sender, mod_ref.prefix .. S("L'arena @1 è stata disabilitata con successo", arena.name))
minetest.chat_send_player(sender, mod_ref.prefix .. S("Arena @1 successfully disabled", arena.name))
end
@ -424,7 +424,7 @@ function arena_lib.load_celebration(mod, arena, winner_name)
end
minetest.get_player_by_name(pl_name):set_nametag_attributes({color = {a = 255, r = 255, g = 255, b = 255}})
minetest.chat_send_player(pl_name, mod_ref.prefix .. S("@1 ha vinto la partita", winner_name))
minetest.chat_send_player(pl_name, mod_ref.prefix .. S("@1 wins the game", winner_name))
end
-- eventuale codice aggiuntivo
@ -529,7 +529,7 @@ function arena_lib.remove_player_from_arena(p_name)
players_in_queue[p_name] = nil
arena_lib.update_sign(arena.sign, arena)
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("@1 ha abbandonato la partita", p_name))
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("@1 has left the game", p_name))
-- se l'arena era in coda e ora ci son troppi pochi giocatori, annullo la coda
if arena.in_queue then
@ -538,13 +538,13 @@ function arena_lib.remove_player_from_arena(p_name)
if arena_lib.get_arena_players_count(arena) < arena.min_players then
timer:stop()
arena.in_queue = false
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("La coda è stata annullata per troppi pochi giocatori"))
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("The queue has been cancelled due to not enough players"))
end
-- se invece erano rimasti solo 2 giocatori in partita, l'altro vince
elseif arena_lib.get_arena_players_count(arena) == 1 then
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("Hai vinto la partita per troppi pochi giocatori"))
arena_lib.send_message_players_in_arena(arena, mod_ref.prefix .. S("You win the game due to not enough players"))
for pl_name, stats in pairs(arena.players) do
arena_lib.load_celebration(mod, arena, pl_name)
end

View File

@ -12,7 +12,7 @@ function arena_lib.print_arenas(sender, mod)
minetest.chat_send_player(sender, "ID: " .. id .. ", " .. S("name: ") .. arena.name )
end
minetest.chat_send_player(sender, S("Arene totali: ") .. n )
minetest.chat_send_player(sender, S("Total arenas: ") .. n )
end
@ -20,7 +20,7 @@ end
function arena_lib.print_arena_info(sender, mod, arena_name)
local arena_ID, arena = arena_lib.get_arena_by_name(mod, arena_name)
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Quest'arena non esiste!"))) return end
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] This arena doesn't exist!"))) return end
local p_count = 0
local names = ""
@ -43,7 +43,7 @@ function arena_lib.print_arena_info(sender, mod, arena_name)
]] .. S("Players required: ") .. arena.min_players .. [[
]] .. S("Players supported: ") .. arena.max_players .. [[
]] .. S("Players inside: ") .. p_count .. " ( ".. names .. " )" .. [[
]] .. S("Kill per la vittoria: ") .. arena.kill_cap .. [[
]] .. S("Kills to win: ") .. arena.kill_cap .. [[
]] .. S("In queue: ") .. tostring(arena.in_queue) .. [[
]] .. S("Loading: ") .. tostring(arena.in_loading) .. [[
]] .. S("In game: ") .. tostring(arena.in_game) .. [[
@ -56,9 +56,9 @@ end
function arena_lib.print_arena_stats(sender, mod, arena_name)
local arena_ID, arena = arena_lib.get_arena_by_name(mod, arena_name)
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Quest'arena non esiste!"))) return end
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] This arena doesn't exist!"))) return end
if not arena.in_game and not arena.in_celebration then minetest.chat_send_player(name, minetest.colorize("#e6482e", S("[!] Nessuna partita in corso!"))) return end
if not arena.in_game and not arena.in_celebration then minetest.chat_send_player(name, minetest.colorize("#e6482e", S("[!] No ongoing game!"))) return end
for pl, stats in pairs(arena.players) do
minetest.chat_send_player(sender, S("Player: ") .. pl .. S(", kills: ") .. stats.kills .. S(", deaths: ") .. stats.deaths .. S(", killstreak: ") .. stats.killstreak)

View File

@ -2,7 +2,7 @@ local S = minetest.get_translator("arena_lib")
minetest.register_tool("arena_lib:immunity", {
description = S("Sei immune!"),
description = S("You're immune!"),
inventory_image = "arenalib_immunity.png",
groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
@ -14,7 +14,7 @@ minetest.register_tool("arena_lib:immunity", {
nell'arena se sono cartelli appositi e "on_timer" per teletrasportali in partita quando la queue finisce]]
minetest.register_tool("arena_lib:create_sign", {
description = S("Left click on a sign to create/remove an entrance"),
description = S("Left click on a sign to create/remove the access to the arena"),
inventory_image = "arenalib_createsign.png",
groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
@ -42,9 +42,9 @@ minetest.register_tool("arena_lib:create_sign", {
if minetest.serialize(pos) == minetest.serialize(arena.sign) then
minetest.set_node(pos, {name = "air"})
arena.sign = {}
minetest.chat_send_player(user:get_player_name(), S("Cartello dell'arena @1 rimosso con successo", arena.name))
minetest.chat_send_player(user:get_player_name(), S("Sign of arena @1 successfully removed", arena.name))
else
minetest.chat_send_player(user:get_player_name(), minetest.colorize("#e6482e", S("[!] Esiste già un cartello per quest'arena!")))
minetest.chat_send_player(user:get_player_name(), minetest.colorize("#e6482e", S("[!] There is already a sign for this arena!")))
end
return end

View File

@ -1,2 +0,0 @@
# textdomain: arena_lib
[!] An arena with that name exists already!=[!] ¡Una arena con ese nombre ya existe!

View File

@ -1,68 +1,73 @@
# version 2.1
# author(s): Zughy
# reviewer(s):
# textdomain: arena_lib
[!] An arena with that name exists already!=[!] Esiste già un'arena con quel nome!
Arena @1 succesfully created=Arena @1 creata con successo
[!] There is no arena named @1!=[!] Non c'è nessun'arena chiamata @1!
[!] There is an ongoing match inside the arena @1: impossible to remove!=[!] Una partita è in corso nell'arena @1: impossibile rimuoverla!
=L'arena per la quale eri in coda è stata rimossa... :(
=Arena @1 rimossa con successo
=[!] Quest'arena non esiste!
=[!] Gli spawn point non possono superare i giocatori massimi! Se desideri, puoi sovrascriverli indicando l'ID dello spawn come parametro
=[!] Nessuno spawner con quell'ID da sovrascrivere!
=[!] Non puoi impostare spawn point nell'aria!
=[!] C'è già uno spawn in questo punto!
=Spawn point @1 sovrascritto con successo
=Spawn point @1 impostato con successo
=[!] Non esiste nessun'arena associata a questo ID!
=[!] Spawner insufficienti, arena disabilitata!
=[!] Cartello non impostato, arena disabilitata!
=Arena abilitata con successo
=[!] L'arena è già disabilitata
=[!] Non puoi disabilitare un'arena mentre una partita è in corso!
=[!] L'arena per la quale eri in coda è stata disabilitata!
=L'arena @1 è stata disabilitata con successo
=@1 ha vinto la partita
=@1 ha abbandonato la partita
=La coda è stata annullata per troppi pochi giocatori
=Hai vinto la partita per troppi pochi giocatori
The arena you were queueing for has been removed... :(=L'arena per la quale eri in coda è stata rimossa... :(
Arena @1 successfully removed=Arena @1 rimossa con successo
[!] This arena doesn't exist!=[!] Quest'arena non esiste!
[!] Spawn points can't exceed the maximum number of players! If requested, you can overwrite them specifying the ID of the spawn as a parameter=[!] Gli spawn point non possono superare i giocatori massimi! Se desideri, puoi sovrascriverli indicando l'ID dello spawn come parametro
[!] No spawner with that ID to overwrite!=[!] Nessuno spawner con quell'ID da sovrascrivere!
[!] You can't set the spawn point in the air!=[!] Non puoi impostare spawn point nell'aria!
[!] There's already one spawn at this point!=[!] C'è già uno spawn in questo punto!
Spawn point #@1 successfully overwritten=Spawn point #@1 sovrascritto con successo
Spawn point #@1 successfully set=Spawn point #@1 impostato con successo
[!] There is no arena associated with this ID!=[!] Non esiste nessun'arena associata a questo ID!
[!] Insufficient spawners, the arena has been disabled!=[!] Spawner insufficienti, arena disabilitata!
[!] Sign not set, the arena has been disabled!=[!] Cartello non impostato, arena disabilitata!
Arena successfully enabled=Arena abilitata con successo
[!] The arena is already disabled=[!] L'arena è già disabilitata
[!] You can't disable an arena during an ongoing game!=[!] Non puoi disabilitare un'arena mentre una partita è in corso!
[!] The arena you were queueing for has been disabled!=[!] L'arena per la quale eri in coda è stata disabilitata!
Arena @1 successfully disabled=Arena @1 disabilitata con successo
@1 wins the game=@1 ha vinto la partita
@1 has left the game=@1 ha abbandonato la partita
The queue has been cancelled due to not enough players=La coda è stata annullata per troppi pochi giocatori
You win the game due to not enough players=Hai vinto la partita per troppi pochi giocatori
name: =nome:
=Arene totali:
Total arenas: =Arene totali:
Name: =Nome:
Enabled: =Abilitata:
Players required: =Giocatori minimi:
Players supported: =Giocatori massimi:
Players inside: =Giocatori dentro:
=Kill per la vittoria:
Kills to win: =Uccisioni per la vittoria:
In queue: =In coda:
Loading: =In caricamento:
In game: =In partita:
Celebrating: =In celebrazione:
Spawn points: =Spawn points:
=[!] Nessuna partita in corso!
Properties: =Proprietà:
[!] No ongoing game! =[!] Nessuna partita in corso!
Player: =Giocatore:
, kills: =, uccisioni:
, deaths: =, morti:
, killstreak: =, killstreak:
=Sei immune!
You're immune!=Sei immune!
Left click on a sign to create/remove the access to the arena=Tasto sinistro su un cartello per creare/rimuovere l'accesso all'arena
[!] That's not a sign!=[!] Questo non è un cartello!
=Cartello dell'arena @1 rimosso con successo
=[!] Esiste già un cartello per quest'arena!
Sign of arena @1 successfully removed=Cartello dell'arena @1 rimosso con successo
[!] There is already a sign for this arena! =[!] Esiste già un cartello per quest'arena!
[!] The arena is not enabled!=[!] L'arena non è attiva!
=[!] Sei già in coda per il minigioco @1!
=Devi prima uscire dalla coda di @1!
[!] You're already queueing for minigame @1!=[!] Sei già in coda per il minigioco @1!
You need to leave the queue of @1 first!=Devi prima uscire dalla coda di @1!
You have left the queue=Sei uscito dalla coda
@1 has left the queue=@1 ha abbandonato la coda
=La coda è stata annullata per troppi pochi giocatori
=[!] L'arena è già piena!
=[!] L'arena è in caricamento, riprova tra qualche secondo!
=@1 si è aggiunto alla partita
=Sei entrato nell'arena @1
=@1 si è aggiunto alla coda
=Ti sei aggiunto alla coda per @1
=La partita inizierà tra @1 secondi!
=Click sinistro su un cartello per impostare l'arena
WIP=LAVORI@\nIN CORSO
Terminating=Concludendo
Ongoing=In partita
Loading=In caricamento
Waiting=In attesa
The queue has been cancelled due to not enough players=La coda è stata annullata per troppi pochi giocatori
[!] 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!
@1 has joined the game=@1 si è aggiunto alla partita
You've entered the arena @1=Sei entrato nell'arena @1
@1 has joined the queue=@1 si è aggiunto alla coda
You've joined the queue for @1=Ti sei aggiunto alla coda per @1
The game begins in @1 seconds!=La partita inizierà tra @1 secondi!
Left click on a sign to set the arena=Click sinistro su un cartello per impostare l'arena
# signs_lib gives troubles atm
#WIP=LAVORI@\nIN CORSO
#Terminating=Concludendo
#Ongoing=In partita
#Loading=In caricamento
#Waiting=In attesa

73
locale/template.txt Normal file
View File

@ -0,0 +1,73 @@
# version 2.1
# author(s):
# reviewer(s):
# textdomain: arena_lib
[!] An arena with that name exists already!=
Arena @1 succesfully created=
[!] There is no arena named @1!=
[!] There is an ongoing match inside the arena @1: impossible to remove!=
The arena you were queueing for has been removed... :(=
Arena @1 successfully removed=
[!] This arena doesn't exist!=
[!] Spawn points can't exceed the maximum number of players! If requested, you can overwrite them specifying the ID of the spawn as a parameter=
[!] No spawner with that ID to overwrite!=
[!] You can't set the spawn point in the air!=
[!] There's already one spawn at this point!=
Spawn point #@1 successfully overwritten=
Spawn point #@1 successfully set=
[!] There is no arena associated with this ID!=
[!] Insufficient spawners, the arena has been disabled!=
[!] Sign not set, the arena has been disabled!=
Arena successfully enabled=
[!] The arena is already disabled=
[!] You can't disable an arena during an ongoing game!=
[!] The arena you were queueing for has been disabled!=
Arena @1 successfully disabled=
@1 wins the game=
@1 has left the game=
The queue has been cancelled due to not enough players=
You win the game due to not enough players=
name: =
Total arenas: =
Name: =
Enabled: =
Players required: =
Players supported: =
Players inside: =
Kills to win: =
In queue: =
Loading: =
In game: =
Celebrating: =
Spawn points: =
Properties: =
[!] No ongoing game! =
Player: =
, kills: =
, deaths: =
, killstreak: =
You're immune!=
Left click on a sign to create/remove the access to the arena=
[!] That's not a sign!=
Sign of arena @1 successfully removed=
[!] There is already a sign for this arena! =
[!] The arena is not enabled!=
[!] You're already queueing for minigame @1!=
You need to leave the queue of @1 first!=
You have left the queue=
@1 has left the queue=
The queue has been cancelled due to not enough players=
[!] The arena is already full!=
[!] The arena is loading, try again in a few seconds!=
@1 has joined the game=
You've entered the arena @1=
@1 has joined the queue=
You've joined the queue for @1=
The game begins in @1 seconds!=
Left click on a sign to set the arena=
# signs_lib gives troubles atm
#WIP=
#Terminating=
#Ongoing=
#Loading=
#Waiting=

View File

@ -22,7 +22,7 @@ minetest.override_item("default:sign_wall", {
if not sign_arena then return end -- nel caso qualche cartello dovesse buggarsi, si può rompere e non fa crashare
if not sign_arena.enabled then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] L'arena non è attiva!")))
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] The arena is not enabled!")))
return end
-- cosa succede se è già in coda da qualche parte
@ -32,14 +32,14 @@ minetest.override_item("default:sign_wall", {
-- se è in coda in un altro minigioco, annullo
if queued_mod ~= mod then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] Sei già in coda per il minigioco @1!", queued_mod)))
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] You're already queueing for minigame @1!", queued_mod)))
return end
local queued_ID = arena_lib.get_queueID_by_player(p_name)
-- se è in coda per lo stesso minigioco ma arena diversa, annullo
if queued_ID ~= arenaID then
minetest.chat_send_player(p_name, mod_ref.prefix .. minetest.colorize("#e6482e", S("Devi prima uscire dalla coda di @1!", mod_ref.arenas[queued_ID].name)))
minetest.chat_send_player(p_name, mod_ref.prefix .. minetest.colorize("#e6482e", S("You need to leave the queue of @1 first!", mod_ref.arenas[queued_ID].name)))
return end
-- sennò la coda era la stessa e rimuovo il giocatore
@ -52,19 +52,19 @@ minetest.override_item("default:sign_wall", {
-- se non ci sono più abbastanza giocatori, annullo la coda
if arena_lib.get_arena_players_count(sign_arena) < sign_arena.min_players and sign_arena.in_queue then
minetest.get_node_timer(pos):stop()
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("La coda è stata annullata per troppi pochi giocatori"))
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("The queue has been cancelled due to not enough players"))
sign_arena.in_queue = false
end
return end
-- se l'arena è piena
if arena_lib.get_arena_players_count(sign_arena) == sign_arena.max_players then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] L'arena è già piena!")))
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] The arena is already full!")))
return end
-- se sta caricando
if sign_arena.in_loading then
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] L'arena è in caricamento, riprova tra qualche secondo!")))
minetest.chat_send_player(p_name, minetest.colorize("#e6482e", S("[!] The arena is loading, try again in a few seconds!")))
return end
-- aggiungo il giocatore e aggiorno il cartello
@ -74,20 +74,20 @@ minetest.override_item("default:sign_wall", {
-- notifico i vari giocatori del nuovo player
if sign_arena.in_game then
arena_lib.join_arena(mod, p_name, arenaID)
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("@1 si è aggiunto alla partita", p_name))
minetest.chat_send_player(p_name, mod_ref.prefix .. S("Sei entrato nell'arena @1", sign_arena.name))
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("@1 has joined the game", p_name))
minetest.chat_send_player(p_name, mod_ref.prefix .. S("You've entered the arena @1", sign_arena.name))
return
else
arena_lib.add_to_queue(p_name, mod, arenaID)
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("@1 si è aggiunto alla coda", p_name))
minetest.chat_send_player(p_name, mod_ref.prefix .. S("Ti sei aggiunto alla coda per @1", sign_arena.name))
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("@1 has joined the queue", p_name))
minetest.chat_send_player(p_name, mod_ref.prefix .. S("You've joined the queue for @1", sign_arena.name))
end
local timer = minetest.get_node_timer(pos)
-- se ci sono abbastanza giocatori, parte il timer di attesa
if arena_lib.get_arena_players_count(sign_arena) == sign_arena.min_players and not sign_arena.in_queue and not sign_arena.in_game then
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("La partita inizierà tra @1 secondi!", queue_waiting_time))
arena_lib.send_message_players_in_arena(sign_arena, mod_ref.prefix .. S("The game begins in @1 seconds!", queue_waiting_time))
sign_arena.in_queue = true
timer:start(queue_waiting_time)
end
@ -127,7 +127,7 @@ function arena_lib.set_sign(sender, mod, arena_name)
local arena_ID, arena = arena_lib.get_arena_by_name(mod, arena_name)
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] Quest'arena non esiste!")))
if arena == nil then minetest.chat_send_player(sender, minetest.colorize("#e6482e", S("[!] This arena doesn't exist!")))
return end
-- assegno item creazione arene con nome mod e ID arena nei metadati da restituire al premere sul cartello.
@ -138,7 +138,7 @@ function arena_lib.set_sign(sender, mod, arena_name)
meta:set_int("arenaID", arena_ID)
minetest.get_player_by_name(sender):set_wielded_item(stick)
minetest.chat_send_player(sender, S("Click sinistro su un cartello per impostare l'arena"))
minetest.chat_send_player(sender, S("Left click on a sign to set the arena"))
end
@ -169,11 +169,17 @@ end
function in_game_txt(arena)
local txt
if not arena.enabled then txt = S("WIP")
--[[if not arena.enabled then txt = S("WIP")
elseif arena.in_celebration then txt = S("Terminating")
elseif arena.in_game then txt = S("Ongoing")
elseif arena.in_loading then txt = S("Loading")
else txt = S("In attesa") end
else txt = S("Waiting") end]]
if not arena.enabled then txt = "WIP"
elseif arena.in_celebration then txt = "Terminating"
elseif arena.in_game then txt = "Ongoing"
elseif arena.in_loading then txt = "Loading"
else txt = "Waiting" end
return txt
end