1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 03:29:09 +00:00

Compare commits

...

21 Commits

Author SHA1 Message Date
Patric Stout
778e196b55 Doc: Prepare for 12.0-beta2 release (#9489) 2021-08-19 21:21:37 +02:00
translators
07f98f9234 Update: Translations from eints
italian: 13 changes by CoderLel
russian: 1 change by Ln-Wolf
french: 2 changes by glx22
2021-08-19 18:46:20 +00:00
Michael Lutz
fff09a4af2 Fix d9c1d18f2: Wrong format string for console disconnect message. 2021-08-19 19:56:00 +02:00
translators
a7fe82c646 Update: Translations from eints
finnish: 3 changes by hpiirai
portuguese: 2 changes by azulcosta
2021-08-18 18:53:42 +00:00
Joan Josep
cc38a42b07 Fix 659989af45: Set appropriate town window dirty when building/removing airports. (#9497) 2021-08-18 14:33:32 +02:00
Joan Josep
b38712a302 Fix a18188a: "Meaningful" is misspelled in landscape grid documentation. (#9498) 2021-08-18 13:15:01 +01:00
translators
335a2392e7 Update: Translations from eints
finnish: 2 changes by hpiirai
portuguese: 1 change by azulcosta
2021-08-18 10:13:13 +00:00
Patric Stout
c4b700f1b0 Fix #9492: show for what server a relay session is being created (#9494)
Currently it says "the server" which is a bit ambigious. Be more
specific.
2021-08-18 12:06:14 +02:00
Patric Stout
996ae28989 Fix #9491: reword "no connection" error message (#9495) 2021-08-18 12:00:36 +02:00
Patric Stout
5da60cef46 Fix: typo in the word "spectator" (tnx Heiki) (#9496) 2021-08-18 12:00:17 +02:00
Nicolas Chappe
de28817d9f Fix 977604ef: [Linkgraph] Add a special case for unknown travel times on link update 2021-08-18 01:48:11 +02:00
translators
325d031082 Update: Translations from eints
catalan: 2 changes by J0anJosep
french: 1 change by glx22
2021-08-17 18:54:07 +00:00
Patric Stout
5c776f21e7 Fix 6acf204d: crash when showing coordinator-error-messages (#9488) 2021-08-17 19:42:46 +02:00
translators
04e9df47d9 Update: Translations from eints
russian: 1 change by Ln-Wolf
2021-08-17 13:47:15 +00:00
Nicolas Chappe
977604ef08 Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
2021-08-17 14:57:59 +02:00
Patric Stout
6acf204d14 Fix: report reuse of invite-code and switch to local game-type (#9487)
This prevents two servers battling for the same invite-code. Now
the last one wins.
2021-08-17 13:35:29 +02:00
translators
b531a0c1cf Update: Translations from eints
chinese (simplified): 1 change by goodspeed34
2021-08-16 18:55:59 +00:00
Frédéric Simonis
ac4a7d02c7 Codechange: Improve LineCache queries (#9417)
Adds the support to query the linecache without copying the string.
This uses a custom transparent comparator in conjunction with
a query type using a std::string_view.
2021-08-16 11:18:47 +02:00
dP
2e6a77a78a Fix: connecting with the same name thrice hangs the server (#9485) 2021-08-16 11:09:54 +02:00
translators
d212505dcf Update: Translations from eints
chinese (simplified): 82 changes by goodspeed34
french: 2 changes by glx22
portuguese: 1 change by azulcosta
portuguese (brazilian): 2 changes by Vimerum
2021-08-15 18:48:50 +00:00
Patric Stout
b2eafcc720 Fix: [Actions] changelog assumed major.minor.patch versioning (#9482)
We now use major.minor versioning, so it failed to pick up the
correct information.
2021-08-15 14:14:13 +02:00
40 changed files with 286 additions and 99 deletions

View File

@@ -4,9 +4,9 @@ tag=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\
# If we are a tag, show the part of the changelog till (but excluding) the last stable
if [ -n "$tag" ]; then
grep='^[0-9]\+\.[0-9]\+\.[0-9]\+[^-]'
grep='^[0-9]\+\.[0-9]\+[^-]'
next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
exit 0
fi

View File

@@ -1,3 +1,12 @@
12.0-beta2 (2021-08-19)
------------------------------------------------------------------------
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo (#9457)
Fix: Wrong town window refreshed when building an airport with noise levels enabled (#9497)
Fix: Improve wording of network-related messages (#9494, #9495, #9500)
Fix: [Network] Report reuse of invite-code (#9487)
Fix: [Network] Connecting with the same client name thrice hangs the server (#9485)
12.0-beta1 (2021-08-15)
------------------------------------------------------------------------
Feature: [Network] Remove lobby window; pressing "Join Game" now immediately joins a server (#9467)

View File

@@ -79,7 +79,7 @@ the array so you can quickly see what is used and what is not.
<tr>
<td rowspan="2">0</td>
<td class="caption">ground</td>
<td class="bits" rowspan=27><span class="used" title="Tile type">XXXX</span> <span class="used" title="Presence and direction of bridge above">XX</span> <span class="used" title="Tropic Zone: only meaningfull in tropic climate. It contains the definition of the available zones">XX</span></td>
<td class="bits" rowspan=27><span class="used" title="Tile type">XXXX</span> <span class="used" title="Presence and direction of bridge above">XX</span> <span class="used" title="Tropic Zone: only meaningful in tropic climate. It contains the definition of the available zones">XX</span></td>
<td class="bits" rowspan=27><span class="used" title="Tile height">XXXX XXXX</span></td>
<td class="bits" rowspan=2><span class="free">OOO</span><span class="usable" title="Owner (always OWNER_NONE)">1 OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>

View File

@@ -888,6 +888,12 @@ Layouter::LineCacheItem &Layouter::GetCachedParagraphLayout(const char *str, siz
linecache = new LineCache();
}
if (auto match = linecache->find(LineCacheQuery{state, std::string_view{str, len}});
match != linecache->end()) {
return match->second;
}
/* Create missing entry */
LineCacheKey key;
key.state_before = state;
key.str.assign(str, len);

View File

@@ -17,6 +17,8 @@
#include <map>
#include <string>
#include <stack>
#include <string_view>
#include <type_traits>
#include <vector>
#ifdef WITH_ICU_LX
@@ -155,14 +157,25 @@ class Layouter : public std::vector<std::unique_ptr<const ParagraphLayouter::Lin
struct LineCacheKey {
FontState state_before; ///< Font state at the beginning of the line.
std::string str; ///< Source string of the line (including colour and font size codes).
};
/** Comparison operator for std::map */
bool operator<(const LineCacheKey &other) const
struct LineCacheQuery {
FontState state_before; ///< Font state at the beginning of the line.
std::string_view str; ///< Source string of the line (including colour and font size codes).
};
/** Comparator for std::map */
struct LineCacheCompare {
using is_transparent = void; ///< Enable map queries with various key types
/** Comparison operator for LineCacheKey and LineCacheQuery */
template<typename Key1, typename Key2>
bool operator()(const Key1 &lhs, const Key2 &rhs) const
{
if (this->state_before.fontsize != other.state_before.fontsize) return this->state_before.fontsize < other.state_before.fontsize;
if (this->state_before.cur_colour != other.state_before.cur_colour) return this->state_before.cur_colour < other.state_before.cur_colour;
if (this->state_before.colour_stack != other.state_before.colour_stack) return this->state_before.colour_stack < other.state_before.colour_stack;
return this->str < other.str;
if (lhs.state_before.fontsize != rhs.state_before.fontsize) return lhs.state_before.fontsize < rhs.state_before.fontsize;
if (lhs.state_before.cur_colour != rhs.state_before.cur_colour) return lhs.state_before.cur_colour < rhs.state_before.cur_colour;
if (lhs.state_before.colour_stack != rhs.state_before.colour_stack) return lhs.state_before.colour_stack < rhs.state_before.colour_stack;
return lhs.str < rhs.str;
}
};
public:
@@ -179,7 +192,7 @@ public:
~LineCacheItem() { delete layout; free(buffer); }
};
private:
typedef std::map<LineCacheKey, LineCacheItem> LineCache;
typedef std::map<LineCacheKey, LineCacheItem, LineCacheCompare> LineCache;
static LineCache *linecache;
static LineCacheItem &GetCachedParagraphLayout(const char *str, size_t len, const FontState &state);

View File

@@ -784,6 +784,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * P
STR_STATUSBAR_AUTOSAVE :{RED}Salvo Automaticamente
STR_STATUSBAR_SAVING_GAME :{RED}* * SALVANDO JOGO * *
STR_STATUSBAR_SPECTATOR :{WHITE}(espectador)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Histórico de Mensagens
@@ -2113,7 +2114,7 @@ STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Empresa
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Jogadores online
# Network client list
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Multijogador
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Jogadores Online
STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}Servidor
STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}Nome
STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}Nome do servidor que você está jogando
@@ -2163,7 +2164,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Você t
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Você tem certeza que quer restaurar a senha da empresa '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Usar retransmissão?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Erro ao estabelecer uma conexão entre você e o servidor.{}Você gostaria de retransmitir essa sessão via '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Não
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Sim, apenas dessa vez
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Sim, não perguntar novamente

View File

@@ -784,6 +784,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * E
STR_STATUSBAR_AUTOSAVE :{RED}DESADA AUTOMÀTICA
STR_STATUSBAR_SAVING_GAME :{RED}* * DESANT PARTIDA * *
STR_STATUSBAR_SPECTATOR :{WHITE}(espectador)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Historial de missatges
@@ -2163,7 +2164,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Esteu s
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Esteu segur que voleu restablir la contrasenya de la companyia «{COMPANY}»?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Voleu usar un servei de transmissió?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}No s'ha pogut establir una connexió entre el servidor i el vostre dispositiu.{}Voleu transmetre aquesta sessió via «{STRING}»?
STR_NETWORK_ASK_RELAY_NO :{BLACK}No
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Sí, aquest una vegada.
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Sí, no ho preguntis més.
@@ -2285,6 +2285,7 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}El servi
STR_NETWORK_MESSAGE_KICKED :*** S'ha expulsat {STRING}. Motiu: {STRING}
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}El registre al servidor ha fallat.
STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}S'ha registrat un altre servidor amb el mateix codi d'invitació. Es canvia a partida de tipus local.
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}El vostre servidor no permet connexions remotes.
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Els altres jugadors no podran connectar-se al vostre servidor.

View File

@@ -2162,7 +2162,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Weet je
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Weet je zeker dat je het wachtwoord voor bedrijf '{COMPANY}' wilt terugstellen?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Omleiden?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Kan geen verbinding maken tussen server en jou.{}Wil je deze sessie omleiden via '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Nee
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Ja, deze keer
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Ja, en vraag dit niet opnieuw

View File

@@ -783,7 +783,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * P
STR_STATUSBAR_AUTOSAVE :{RED}AUTOSAVE
STR_STATUSBAR_SAVING_GAME :{RED}* * SAVING GAME * *
STR_STATUSBAR_SPECATOR :{WHITE}(spectator)
STR_STATUSBAR_SPECTATOR :{WHITE}(spectator)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Message History
@@ -2163,7 +2163,7 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Are you
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Are you sure you want to reset the password of company '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Use relay?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Failed to establish a connection between you and the server.{}Would you like to relay this session via '{RAW_STRING}'?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Failed to establish a connection between you and server '{RAW_STRING}'.{}Would you like to relay this session via '{RAW_STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}No
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Yes, this once
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Yes, don't ask again
@@ -2202,7 +2202,7 @@ STR_NETWORK_CHAT_OSKTITLE :{BLACK}Enter te
# Network messages
STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}No network devices found
STR_NETWORK_ERROR_NOSERVER :{WHITE}Could not find any network games
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}The server didn't answer the request
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Connection to the server timed out or was refused
STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Could not connect due to NewGRF mismatch
STR_NETWORK_ERROR_DESYNC :{WHITE}Network-Game synchronisation failed
STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}Network-Game connection lost
@@ -2285,6 +2285,7 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}The serv
STR_NETWORK_MESSAGE_KICKED :*** {RAW_STRING} was kicked. Reason: ({RAW_STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Server registration failed
STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Another server with the same invite-code registered itself. Switching to "local" game-type.
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}Your server doesn't allow remote connections
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Other players won't be able to connect to your server

View File

@@ -2162,7 +2162,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Are you
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Are you sure you want to reset the password of company '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Use relay?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Failed to establish a connection between you and the server.{}Would you like to relay this session via '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}No
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Yes, this once
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Yes, don't ask again

View File

@@ -783,6 +783,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * T
STR_STATUSBAR_AUTOSAVE :{RED}AUTOMAATTITALLENNUS
STR_STATUSBAR_SAVING_GAME :{RED}* * TALLENNETAAN PELIÄ * *
STR_STATUSBAR_SPECTATOR :{WHITE}(katsoja)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Viestihistoria
@@ -2112,7 +2113,7 @@ STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Yhtiö o
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Kytkeytyneet pelaajat
# Network client list
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Moninpeli
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Kytkeytyneet pelaajat
STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}Palvelin
STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}Nimi
STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}Sen palvelimen nimi, jolla pelaat
@@ -2162,7 +2163,7 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Haluatk
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Haluatko varmasti nollata yhtiön ”{COMPANY}” salasanan?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Käytetäänkö välityspalvelua?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Yhteyden muodostaminen sinun ja palvelimen välillä epäonnistui.{}Haluatko, että tämä istunto välitetään välityspalvelimen ”{STRING}” kautta?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Yhteyden muodostaminen sinun ja palvelimen ”{STRING}” välille epäonnistui.{}Haluatko, että tämä istunto välitetään välityspalvelimen ”{STRING}” kautta?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Ei
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Kyllä, tämän kerran
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Kyllä, älä kysy uudestaan
@@ -2201,7 +2202,7 @@ STR_NETWORK_CHAT_OSKTITLE :{BLACK}Syötä
# Network messages
STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Verkkolaitteita ei löytynyt
STR_NETWORK_ERROR_NOSERVER :{WHITE}Verkkopelejä ei löytynyt
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Palvelin ei vastannut pyyntöön
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Yhteys palvelimeen aikakatkaistiin tai torjuttiin
STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Yhteyden muodostaminen epäonnistui NewGRF-virheen vuoksi
STR_NETWORK_ERROR_DESYNC :{WHITE}Verkkopelin tahdistus epäonnistui
STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}Verkkopeliyhteys katkesi
@@ -2284,6 +2285,7 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Palvelin
STR_NETWORK_MESSAGE_KICKED :{STRING} potkaistiin ulos. Syy: ({STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Palvelimen rekisteröinti epäonnistui
STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Toinen palvelin rekisteröityi samalla kutsukoodilla. Pelin tyypiksi vaihdetaan ”paikallinen”.
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}Palvelimesi ei salli etäyhteyksiä
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Muut pelaajat eivät voi saada yhteyttä palvelimeesi

View File

@@ -784,6 +784,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * S
STR_STATUSBAR_AUTOSAVE :{RED}ENREGISTREMENT AUTOMATIQUE
STR_STATUSBAR_SAVING_GAME :{RED}* * SAUVEGARDE EN COURS * *
STR_STATUSBAR_SPECTATOR :{WHITE}(spectateur)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Historique des messages
@@ -2113,7 +2114,7 @@ STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}La compa
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Joueurs en ligne
# Network client list
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Multijoueur
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Joueurs en ligne
STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}Serveur
STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}Nom
STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}Nom du serveur sur lequel vous jouez
@@ -2163,7 +2164,7 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Êtes-v
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Êtes-vous sûr de vouloir réinitialiser le mot de passe de la compagnie '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Utiliser un relai{NBSP}?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Aucune connexion n'a pu être établie entre vous et le serveur.{}Voudriez vous relayer cette session via '{STRING}'{NBSP}?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Aucune connexion n'a pu être établie entre vous et le serveur '{STRING}'.{}Voudriez vous que cette session soit relayée par '{STRING}'{NBSP}?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Non
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Oui, cette fois uniquement
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Oui, ne plus me demander
@@ -2202,7 +2203,7 @@ STR_NETWORK_CHAT_OSKTITLE :{BLACK}Entrer l
# Network messages
STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Aucun périphérique réseau trouvé
STR_NETWORK_ERROR_NOSERVER :{WHITE}Aucune partie réseau n'a été trouvée
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Le serveur n'a pas répondu à la requête
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}La connexion au serveur a dépassé le temps d'attente ou a été refusée
STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Échec de la connexion{NBSP}: NewGRF requis
STR_NETWORK_ERROR_DESYNC :{WHITE}La synchronisation de la partie réseau a échoué
STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}La connexion de la partie réseau a été perdue
@@ -2285,6 +2286,7 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Le serve
STR_NETWORK_MESSAGE_KICKED :*** {STRING} a été exclu. Raison{NBSP}: ({STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Échec de l'enregistrement du serveur
STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Un autre serveur s'est enregistré avec le même code d'invitation. Le type de connexion est changé en "local".
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}Votre serveur n'autorise pas les connexions distantes
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Les autres joueurs ne pourront pas se connecter à votre serveur

View File

@@ -2163,7 +2163,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Sind Si
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Sind Sie sicher, dass Sie das Passwort der Firma '{COMPANY}' zurücksetzen möchten?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Weiterleitung benutzen?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Verbindung zwischen Ihnen und dem Server konnte nicht hergestellt werden.{}Möchten Sie für diese Sitzung eine Weiterleitung via „{STRING}” benutzen?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Nein
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Ja, diesmal
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Ja, nicht erneut fragen

View File

@@ -1145,6 +1145,7 @@ STR_CONFIG_SETTING_TYPE_GAME_MENU :Impostazione di
STR_CONFIG_SETTING_TYPE_GAME_INGAME :Impostazione di gioco (conservata nel salvataggio; influenza solo la partita corrente)
STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Impostazione della compagnia (conservata nei salvataggi; influenza solo le nuove partite)
STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Impostazione della compagnia (conservata nel salvataggio; influenza solo la compagnia corrente)
STR_CONFIG_SETTING_RESET_ALL_CONFIRMATION_DIALOG_TEXT :{WHITE}Questa azione resetterà tutti i settaggi ai loro valori predefiniti.{}Sei sicuro di voler procedere?
STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Categoria:
STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Tipo:
@@ -1228,6 +1229,7 @@ STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Controlla l'att
STR_CONFIG_SETTING_CITY_APPROVAL :Atteggiamento della città in merito alle modifiche: {STRING}
STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Seleziona il modo in cui il rumore e i danni all'ambiente da parte delle compagnie possono influenzare la valutazione delle città e le successive operazioni di costruzione nell'area controllata
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_HELPTEXT :Imposta l'altezza massima per il terreno. Con l'opzione "(auto)" un valore ottimale verrà scelto automaticamente dopo la generazione del terreno
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_VALUE :{NUM}
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_AUTO :(automatico)
STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}Impossibile impostare l'altezza massima della mappa a questo valore. Almeno una delle montagne della mappa è più alta
@@ -1445,6 +1447,8 @@ STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Doppio clic
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Clic (con casella di testo attiva)
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Clic (immediato)
STR_CONFIG_SETTING_USE_RELAY_SERVICE_ASK :Chiedi
STR_CONFIG_SETTING_USE_RELAY_SERVICE_ALLOW :Consenti
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU :Emulazione clic destro: {STRING}
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT :Seleziona il metodo per emulare i clic con il tasto destro del mouse
@@ -2003,6 +2007,7 @@ STR_FACE_EARRING :Orecchino:
STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Cambia la cravatta o l'orecchino
############ Next lines match ServerGameType
STR_NETWORK_SERVER_VISIBILITY_LOCAL :Locale
############ End of leave-in-this-order
# Network server list
@@ -2105,6 +2110,9 @@ STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Compagni
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Elenco dei client
# Network client list
STR_NETWORK_CLIENT_LIST_PLAYER :{BLACK}Giocatore
STR_NETWORK_CLIENT_LIST_PLAYER_NAME_EDIT_TOOLTIP : {BLACK}Modifica il nome del tuo personaggio
STR_NETWORK_CLIENT_LIST_NEW_COMPANY_TOOLTIP :{BLACK}Crea una nuova compagnia e controllala
############ Begin of ConnectionType
############ End of ConnectionType
@@ -2224,6 +2232,8 @@ STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}Il serve
STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Il server si sta riavviando...{}Attendere prego...
STR_NETWORK_MESSAGE_KICKED :*** {STRING} è stato espulso. Motivo: ({STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Registrazione al server fallita
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Altri giocatori non saranno in grado di connettersi al tuo server
# Content downloading window
STR_CONTENT_TITLE :{WHITE}Download contenuti
@@ -2859,6 +2869,8 @@ STR_MAPGEN_DATE :{BLACK}Data:
STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}Numero industrie:
STR_MAPGEN_HEIGHTMAP_HEIGHT :{WHITE}Picco massimo:
STR_MAPGEN_SNOW_COVERAGE :{BLACK}Aree innevate:
STR_MAPGEN_SNOW_COVERAGE_UP :{BLACK}Aumenta la copertura della neve del dieci per cento
STR_MAPGEN_SNOW_COVERAGE_DOWN :{BLACK}Diminuisci la copertura della neve del dieci per cento
STR_MAPGEN_SNOW_COVERAGE_TEXT :{BLACK}{NUM}%
STR_MAPGEN_DESERT_COVERAGE :{BLACK}Aree desertiche:
STR_MAPGEN_DESERT_COVERAGE_TEXT :{BLACK}{NUM}%
@@ -3760,6 +3772,7 @@ STR_REPLACE_ROAD_VEHICLES :Veicoli stradal
STR_REPLACE_TRAM_VEHICLES :Veicoli tranviari
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Fa sì che il rimpiazzamento automatico mantenga costante la lunghezza dei treni rimuovendo vagoni (iniziando dalla testa) nel caso in cui la sostituzione della locomotiva rendesse il treno più lungo
STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. Ctrl+Click per applicare anche ai sotto-gruppi
# Vehicle view
STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE}

View File

@@ -2163,7 +2163,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}'{COMPA
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}'{COMPANY}' 회사의 비밀번호를 정말로 초기화하시겠습니까?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}중계를 이용할까요?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}서버와 연결을 수립하는 데 실패했습니다.{} '{0:STRING}'{G 0 "을" "를"} 통해 연결을 중계하시겠습니까?
STR_NETWORK_ASK_RELAY_NO :{BLACK}아니요
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}이번에만 사용
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}항상 사용

View File

@@ -2166,7 +2166,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Er du s
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Er du sikker på at du vil tilbakestille passordet til firma '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Vil du bruke videresending?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Kunne ikke opprette en kobling mellom deg og serveren.{}Vil du videresende denne økten via '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Nei
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Ja, denne
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Ja, ikke spør igjen

View File

@@ -2542,7 +2542,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Czy na
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Czy na pewno chcesz zresetować hasło firmy „{COMPANY}”?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Używać przekaźnika?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Nie udało się nawiązać połączenia między tobą a serwerem.{}Czy chcesz przekazać tę sesję za pośrednictwem „{STRING}”?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Nie
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Tak, ten jeden raz
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Tak, nie pytaj ponownie

View File

@@ -784,7 +784,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * E
STR_STATUSBAR_AUTOSAVE :{RED}AUTOGUARDADO
STR_STATUSBAR_SAVING_GAME :{RED}* * A GUARDAR JOGO * *
STR_STATUSBAR_SPECATOR :{WHITE}(espectador)
STR_STATUSBAR_SPECTATOR :{WHITE}(espectador)
# News message history
STR_MESSAGE_HISTORY :{WHITE}Histórico de Mensagens
@@ -2114,7 +2114,7 @@ STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Empresa
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Jogadores "online"
# Network client list
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Multi-jogador
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Jogadores "Online"
STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}Servidor
STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}Nome
STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}Nome do servidor onde está a jogar
@@ -2164,7 +2164,7 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Tem a c
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Tem a certeza que quer restabelecer a palavra-chave da empresa '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Usar retransmissão?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Falha ao estabelecer a ligação entre si e o servidor.{}Deseja retransmitir esta sessão via '{STRING}'?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Falha ao estabelecer a ligação entre si e o servidor '{STRING}'.{}Deseja retransmitir esta sessão via '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Não
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Sim, desta vez
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Sim, não perguntar novamente
@@ -2203,7 +2203,7 @@ STR_NETWORK_CHAT_OSKTITLE :{BLACK}Introduz
# Network messages
STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Não foram encontradas interfaces de rede
STR_NETWORK_ERROR_NOSERVER :{WHITE}Não foram encontrados jogos de rede
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}O servidor não respondeu ao pedido
STR_NETWORK_ERROR_NOCONNECTION :{WHITE}A ligação ao servidor atingiu o tempo limite ou foi recusada
STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Impossível ligar devido a incompatibilidade de NewGRF
STR_NETWORK_ERROR_DESYNC :{WHITE}A sincronização do jogo de rede falhou.
STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}A conexão do jogo de rede perdeu-se.
@@ -2286,6 +2286,7 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}O servid
STR_NETWORK_MESSAGE_KICKED :*** {STRING} foi expulso. Motivo: ({STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Falha ao registar o servidor
STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Já foi registado um servidor com o mesmo código de convite. A mudar o tipo de jogo para "local".
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}O seu servidor não permite conexões remotas
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Outros jogadores não conseguirão conetar ao seu servidor

View File

@@ -928,6 +928,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* * П
STR_STATUSBAR_AUTOSAVE :{RED}АВТОСОХРАНЕНИЕ
STR_STATUSBAR_SAVING_GAME :{RED}* * СОХРАНЕНИЕ ИГРЫ * *
STR_STATUSBAR_SPECTATOR :{WHITE}(зритель)
# News message history
STR_MESSAGE_HISTORY :{WHITE}История сообщений
@@ -2313,7 +2314,7 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Уда
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Сбросить пароль у компании «{COMPANY}»?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Использовать транслятор?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Не удалось установить соединение с сервером.{}Перенаправить соединение через «{STRING}»?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Не удалось установить соединение с сервером «{STRING}».{}Перенаправить соединение через «{STRING}»?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Нет
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Да, однократно
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Да, всегда

View File

@@ -783,6 +783,7 @@ STR_STATUSBAR_PAUSED_LINK_GRAPH :{ORANGE}* *
STR_STATUSBAR_AUTOSAVE :{RED}自动保存
STR_STATUSBAR_SAVING_GAME :{RED}* * 保存游戏中 * *
STR_STATUSBAR_SPECTATOR :{WHITE}(旁观者)
# News message history
STR_MESSAGE_HISTORY :{WHITE}消息历史
@@ -949,7 +950,7 @@ STR_GAME_OPTIONS_CURRENCY_MYR :马来西亚林
STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :左侧通行
STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :右侧通行
STR_GAME_OPTIONS_TOWN_NAMES_FRAME :{BLACK}城镇名称
STR_GAME_OPTIONS_TOWN_NAMES_FRAME :{BLACK}城镇名称
STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP :{BLACK}选择城镇名称的命名风格
############ start of townname region
@@ -989,6 +990,7 @@ STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_12_MONTHS :每 12 个月
STR_GAME_OPTIONS_LANGUAGE :{BLACK}语言
STR_GAME_OPTIONS_LANGUAGE_TOOLTIP :{BLACK}选择界面语言
STR_GAME_OPTIONS_LANGUAGE_PERCENTAGE :{STRING} (完成了 {NUM}%)
STR_GAME_OPTIONS_FULLSCREEN :{BLACK}全屏幕
STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP :{BLACK}选择此项可以在全屏幕模式下进行 OpenTTD 游戏
@@ -1198,6 +1200,10 @@ STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :车辆损坏: {
STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS_HELPTEXT :设置运输工具故障率
STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER :补贴系数: {STRING}
STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER_HELPTEXT :设置线路补贴额度
STR_CONFIG_SETTING_SUBSIDY_DURATION :财政补贴尺度:{STRING}
STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :设置发放财政补贴的年数
STR_CONFIG_SETTING_SUBSIDY_DURATION_VALUE :{NUM} 年
STR_CONFIG_SETTING_SUBSIDY_DURATION_DISABLED :没有财政补贴
STR_CONFIG_SETTING_CONSTRUCTION_COSTS :建设费用: {STRING}
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :设置建设费用和交易费用难度
STR_CONFIG_SETTING_RECESSIONS :经济衰退: {STRING}
@@ -1430,6 +1436,11 @@ STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :双击
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :单击(当前焦点)
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :单击 (立即)
STR_CONFIG_SETTING_USE_RELAY_SERVICE :使用中继服务:{STRING}
STR_CONFIG_SETTING_USE_RELAY_SERVICE_HELPTEXT :连接服务器失败时,玩家可以使用中继服务来建立连接。“关闭”禁止中继服务,“询问”先进行询问,“打开”直接使用中继。
STR_CONFIG_SETTING_USE_RELAY_SERVICE_NEVER :关闭
STR_CONFIG_SETTING_USE_RELAY_SERVICE_ASK :询问
STR_CONFIG_SETTING_USE_RELAY_SERVICE_ALLOW :打开
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU :右键模拟: {STRING}
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT :选择模拟鼠标右键的方式
@@ -1783,6 +1794,7 @@ STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :{ORANGE}工业
STR_CONFIG_SETTING_ENVIRONMENT_CARGODIST :{ORANGE}货物分配
STR_CONFIG_SETTING_AI :{ORANGE}竞争
STR_CONFIG_SETTING_AI_NPC :{ORANGE}电脑玩家
STR_CONFIG_SETTING_NETWORK :{ORANGE}网络
STR_CONFIG_SETTING_PATHFINDER_NPF :NPF
STR_CONFIG_SETTING_PATHFINDER_YAPF_RECOMMENDED :YAPF {BLUE}(推荐)
@@ -1988,6 +2000,9 @@ STR_FACE_EARRING :耳环
STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}选择领带或是耳环
############ Next lines match ServerGameType
STR_NETWORK_SERVER_VISIBILITY_LOCAL :本地
STR_NETWORK_SERVER_VISIBILITY_PUBLIC :公开
STR_NETWORK_SERVER_VISIBILITY_INVITE_ONLY :仅限邀请
############ End of leave-in-this-order
# Network server list
@@ -2005,7 +2020,7 @@ STR_NETWORK_SERVER_LIST_MAP_SIZE_CAPTION :{BLACK}地图
STR_NETWORK_SERVER_LIST_MAP_SIZE_CAPTION_TOOLTIP :{BLACK}游戏地图大小{}点击可以按地图大小排列
STR_NETWORK_SERVER_LIST_DATE_CAPTION :{BLACK}日期
STR_NETWORK_SERVER_LIST_DATE_CAPTION_TOOLTIP :{BLACK}当前日期
STR_NETWORK_SERVER_LIST_YEARS_CAPTION :{BLACK}年
STR_NETWORK_SERVER_LIST_YEARS_CAPTION :{BLACK}年
STR_NETWORK_SERVER_LIST_YEARS_CAPTION_TOOLTIP :{BLACK}年数{}游戏正在运行的
STR_NETWORK_SERVER_LIST_INFO_ICONS_TOOLTIP :{BLACK}语言,服务器版本和其他信息
@@ -2022,6 +2037,7 @@ STR_NETWORK_SERVER_LIST_SERVER_VERSION :{SILVER}服务
STR_NETWORK_SERVER_LIST_SERVER_ADDRESS :{SILVER}该服IP: {WHITE}{STRING}
STR_NETWORK_SERVER_LIST_START_DATE :{SILVER}开始日期: {WHITE}{DATE_SHORT}
STR_NETWORK_SERVER_LIST_CURRENT_DATE :{SILVER}当前日期: {WHITE}{DATE_SHORT}
STR_NETWORK_SERVER_LIST_GAMESCRIPT :{SILVER}游戏脚本:{WHITE}{STRING} (v{NUM})
STR_NETWORK_SERVER_LIST_PASSWORD :{SILVER}有密码保护!
STR_NETWORK_SERVER_LIST_SERVER_OFFLINE :{SILVER}服务器离线
STR_NETWORK_SERVER_LIST_SERVER_FULL :{SILVER}服务器满员
@@ -2037,11 +2053,12 @@ STR_NETWORK_SERVER_LIST_SEARCH_SERVER_INTERNET_TOOLTIP :{BLACK}搜索
STR_NETWORK_SERVER_LIST_SEARCH_SERVER_LAN :{BLACK}搜索局域网
STR_NETWORK_SERVER_LIST_SEARCH_SERVER_LAN_TOOLTIP :{BLACK}搜索局域网内的服务器
STR_NETWORK_SERVER_LIST_ADD_SERVER :{BLACK}添加服务器
STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}添加一个永远显示在列表中的服务器
STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}添加一个永远显示在列表中的服务器。可使用服务器地址或邀请码。
STR_NETWORK_SERVER_LIST_START_SERVER :{BLACK}启动服务器
STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP :{BLACK}启动本机作为服务器
STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}输入姓名
STR_NETWORK_SERVER_LIST_ENTER_SERVER_ADDRESS :{BLACK}输入服务器地址或邀请码
# Start new multiplayer server
STR_NETWORK_START_SERVER_CAPTION :{WHITE}开始新的联机游戏
@@ -2051,6 +2068,8 @@ STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}游戏
STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}设置密码:
STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}如果不希望你的游戏被外人加入,请设置一个密码
STR_NETWORK_START_SERVER_VISIBILITY_LABEL :{BLACK}可见度
STR_NETWORK_START_SERVER_VISIBILITY_TOOLTIP :{BLACK}其他玩家能否在公开列表中查看你的服务器
STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} 客户端
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}玩家数目:
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}选择可以参加的玩家上限(达不到此数量仍然可以开始游戏)
@@ -2086,15 +2105,62 @@ STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}服务
STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}公司需要密码:
# Network company list added strings
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :客户端列表
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :在线玩家
# Network client list
STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}在线玩家
STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}服务器
STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}名称
STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}你正在游玩的服务器名称
STR_NETWORK_CLIENT_LIST_SERVER_NAME_EDIT_TOOLTIP :{BLACK}编辑服务器名称
STR_NETWORK_CLIENT_LIST_SERVER_NAME_QUERY_CAPTION :服务器名称
STR_NETWORK_CLIENT_LIST_SERVER_VISIBILITY :{BLACK}可见度
STR_NETWORK_CLIENT_LIST_SERVER_VISIBILITY_TOOLTIP :{BLACK}其他玩家能否在公开列表中查看你的服务器
STR_NETWORK_CLIENT_LIST_SERVER_INVITE_CODE :{BLACK}邀请码
STR_NETWORK_CLIENT_LIST_SERVER_INVITE_CODE_TOOLTIP :{BLACK}其他玩家可使用邀请码加入服务器
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE :{BLACK}连接类型
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_TOOLTIP :{BLACK}其他玩家访问服务器的方式
STR_NETWORK_CLIENT_LIST_PLAYER :{BLACK}玩家
STR_NETWORK_CLIENT_LIST_PLAYER_NAME :{BLACK}名称
STR_NETWORK_CLIENT_LIST_PLAYER_NAME_TOOLTIP :{BLACK}你的玩家名
STR_NETWORK_CLIENT_LIST_PLAYER_NAME_EDIT_TOOLTIP :{BLACK}编辑你的玩家名
STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :你的玩家名
STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_TOOLTIP :{BLACK}要在此客户端执行的管理命令
STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_TOOLTIP :{BLACK}要在此公司执行的管理命令
STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}加入该公司
STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}给这位玩家发消息
STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}给公司中的所有玩家发消息
STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}给所有旁观者发消息
STR_NETWORK_CLIENT_LIST_SPECTATORS :旁观者
STR_NETWORK_CLIENT_LIST_NEW_COMPANY :(新公司)
STR_NETWORK_CLIENT_LIST_NEW_COMPANY_TOOLTIP :{BLACK}新建并加入公司
STR_NETWORK_CLIENT_LIST_PLAYER_ICON_SELF_TOOLTIP :{BLACK}这是你
STR_NETWORK_CLIENT_LIST_PLAYER_ICON_HOST_TOOLTIP :{BLACK}这里是游戏的主机
STR_NETWORK_CLIENT_LIST_CLIENT_COMPANY_COUNT :{BLACK}{NUM}个客户端 / {NUM}个公司
############ Begin of ConnectionType
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_UNKNOWN :{BLACK}本地
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_ISOLATED :{RED}远程玩家无法加入
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_DIRECT :{BLACK}公开
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_STUN :{BLACK}NAT后
STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_TURN :{BLACK}使用中继
############ End of ConnectionType
STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_KICK :踢出
STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_BAN :封禁
STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_RESET :删除
STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_UNLOCK :密码解锁
STR_NETWORK_CLIENT_LIST_ASK_CAPTION :{WHITE}管理命令
STR_NETWORK_CLIENT_LIST_ASK_CLIENT_KICK :{YELLOW}你确定要踢出名为 {STRING} 的玩家吗?
STR_NETWORK_CLIENT_LIST_ASK_CLIENT_BAN :{YELLOW}你确定要封禁名为 {STRING} 的玩家吗?
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}你确定要删除 {COMPANY} 公司吗?
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}你确定要重置 {COMPANY} 的公司密码吗?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}使用中继?
STR_NETWORK_ASK_RELAY_NO :{BLACK}否
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}是,本次请求
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}是,不要再次询问
STR_NETWORK_SERVER :服务器
STR_NETWORK_CLIENT :客户端
@@ -2139,6 +2205,8 @@ STR_NETWORK_ERROR_SERVER_START :{WHITE}无法
STR_NETWORK_ERROR_CLIENT_START :{WHITE}无法连接
STR_NETWORK_ERROR_TIMEOUT :{WHITE}连接 #{NUM} 超时
STR_NETWORK_ERROR_SERVER_ERROR :{WHITE}传输协议错误,连接断开
STR_NETWORK_ERROR_BAD_PLAYER_NAME :{WHITE}你没有设置玩家名。玩家名可在联机游戏窗口的上面设置
STR_NETWORK_ERROR_BAD_SERVER_NAME :{WHITE}你没有设置服务器名。玩家名可在联机游戏窗口的上面设置
STR_NETWORK_ERROR_WRONG_REVISION :{WHITE}此客户端版本与服务器端不匹配
STR_NETWORK_ERROR_WRONG_PASSWORD :{WHITE}密码错误
STR_NETWORK_ERROR_SERVER_FULL :{WHITE}服务器已经满员
@@ -2151,6 +2219,8 @@ STR_NETWORK_ERROR_TIMEOUT_PASSWORD :{WHITE}输入
STR_NETWORK_ERROR_TIMEOUT_COMPUTER :{WHITE}您的计算机联网超时
STR_NETWORK_ERROR_TIMEOUT_MAP :{WHITE}您的计算机下载地图用时过长
STR_NETWORK_ERROR_TIMEOUT_JOIN :{WHITE}您的计算机加入服务器用时过长
STR_NETWORK_ERROR_INVALID_CLIENT_NAME :{WHITE}您的玩家名不合法
STR_NETWORK_ERROR_SERVER_TOO_OLD :{WHITE}请求的服务器版本过低
############ Leave those lines in this order!!
STR_NETWORK_ERROR_CLIENT_GENERAL :一般错误
@@ -2173,6 +2243,7 @@ STR_NETWORK_ERROR_CLIENT_TIMEOUT_PASSWORD :没有在规定
STR_NETWORK_ERROR_CLIENT_TIMEOUT_COMPUTER :超时
STR_NETWORK_ERROR_CLIENT_TIMEOUT_MAP :下载地图用时过长
STR_NETWORK_ERROR_CLIENT_TIMEOUT_JOIN :处理地图用时过长
STR_NETWORK_ERROR_CLIENT_INVALID_CLIENT_NAME :非法客户端名称
############ End of leave-in-this-order
STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION_CAPTION :{WHITE}失去链接
@@ -2207,6 +2278,9 @@ STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}服务
STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}服务器正在重新启动。{}请等待……
STR_NETWORK_MESSAGE_KICKED :*** {STRING} 被踢出服务器。原因:({STRING})
STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}服务器注册失败
STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}您的服务器不允许远程连接
STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{BLACK}其他玩家将无法连接你的服务器
# Content downloading window
STR_CONTENT_TITLE :{WHITE}下载内容
@@ -3013,6 +3087,7 @@ STR_NEWGRF_ERROR_MSG_WARNING :{RED}警告:{
STR_NEWGRF_ERROR_MSG_ERROR :{RED}错误:{SILVER}{STRING}
STR_NEWGRF_ERROR_MSG_FATAL :{RED}严重错误:{SILVER}{STRING}
STR_NEWGRF_ERROR_FATAL_POPUP :{WHITE}发生了一个致命的NewGRF错误{}{STRING}
STR_NEWGRF_ERROR_POPUP :{WHITE}发生了一个NewGRF错误{}{STRING}
STR_NEWGRF_ERROR_VERSION_NUMBER :{1:STRING} 不能与 OpenTTD 报告的 TTDPatch 版本兼容。
STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{1:STRING} 是为 {STRING} 版 TTD 开发的。
STR_NEWGRF_ERROR_UNSET_SWITCH :{1:STRING} 应当与 {STRING} 配合
@@ -3490,7 +3565,7 @@ STR_GROUP_CREATE_TOOLTIP :{BLACK}创建
STR_GROUP_DELETE_TOOLTIP :{BLACK}删除分组
STR_GROUP_RENAME_TOOLTIP :{BLACK}重命名该分组
STR_GROUP_LIVERY_TOOLTIP :{BLACK}改变所选组的配色方案
STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}点击以停止本组自动更新功能的使用
STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}点击以停止本组自动更新功能的使用。按下CTRL并点击来同样应用于子组。
STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}删除分组
STR_GROUP_DELETE_QUERY_TEXT :{WHITE}确定要删除这个分组及其下级分组么?
@@ -3743,7 +3818,9 @@ STR_REPLACE_MAGLEV_VEHICLES :磁悬浮列车
STR_REPLACE_ROAD_VEHICLES :路面交通工具
STR_REPLACE_TRAM_VEHICLES :电车
STR_REPLACE_REMOVE_WAGON :{BLACK}清理挂车({STRING}{ORANGE}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}当车辆升级可能造成列车变长时{}自动从最前面的挂车去掉若干节以保证列车长度不变
STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. 按下CTRL并点击来同样应用于子组
# Vehicle view
STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE}

View File

@@ -2230,7 +2230,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Ste si
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Ste si istý, že chcete zresetovať heslo pre spoločnosť '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Použiť presmerovanie?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Nepodarilo sa uskutočniť pripojenie medzi Vami a servrom.{}Chceli by ste presmerovať toto pripojenie cez '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Nie
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Áno, tentokrát
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Áno, znova sa nepýtať

View File

@@ -2163,7 +2163,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}¿Elimi
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}¿Restablecer contraseña de la empresa "{COMPANY}"?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}¿Utilizar servicio de retransmisión?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}No se pudo establecer una conexión con el servidor.{}¿Deseas retransmitir esta sesión a través de "{STRING}"?
STR_NETWORK_ASK_RELAY_NO :{BLACK}No
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Sí, solo esta vez
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Sí, no volver a preguntar

View File

@@ -2162,7 +2162,6 @@ STR_NETWORK_CLIENT_LIST_ASK_COMPANY_RESET :{YELLOW}Bạn c
STR_NETWORK_CLIENT_LIST_ASK_COMPANY_UNLOCK :{YELLOW}Bạn có muốn đặt lại mật khẩu cho công ty '{COMPANY}'?
STR_NETWORK_ASK_RELAY_CAPTION :{WHITE}Sử dụng chuyển tiếp?
STR_NETWORK_ASK_RELAY_TEXT :{YELLOW}Kết nối tới server thất bại.{}Bạn có muốn chuyển tiếp kết nối của bạn thông qua '{STRING}'?
STR_NETWORK_ASK_RELAY_NO :{BLACK}Không
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Đồng ý, chỉ lần này
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Đồng ý, đừng hỏi lại

View File

@@ -39,6 +39,7 @@ inline void LinkGraph::BaseEdge::Init()
{
this->capacity = 0;
this->usage = 0;
this->travel_time_sum = 0;
this->last_unrestricted_update = INVALID_DATE;
this->last_restricted_update = INVALID_DATE;
this->next_edge = INVALID_NODE;
@@ -74,6 +75,9 @@ void LinkGraph::Compress()
edge.capacity = std::max(1U, edge.capacity / 2);
edge.usage /= 2;
}
if (edge.travel_time_sum > 0) {
edge.travel_time_sum = std::max(1ULL, edge.travel_time_sum / 2);
}
}
}
}
@@ -100,9 +104,11 @@ void LinkGraph::Merge(LinkGraph *other)
backward = other->edges[node2][node1];
forward.capacity = LinkGraph::Scale(forward.capacity, age, other_age);
forward.usage = LinkGraph::Scale(forward.usage, age, other_age);
forward.travel_time_sum = LinkGraph::Scale(forward.travel_time_sum, age, other_age);
if (forward.next_edge != INVALID_NODE) forward.next_edge += first;
backward.capacity = LinkGraph::Scale(backward.capacity, age, other_age);
backward.usage = LinkGraph::Scale(backward.usage, age, other_age);
backward.travel_time_sum = LinkGraph::Scale(backward.travel_time_sum, age, other_age);
if (backward.next_edge != INVALID_NODE) backward.next_edge += first;
}
BaseEdge &new_start = this->edges[new_node][new_node];
@@ -188,13 +194,14 @@ NodeID LinkGraph::AddNode(const Station *st)
* @param usage Usage to be added.
* @param mode Update mode to be used.
*/
void LinkGraph::Node::AddEdge(NodeID to, uint capacity, uint usage, EdgeUpdateMode mode)
void LinkGraph::Node::AddEdge(NodeID to, uint capacity, uint usage, uint32 travel_time, EdgeUpdateMode mode)
{
assert(this->index != to);
BaseEdge &edge = this->edges[to];
BaseEdge &first = this->edges[this->index];
edge.capacity = capacity;
edge.usage = usage;
edge.travel_time_sum = travel_time * capacity;
edge.next_edge = first.next_edge;
first.next_edge = to;
if (mode & EUM_UNRESTRICTED) edge.last_unrestricted_update = _date;
@@ -208,14 +215,14 @@ void LinkGraph::Node::AddEdge(NodeID to, uint capacity, uint usage, EdgeUpdateMo
* @param usage Usage to be added.
* @param mode Update mode to be used.
*/
void LinkGraph::Node::UpdateEdge(NodeID to, uint capacity, uint usage, EdgeUpdateMode mode)
void LinkGraph::Node::UpdateEdge(NodeID to, uint capacity, uint usage, uint32 travel_time, EdgeUpdateMode mode)
{
assert(capacity > 0);
assert(usage <= capacity);
if (this->edges[to].capacity == 0) {
this->AddEdge(to, capacity, usage, mode);
this->AddEdge(to, capacity, usage, travel_time, mode);
} else {
(*this)[to].Update(capacity, usage, mode);
(*this)[to].Update(capacity, usage, travel_time, mode);
}
}
@@ -231,6 +238,7 @@ void LinkGraph::Node::RemoveEdge(NodeID to)
edge.last_unrestricted_update = INVALID_DATE;
edge.last_restricted_update = INVALID_DATE;
edge.usage = 0;
edge.travel_time_sum = 0;
NodeID prev = this->index;
NodeID next = this->edges[this->index].next_edge;
@@ -249,23 +257,37 @@ void LinkGraph::Node::RemoveEdge(NodeID to)
/**
* Update an edge. If mode contains UM_REFRESH refresh the edge to have at
* least the given capacity and usage, otherwise add the capacity and usage.
* least the given capacity and usage, otherwise add the capacity, usage and travel time.
* In any case set the respective update timestamp(s), according to the given
* mode.
* @param capacity Capacity to be added/updated.
* @param usage Usage to be added.
* @param travel_time Travel time to be added, in ticks.
* @param mode Update mode to be applied.
*/
void LinkGraph::Edge::Update(uint capacity, uint usage, EdgeUpdateMode mode)
void LinkGraph::Edge::Update(uint capacity, uint usage, uint32 travel_time, EdgeUpdateMode mode)
{
assert(this->edge.capacity > 0);
assert(capacity >= usage);
if (mode & EUM_INCREASE) {
if (this->edge.travel_time_sum == 0) {
this->edge.travel_time_sum = (this->edge.capacity + capacity) * travel_time;
} else if (travel_time == 0) {
this->edge.travel_time_sum += this->edge.travel_time_sum / this->edge.capacity * capacity;
} else {
this->edge.travel_time_sum += travel_time * capacity;
}
this->edge.capacity += capacity;
this->edge.usage += usage;
} else if (mode & EUM_REFRESH) {
this->edge.capacity = std::max(this->edge.capacity, capacity);
if (this->edge.travel_time_sum == 0) {
this->edge.capacity = std::max(this->edge.capacity, capacity);
this->edge.travel_time_sum = travel_time * this->edge.capacity;
} else if (capacity > this->edge.capacity) {
this->edge.travel_time_sum = this->edge.travel_time_sum / this->edge.capacity * capacity;
this->edge.capacity = capacity;
}
this->edge.usage = std::max(this->edge.usage, usage);
}
if (mode & EUM_UNRESTRICTED) this->edge.last_unrestricted_update = _date;

View File

@@ -62,6 +62,7 @@ public:
struct BaseEdge {
uint capacity; ///< Capacity of the link.
uint usage; ///< Usage of the link.
uint64 travel_time_sum; ///< Sum of the travel times of the link, in ticks.
Date last_unrestricted_update; ///< When the unrestricted part of the link was last updated.
Date last_restricted_update; ///< When the restricted part of the link was last updated.
NodeID next_edge; ///< Destination of next valid edge starting at the same source node.
@@ -97,6 +98,12 @@ public:
*/
uint Usage() const { return this->edge.usage; }
/**
* Get edge's average travel time.
* @return Travel time, in ticks.
*/
uint32 TravelTime() const { return this->edge.travel_time_sum / this->edge.capacity; }
/**
* Get the date of the last update to the edge's unrestricted capacity.
* @return Last update.
@@ -296,7 +303,7 @@ public:
* @param edge Edge to be wrapped.
*/
Edge(BaseEdge &edge) : EdgeWrapper<BaseEdge>(edge) {}
void Update(uint capacity, uint usage, EdgeUpdateMode mode);
void Update(uint capacity, uint usage, uint32 time, EdgeUpdateMode mode);
void Restrict() { this->edge.last_unrestricted_update = INVALID_DATE; }
void Release() { this->edge.last_restricted_update = INVALID_DATE; }
};
@@ -429,8 +436,8 @@ public:
this->node.demand = demand;
}
void AddEdge(NodeID to, uint capacity, uint usage, EdgeUpdateMode mode);
void UpdateEdge(NodeID to, uint capacity, uint usage, EdgeUpdateMode mode);
void AddEdge(NodeID to, uint capacity, uint usage, uint32 time, EdgeUpdateMode mode);
void UpdateEdge(NodeID to, uint capacity, uint usage, uint32 time, EdgeUpdateMode mode);
void RemoveEdge(NodeID to);
};

View File

@@ -284,12 +284,21 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
capacity /= 100;
if (capacity == 0) capacity = 1;
}
/* punish in-between stops a little */
/* Prioritize the fastest route for passengers, mail and express cargo,
* and the shortest route for other classes of cargo.
* In-between stops are punished with a 1 tile or 1 day penalty. */
bool express = IsCargoInClass(this->job.Cargo(), CC_PASSENGERS) ||
IsCargoInClass(this->job.Cargo(), CC_MAIL) ||
IsCargoInClass(this->job.Cargo(), CC_EXPRESS);
uint distance = DistanceMaxPlusManhattan(this->job[from].XY(), this->job[to].XY()) + 1;
/* Compute a default travel time from the distance and an average speed of 1 tile/day. */
uint time = (edge.TravelTime() != 0) ? edge.TravelTime() + DAY_TICKS : distance * DAY_TICKS;
uint distance_anno = express ? time : distance;
Tannotation *dest = static_cast<Tannotation *>(paths[to]);
if (dest->IsBetter(source, capacity, capacity - edge.Flow(), distance)) {
if (dest->IsBetter(source, capacity, capacity - edge.Flow(), distance_anno)) {
annos.erase(dest);
dest->Fork(source, capacity, capacity - edge.Flow(), distance);
dest->Fork(source, capacity, capacity - edge.Flow(), distance_anno);
dest->UpdateAnnotation();
annos.insert(dest);
}

View File

@@ -218,6 +218,12 @@ void LinkRefresher::RefreshStats(const Order *cur, const Order *next)
/* A link is at least partly restricted if a vehicle can't load at its source. */
EdgeUpdateMode restricted_mode = (cur->GetLoadType() & OLFB_NO_LOAD) == 0 ?
EUM_UNRESTRICTED : EUM_RESTRICTED;
Station *st_to = Station::GetIfValid(next_station);
/* This estimates the travel time of the link as the time needed
* to travel between the stations at half the max speed of the consist.
* The result is in tiles/tick (= 2048 km-ish/h). */
uint32 time_estimate = (st_to != nullptr) ?
DistanceManhattan(st->xy, st_to->xy) * 4096U / this->vehicle->GetDisplayMaxSpeed() : 0;
/* If the vehicle is currently full loading, increase the capacities at the station
* where it is loading by an estimate of what it would have transported if it wasn't
@@ -231,15 +237,15 @@ void LinkRefresher::RefreshStats(const Order *cur, const Order *next)
uint effective_capacity = cargo_quantity * this->vehicle->load_unload_ticks;
if (effective_capacity > (uint)this->vehicle->orders.list->GetTotalDuration()) {
IncreaseStats(st, c, next_station, effective_capacity /
this->vehicle->orders.list->GetTotalDuration(), 0,
this->vehicle->orders.list->GetTotalDuration(), 0, 0,
EUM_INCREASE | restricted_mode);
} else if (RandomRange(this->vehicle->orders.list->GetTotalDuration()) < effective_capacity) {
IncreaseStats(st, c, next_station, 1, 0, EUM_INCREASE | restricted_mode);
IncreaseStats(st, c, next_station, 1, 0, 0, EUM_INCREASE | restricted_mode);
} else {
IncreaseStats(st, c, next_station, cargo_quantity, 0, EUM_REFRESH | restricted_mode);
IncreaseStats(st, c, next_station, cargo_quantity, 0, time_estimate, EUM_REFRESH | restricted_mode);
}
} else {
IncreaseStats(st, c, next_station, cargo_quantity, 0, EUM_REFRESH | restricted_mode);
IncreaseStats(st, c, next_station, cargo_quantity, 0, time_estimate, EUM_REFRESH | restricted_mode);
}
}
}

View File

@@ -50,7 +50,7 @@ static const uint16 COMPAT_MTU = 1460; ///< Numbe
static const byte NETWORK_GAME_ADMIN_VERSION = 1; ///< What version of the admin network do we use?
static const byte NETWORK_GAME_INFO_VERSION = 6; ///< What version of game-info do we use?
static const byte NETWORK_COMPANY_INFO_VERSION = 6; ///< What version of company info is this?
static const byte NETWORK_COORDINATOR_VERSION = 5; ///< What version of game-coordinator-protocol do we use?
static const byte NETWORK_COORDINATOR_VERSION = 6; ///< What version of game-coordinator-protocol do we use?
static const uint NETWORK_NAME_LENGTH = 80; ///< The maximum length of the server name and map name, in bytes including '\0'
static const uint NETWORK_COMPANY_NAME_LENGTH = 128; ///< The maximum length of the company name, in bytes including '\0'

View File

@@ -61,9 +61,10 @@ enum ConnectionType {
* The type of error from the Game Coordinator.
*/
enum NetworkCoordinatorErrorType {
NETWORK_COORDINATOR_ERROR_UNKNOWN, ///< There was an unknown error.
NETWORK_COORDINATOR_ERROR_REGISTRATION_FAILED, ///< Your request for registration failed.
NETWORK_COORDINATOR_ERROR_INVALID_INVITE_CODE, ///< The invite code given is invalid.
NETWORK_COORDINATOR_ERROR_UNKNOWN, ///< There was an unknown error.
NETWORK_COORDINATOR_ERROR_REGISTRATION_FAILED, ///< Your request for registration failed.
NETWORK_COORDINATOR_ERROR_INVALID_INVITE_CODE, ///< The invite code given is invalid.
NETWORK_COORDINATOR_ERROR_REUSE_OF_INVITE_CODE, ///< The invite code is used by another (newer) server.
};
/** Base socket handler for all Game Coordinator TCP sockets. */

View File

@@ -135,8 +135,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_ERROR(Packet *p)
return false;
case NETWORK_COORDINATOR_ERROR_REGISTRATION_FAILED:
SetDParamStr(0, detail);
ShowErrorMessage(STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED, STR_JUST_RAW_STRING, WL_ERROR);
ShowErrorMessage(STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED, INVALID_STRING_ID, WL_ERROR);
/* To prevent that we constantly try to reconnect, switch to local game. */
_settings_client.network.server_game_type = SERVER_GAME_TYPE_LOCAL;
@@ -159,6 +158,15 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_ERROR(Packet *p)
return true;
}
case NETWORK_COORDINATOR_ERROR_REUSE_OF_INVITE_CODE:
ShowErrorMessage(STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE, INVALID_STRING_ID, WL_ERROR);
/* To prevent that we constantly battle for the same invite-code, switch to local game. */
_settings_client.network.server_game_type = SERVER_GAME_TYPE_LOCAL;
this->CloseConnection();
return false;
default:
Debug(net, 0, "Invalid error type {} received from Game Coordinator", error);
this->CloseConnection();
@@ -271,7 +279,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_CONNECTING(Packet *p)
}
/* Now store it based on the token. */
this->connecter[token] = connecter_pre_it->second;
this->connecter[token] = {invite_code, connecter_pre_it->second};
this->connecter_pre.erase(connecter_pre_it);
return true;
@@ -370,16 +378,24 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_TURN_CONNECT(Packet *p)
this->game_connecter = nullptr;
}
Debug(misc, 0, "{}", ticket);
this->turn_handlers[token] = ClientNetworkTurnSocketHandler::Turn(token, tracking_number, ticket, connection_string);
if (!_network_server) {
auto connecter_it = this->connecter.find(token);
if (connecter_it == this->connecter.end()) {
/* Make sure we are still interested in connecting to this server. */
this->ConnectFailure(token, 0);
return true;
}
switch (_settings_client.network.use_relay_service) {
case URS_NEVER:
this->ConnectFailure(token, 0);
break;
case URS_ASK:
ShowNetworkAskRelay(connection_string, token);
ShowNetworkAskRelay(connecter_it->second.first, connection_string, token);
break;
case URS_ALLOW:
@@ -571,7 +587,7 @@ void ClientNetworkCoordinatorSocketHandler::ConnectSuccess(const std::string &to
* processes of connecting us. */
auto connecter_it = this->connecter.find(token);
if (connecter_it != this->connecter.end()) {
connecter_it->second->SetConnected(sock);
connecter_it->second.second->SetConnected(sock);
this->connecter.erase(connecter_it);
}
}
@@ -657,7 +673,7 @@ void ClientNetworkCoordinatorSocketHandler::CloseToken(const std::string &token)
/* Close the caller of the connection attempt. */
auto connecter_it = this->connecter.find(token);
if (connecter_it != this->connecter.end()) {
connecter_it->second->SetFailure();
connecter_it->second.second->SetFailure();
this->connecter.erase(connecter_it);
}
}
@@ -677,7 +693,7 @@ void ClientNetworkCoordinatorSocketHandler::CloseAllConnections()
for (auto &[token, it] : this->connecter) {
this->CloseStunHandler(token);
this->CloseTurnHandler(token);
it->SetFailure();
it.second->SetFailure();
/* Inform the Game Coordinator he can stop trying to connect us to the server. */
this->ConnectFailure(token, 0);

View File

@@ -54,7 +54,7 @@
class ClientNetworkCoordinatorSocketHandler : public NetworkCoordinatorSocketHandler {
private:
std::chrono::steady_clock::time_point next_update; ///< When to send the next update (if server and public).
std::map<std::string, TCPServerConnecter *> connecter; ///< Based on tokens, the current connecters that are pending.
std::map<std::string, std::pair<std::string, TCPServerConnecter *>> connecter; ///< Based on tokens, the current (invite-code, connecter) that are pending.
std::map<std::string, TCPServerConnecter *> connecter_pre; ///< Based on invite codes, the current connecters that are pending.
std::map<std::string, std::map<int, std::unique_ptr<ClientNetworkStunSocketHandler>>> stun_handlers; ///< All pending STUN handlers, stored by token:family.
std::map<std::string, std::unique_ptr<ClientNetworkTurnSocketHandler>> turn_handlers; ///< Pending TURN handler (if any), stored by token.

View File

@@ -2079,7 +2079,7 @@ public:
this->DrawCompany(c->index, r.left, r.right, r.top, line);
}
/* Specators */
/* Spectators */
this->DrawCompany(COMPANY_SPECTATOR, r.left, r.right, r.top, line);
break;
@@ -2361,13 +2361,18 @@ void ShowNetworkCompanyPasswordWindow(Window *parent)
}
/**
* Window used for asking the user if he is okay using a TURN server.
* Window used for asking the user if he is okay using a relay server.
*/
struct NetworkAskRelayWindow : public Window {
std::string connection_string; ///< The TURN server we want to connect to.
std::string token; ///< The token for this connection.
std::string server_connection_string; ///< The game server we want to connect to.
std::string relay_connection_string; ///< The relay server we want to connect to.
std::string token; ///< The token for this connection.
NetworkAskRelayWindow(WindowDesc *desc, Window *parent, const std::string &connection_string, const std::string &token) : Window(desc), connection_string(connection_string), token(token)
NetworkAskRelayWindow(WindowDesc *desc, Window *parent, const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token) :
Window(desc),
server_connection_string(server_connection_string),
relay_connection_string(relay_connection_string),
token(token)
{
this->parent = parent;
this->InitNested(0);
@@ -2400,7 +2405,8 @@ struct NetworkAskRelayWindow : public Window {
{
switch (widget) {
case WID_NAR_TEXT:
SetDParamStr(0, this->connection_string);
SetDParamStr(0, this->server_connection_string);
SetDParamStr(1, this->relay_connection_string);
break;
}
}
@@ -2451,13 +2457,14 @@ static WindowDesc _network_ask_relay_desc(
/**
* Show a modal confirmation window with "no" / "yes, once" / "yes, always" buttons.
* @param connection_string The relay server we want to connect to.
* @param server_connection_string The game server we want to connect to.
* @param relay_connection_string The relay server we want to connect to.
* @param token The token for this connection.
*/
void ShowNetworkAskRelay(const std::string &connection_string, const std::string &token)
void ShowNetworkAskRelay(const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token)
{
CloseWindowByClass(WC_NETWORK_ASK_RELAY);
Window *parent = FindWindowById(WC_MAIN_WINDOW, 0);
new NetworkAskRelayWindow(&_network_ask_relay_desc, parent, connection_string, token);
new NetworkAskRelayWindow(&_network_ask_relay_desc, parent, server_connection_string, relay_connection_string, token);
}

View File

@@ -23,6 +23,7 @@ void ShowJoinStatusWindow();
void ShowNetworkGameWindow();
void ShowClientList();
void ShowNetworkCompanyPasswordWindow(Window *parent);
void ShowNetworkAskRelay(const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token);
/** Company information stored at the client side */
@@ -37,6 +38,5 @@ struct NetworkCompanyInfo : NetworkCompanyStats {
std::string clients; ///< The clients that control this company (Name1, name2, ..)
};
void ShowNetworkAskRelay(const std::string &connection_string, const std::string &token);
#endif /* NETWORK_GUI_H */

View File

@@ -1541,13 +1541,12 @@ static void NetworkAutoCleanCompanies()
bool NetworkMakeClientNameUnique(std::string &name)
{
bool is_name_unique = false;
uint number = 0;
std::string original_name = name;
while (!is_name_unique) {
for (uint number = 1; !is_name_unique && number <= MAX_CLIENTS; number++) { // Something's really wrong when there're more names than clients
is_name_unique = true;
for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {
if (ci->client_name.compare(name) == 0) {
if (ci->client_name == name) {
/* Name already in use */
is_name_unique = false;
break;
@@ -1556,7 +1555,7 @@ bool NetworkMakeClientNameUnique(std::string &name)
/* Check if it is the same as the server-name */
const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER);
if (ci != nullptr) {
if (ci->client_name.compare(name) == 0) is_name_unique = false; // name already in use
if (ci->client_name == name) is_name_unique = false; // name already in use
}
if (!is_name_unique) {
@@ -1661,9 +1660,9 @@ void NetworkServer_Tick(bool send_frame)
/* Client did still not report in within the specified limit. */
IConsolePrint(CC_WARNING, cs->last_packet + std::chrono::milliseconds(lag * MILLISECONDS_PER_TICK) > std::chrono::steady_clock::now() ?
/* A packet was received in the last three game days, so the client is likely lagging behind. */
"Client #%u (IP: %s) is dropped because the client's game state is more than %d ticks behind." :
"Client #{} (IP: {}) is dropped because the client's game state is more than {} ticks behind." :
/* No packet was received in the last three game days; sounds like a lost connection. */
"Client #%u (IP: %s) is dropped because the client did not respond for more than %d ticks.",
"Client #{} (IP: {}) is dropped because the client did not respond for more than {} ticks.",
cs->client_id, cs->GetClientIP(), lag);
cs->SendError(NETWORK_ERROR_TIMEOUT_COMPUTER);
continue;

View File

@@ -33,6 +33,7 @@ public:
inline static const SaveLoad description[] = {
SLE_VAR(Edge, capacity, SLE_UINT32),
SLE_VAR(Edge, usage, SLE_UINT32),
SLE_CONDVAR(Edge, travel_time_sum, SLE_UINT64, SLV_LINKGRAPH_TRAVEL_TIME, SL_MAX_VERSION),
SLE_VAR(Edge, last_unrestricted_update, SLE_INT32),
SLE_CONDVAR(Edge, last_restricted_update, SLE_INT32, SLV_187, SL_MAX_VERSION),
SLE_VAR(Edge, next_edge, SLE_UINT16),

View File

@@ -337,6 +337,7 @@ enum SaveLoadVersion : uint16 {
SLV_TABLE_CHUNKS, ///< 295 PR#9322 Introduction of CH_TABLE and CH_SPARSE_TABLE.
SLV_SCRIPT_INT64, ///< 296 PR#9415 SQInteger is 64bit but was saved as 32bit.
SLV_LINKGRAPH_TRAVEL_TIME, ///< 297 PR#9457 Store travel time in the linkgraph.
SL_MAX_VERSION, ///< Highest possible saveload version
};

View File

@@ -2359,7 +2359,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
InvalidateWindowData(WC_STATION_VIEW, st->index, -1);
if (_settings_game.economy.station_noise_level) {
SetWindowDirty(WC_TOWN_VIEW, st->town->index);
SetWindowDirty(WC_TOWN_VIEW, nearest->index);
}
}
@@ -2407,6 +2407,10 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
uint dist;
Town *nearest = AirportGetNearestTown(as, it, dist);
nearest->noise_reached -= GetAirportNoiseLevelForDistance(as, dist);
if (_settings_game.economy.station_noise_level) {
SetWindowDirty(WC_TOWN_VIEW, nearest->index);
}
}
for (TileIndex tile_cur : st->airport) {
@@ -2435,10 +2439,6 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
InvalidateWindowData(WC_STATION_VIEW, st->index, -1);
if (_settings_game.economy.station_noise_level) {
SetWindowDirty(WC_TOWN_VIEW, st->town->index);
}
Company::Get(st->owner)->infrastructure.airport--;
st->AfterStationTileSetChange(false, STATION_AIRPORT);
@@ -3737,7 +3737,7 @@ void DeleteStaleLinks(Station *from)
* @param usage Usage to add to link stat.
* @param mode Update mode to be applied.
*/
void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint capacity, uint usage, EdgeUpdateMode mode)
void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint capacity, uint usage, uint32 time, EdgeUpdateMode mode)
{
GoodsEntry &ge1 = st->goods[cargo];
Station *st2 = Station::Get(next_station_id);
@@ -3779,7 +3779,7 @@ void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint c
}
}
if (lg != nullptr) {
(*lg)[ge1.node].UpdateEdge(ge2.node, capacity, usage, mode);
(*lg)[ge1.node].UpdateEdge(ge2.node, capacity, usage, time, mode);
}
}
@@ -3789,7 +3789,7 @@ void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint c
* @param front First vehicle in the consist.
* @param next_station_id Station the consist will be travelling to next.
*/
void IncreaseStats(Station *st, const Vehicle *front, StationID next_station_id)
void IncreaseStats(Station *st, const Vehicle *front, StationID next_station_id, uint32 time)
{
for (const Vehicle *v = front; v != nullptr; v = v->Next()) {
if (v->refit_cap > 0) {
@@ -3800,7 +3800,7 @@ void IncreaseStats(Station *st, const Vehicle *front, StationID next_station_id)
* As usage is not such an important figure anyway we just
* ignore the additional cargo then.*/
IncreaseStats(st, v->cargo_type, next_station_id, v->refit_cap,
std::min<uint>(v->refit_cap, v->cargo.StoredCount()), EUM_INCREASE);
std::min<uint>(v->refit_cap, v->cargo.StoredCount()), time, EUM_INCREASE);
}
}
}

View File

@@ -52,8 +52,8 @@ void UpdateAirportsNoise();
bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset);
void IncreaseStats(Station *st, const Vehicle *v, StationID next_station_id);
void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint capacity, uint usage, EdgeUpdateMode mode);
void IncreaseStats(Station *st, const Vehicle *v, StationID next_station_id, uint32 time);
void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint capacity, uint usage, uint32 time, EdgeUpdateMode mode);
void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2);
/**

View File

@@ -148,7 +148,7 @@ struct StatusBarWindow : Window {
case WID_S_RIGHT: {
if (_local_company == COMPANY_SPECTATOR) {
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, text_top, STR_STATUSBAR_SPECATOR, TC_FROMSTRING, SA_HOR_CENTER);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, text_top, STR_STATUSBAR_SPECTATOR, TC_FROMSTRING, SA_HOR_CENTER);
} else {
/* Draw company money, if any */
const Company *c = Company::GetIfValid(_local_company);

View File

@@ -2100,6 +2100,7 @@ void Vehicle::BeginLoading()
{
assert(IsTileType(this->tile, MP_STATION) || this->type == VEH_SHIP);
uint32 travel_time = this->current_order_time;
if (this->current_order.IsType(OT_GOTO_STATION) &&
this->current_order.GetDestination() == this->last_station_visited) {
this->DeleteUnreachedImplicitOrders();
@@ -2206,7 +2207,7 @@ void Vehicle::BeginLoading()
this->last_loading_station != this->last_station_visited &&
((this->current_order.GetLoadType() & OLFB_NO_LOAD) == 0 ||
(this->current_order.GetUnloadType() & OUFB_NO_UNLOAD) == 0)) {
IncreaseStats(Station::Get(this->last_loading_station), this, this->last_station_visited);
IncreaseStats(Station::Get(this->last_loading_station), this, this->last_station_visited, travel_time);
}
PrepareUnload(this);