1
0
Fork 0

Compare commits

...

5 Commits

Author SHA1 Message Date
SamuXarick b1dc6226d2
Merge 8031d68d01 into 1d21edde8d 2025-07-21 04:48:02 +00:00
translators 1d21edde8d Update: Translations from eints
english (us): 1 change by 2TallTyler
2025-07-21 04:47:54 +00:00
SamuXarick 8031d68d01 Change: Ships may reverse on find closest depot order
Ships may be allowed to reverse when:
- manually ordered to find the closest ship depot.
- executing an updated order to find the closest ship depot after departing from a station.
2025-05-24 18:08:46 +01:00
SamuXarick 7df9426000 Change: Find nearest depot to entry edge in intermediate region
When using an intermediate region, find the depot closest to the edge where it entered the region from.
2025-05-24 18:08:46 +01:00
Samu 0b44deedd0 Fix #5713: Use pathfinder to find closest ship depot
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder.
2025-05-24 18:05:59 +01:00
48 changed files with 269 additions and 174 deletions

View File

@ -110,7 +110,7 @@ struct Aircraft final : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
uint Crash(bool flooded = false) override;
TileIndex GetOrderStationLocation(StationID station) override;
TileIndex GetCargoTile() const override { return this->First()->tile; }
ClosestDepot FindClosestDepot() override;
ClosestDepot FindClosestDepot(bool may_reverse = false) override;
/**
* Check if the aircraft type is a normal flying device; eg

View File

@ -396,7 +396,7 @@ CommandCost CmdBuildAircraft(DoCommandFlags flags, TileIndex tile, const Engine
}
ClosestDepot Aircraft::FindClosestDepot()
ClosestDepot Aircraft::FindClosestDepot([[maybe_unused]] bool may_reverse)
{
const Station *st = GetTargetAirportIfValid(this);
/* If the station is not a valid airport or if it has no hangars */

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Não mos
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostrar/Ocultar gráfico para este tipo de carga
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Histórico da Produção
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzido
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produç
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produção no último minuto:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centralizar visualização principal na localização da indústria. Ctrl+Clique para abrir uma nova visualização na localização da indústria
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Produção
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar gráfico do histórico de produção da indústria
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou fechamento iminente!

View File

@ -628,7 +628,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Скри
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Активирай/деактивирай графиката за видовете товар
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - История на производството
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Покажи подробен рейтинг на представянето
@ -3967,8 +3966,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Прои
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Произведено последната минута:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% превозено)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Центриране камерата върху индустрията. Ctrl+Click отваря прозорец с нов изглед към индустрията
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Производствена графика
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Показва графиката на производствената история на индустрията
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ниво на производство: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Индустрията обяви незабавна ликвидация!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}No mostr
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostra/amaga el tipus de càrrega al gràfic
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de producció
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produït
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportat
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producció durant l'últim minut:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transportat)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra la vista principal al lloc de la indústria. Amb Ctrl+clic, s'obre una vista nova centrada al lloc on és la indústria.
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gràfic de producció
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostra el gràfic de l'evolució de la producció de la indústria.
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivell de producció: {YELLOW}{COMMA}{NBSP}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La indústria ha anunciat la seva clausura imminent!

View File

@ -720,7 +720,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Skryje v
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Zobrazit nebo skrýt graf pro určitý druh nákladu
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historie produkce
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Vyprodukováno
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Přepraveno
@ -4069,8 +4068,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkce
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produkce v minulé minutě:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% přepraveno)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vystředit pohled na průmysl. Ctrl+Klik otevře nový pohled na umístění průmyslu
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graf výroby
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Zobrazí graf historie produkce průmyslu
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkce: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Průmysl oznámila blížící se uzavření!

View File

@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Vis inte
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Skift grafen for denne lasttype til/fra
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorie
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produceret
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporteret
@ -4013,8 +4012,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion sidste minut:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transporteret)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer skærmen over industriens lokalitet. Ctrl+Klik åbner et nyt vindue ved industriens lokalitet.
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraf
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Viser grafen over industriens produktionshistorie
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktions niveauet: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrien har rapporteret øjeblikkelig nedlukning!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Geen vra
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Grafiek voor dit vrachttype weergeven-verbergen
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Productiegeschiedenis
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Geproduceerd
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Vervoerd
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Productie vorige minuut:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% vervoerd)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreer het hoofdscherm op de locatie van de industrie. Ctrl+klik opent een nieuws venster op de locatie van de industrie
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Productiegrafiek
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Geeft de grafiek weer van de productiegeschiedenis van de industrie
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Productieniveau: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}De industrie heeft een dreigende sluiting aangekondigd!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Display
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toggle graph of this cargo type
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Production History
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production last minute:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click to open a new viewport on industry location
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Production Graph
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Shows the graph of industry production history
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Display
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toggle graph of this cargo type
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Production History
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production last minute:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center the main view on industry location. Ctrl+Click to open a new viewport on industry location
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Production Graph
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Shows the graph of industry production history
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
@ -5001,6 +4998,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Flat lan
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
STR_ERROR_CAN_T_DO_THIS :{WHITE}Can't do this...
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Building must be demolished first
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... building is protected
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Can't clear this area...
STR_ERROR_SITE_UNSUITABLE :{WHITE}... site unsuitable
STR_ERROR_ALREADY_BUILT :{WHITE}... already built

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Älä n
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Valitse, näytetäänkö tämän rahdin kuvaaja
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} Tuotantohistoria
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Tuotettu
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Kuljetettu
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Tuotanto
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Tuotanto viime minuutissa:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% kuljetettu)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Keskitä päänäkymä tuotantolaitoksen sijaintiin. Ctrl+napsautus avataksesi uuden näkymäikkunan laitoksen sijaintiin
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Tuotannon kuvaaja
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Näyttää tuotantohistorian kuvaajana
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tuotantotaso: {YELLOW}{COMMA}{NBSP}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Teollisuuslaitos ilmoittaa välittömästä lakkautuksesta!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}N'affich
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Afficher/Cacher le type de marchandise
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historique de production
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produit
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporté
@ -4002,8 +4001,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production la minute précédente{NBSP}:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transporté{P "" s})
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer la vue sur l'industrie. Ctrl-clic pour ouvrir une nouvelle vue sur l'industrie.
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graphe de production
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Affiche le graphe de l'historique de la production des industries
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Niveau de production{NBSP}: {YELLOW}{COMMA}{NBSP}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industrie a annoncé sa fermeture imminente{NBSP}!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Non amos
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Amosar/ocultar gráfica para o tipo de carga
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de produción
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produci
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción no último minuto:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar a vista principal na localización da industria. Ctrl+Clic abre unha nova fiestra na localización da industria
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de produción
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Amosa o gráfico co histórico de produción industrial
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de produción: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A industria anunció un peche inminente

View File

@ -627,7 +627,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Zeige ke
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Diagramm für diesen Frachttyp ein/aus
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorie
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Zeige detailierte Leistungsaufschlüsselung
@ -3958,8 +3957,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion in der letzten Minute:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% befördert)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Hauptansicht auf den Industriestandort zentrieren. Mit Strg+Klick wird eine neue Zusatzansicht auf den Industriestandort geöffnet
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraph
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Zeigt den Graphen der Produktionshistorie der Industrie an
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsrate: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Diese Industrie wird in Kürze schließen!

View File

@ -727,7 +727,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Εμφά
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Εναλλαγή γραφήματος αυτού του τύπου φορτίου
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Ιστορικό Παραγωγής
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Παράχθηκε/αν
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Μεταφέρθηκε/αν
@ -4118,8 +4117,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Παρα
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Παραγωγή τελευταίου λεπτού:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% μεταφέρθηκαν)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Κεντράρισμα εικόνας στην περιοχή της βιομηχανίας. Ctrl+Κλικ για άνοιγμα νέου παραθύρου προβολής στην περιοχή της βιομηχανίας
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Γράφημα Παραγωγής
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Εμφανίζει το γράφημα ιστορικού παραγωγής της βιομηχανίας
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Επίπεδο παραγωγής: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Η βιομηχανία έχει ανακοινώσει άμεσο κλείσιμο!

View File

@ -697,7 +697,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ne mutas
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Adott rakomány grafikonjának mutatása be/ki
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Termelési előzmények
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Előállított
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Szállítva
@ -4088,8 +4087,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Múlt ha
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Termelés az elmúlt percben:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% elszállítva)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}A fő nézetet a gazdasági épületre állítja. Ctrl+kattintással új nézet nyílik a gazdasági épület helyzeténél
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Termelési grafikon
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Megjeleníti az ipar termelési történetének grafikonját
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Termelési szint: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A gyár bejelentette a közelgő bezárását!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}화물
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}이 화물의 그래프를 표시하거나 숨깁니다
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 생산량 이력
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :생산량
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :수송량
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}지난
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}지난 1분간 생산량:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% 수송됨)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}이 산업시설로 이동합니다. CTRL+클릭하면 이 산업시설을 기준으로 새로운 외부 화면을 엽니다
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}생산량 그래프
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}산업시설 생산량 이력 그래프를 보여줍니다
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}생산 수준: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}산업시설이 곧 폐쇄됩니다!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Nerādī
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Paslēgt kravas veida diagrammu
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Ražošanas Vēsture
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Saražots
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Pārvadāts
@ -4021,8 +4020,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Iepriek
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Ražošanas pēdējā minūtē:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (pārvadāti {COMMA}%)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrēt galveno skatu uz ražotni. Ctrl+klikšķis atvērs skatu uz ražotni jaunā skatlaukā
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Ražošanas Grafiks
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Parāda nozares ražošanas vēstures grafiku
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ražošanas līmenis: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nozare ir paziņojusi par nenovēršamu slēgšanu!

View File

@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Keng Wue
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Schalt d'Grafik fir de Wuerentyp em
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktiounshistorie
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzéiert
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportéiert
@ -3994,8 +3993,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktioun déi läscht Minutt:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportéiert)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Zentréiert d'Siicht op d'Industrie. Ctrl+Klick erstellt eng nei Usiicht op d'Industrie
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktiounsgrafik
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Weist d'Grafik vun der Industrieproduktiounshistorie un
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktiounslevel: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'Industrie annoncéiert dass se zougemaach gëtt

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Skjul al
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Vis/skjul graf for en bestemt varetype
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produksjonshistorikk
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produsert
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportert
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produksj
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produksjon forrige minutt:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transportert)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Sentrer hovedvisningen på industrilokasjon. Ctrl+klikk for å åpne et nytt tilleggsvindu på industrilokasjon
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graf over produksjon
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Viser grafen for industriell produksjonshistorikk
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Næringen har annonsert snarlig nedleggelse!

View File

@ -1013,7 +1013,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ukryj ws
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Przełącz ukrywanie/wyświetlanie wykresu danego typu ładunku
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historia Produkcji
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Wyprodukowano
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Przetransportowano
@ -4404,8 +4403,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Wyproduk
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Wyprodukowano w poprzedniej minucie:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% przetransportowano)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Wyśrodkuj widok główny na lokalizacji przedsiębiorstwa. Użyj Ctrl, aby otworzyć nowy podgląd na jego lokalizację
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Wykres Produkcji
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Wyświetl wykres historii produkcji tego przedsiębiorstwa
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Poziom produkcji: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Przedsiębiorstwo ogłosiło likwidację!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Não mos
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Alternar o gráfico para este tipo de carga
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Histórico da Produção
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzido
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produç
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produção no último minuto:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização da indústria. Ctrl+Clique para abrir um novo visualizador na localização da indústria
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Produção
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar gráfico do histórico de produção da indústria
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou encerramento iminente!

View File

@ -3976,8 +3976,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producț
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producție în ultimul minut:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportat)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrează imaginea pe locația industriei. Ctrl+Click pentru a deshide o fereastra cu locația industriei
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Grafic de producție
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Arată graficul de producție istoric al industriei
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivelul producției: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industria a anunțat închiderea iminentă!

View File

@ -772,7 +772,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Скры
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Включить/отключить отображение груза на графике
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}График производительности: {INDUSTRY}
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Произведено
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Перевезено
@ -4199,8 +4198,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Прои
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Произведено за минуту:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% перевезено)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Показать предприятие в основном окне. Ctrl+щелчок{NBSP}- показать в дополнительном окне.
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}График производительности
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Показать график производительности этого предприятия
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производительность: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Предприятие скоро закрывается!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}在货
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}切换显示货物
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 产量历史
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :已生产
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :已运输
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}上月
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}上分钟产量:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK}(已运输 {COMMA}%
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到当前工业的位置。按住 <Ctrl> 键点选会在新视点中显示工业位置
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}产量图表
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}显示工业产量历史图表
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生产等级:{YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}此工业已经宣布即刻停业倒闭!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Oculta t
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Alterna entre mostrar/ocultar la gráfica para este tipo de carga
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de Producción
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
@ -4011,8 +4010,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción el minuto anterior:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra la vista principal sobre la industria. Ctrl+clic abre un punto de vista en dicha posición
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Producción
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Muestra el gráfico del historial de producción de la industria
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La industria ha anunciado su cierre inminente!

View File

@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ocultar
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostrar u ocultar gráfica de este tipo de carga
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de producción
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción último minuto:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportad{G 0 o a o a}{P 0 "" s})
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar vista en la industria. Ctrl+Clic abre una vista aparte en su ubicación
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfica de producción
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar la gráfica histórica de producción de la industria
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}¡La industria ha anunciado su cierre inminente!

View File

@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Visa ing
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Slå på/av denna godstyps graf
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorik
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producerat
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporterat
@ -4001,8 +4000,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion förra minuten:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transporterat)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför industrin. Ctrl+Klick för att öppna en ny fönstervy industrins läge
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraf
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Visar en graf över den historiska industriproduktionen
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsnivå: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrin har annonserat att den snart kommer att stänga!

View File

@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}於貨
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}切換該貨物類型圖示
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 產量歷史
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :已產出
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :已運送
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}上月
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}上分鐘產量︰
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (運送了 {COMMA}%)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}將工業置於畫面正中央。按住 <Ctrl> 點選可於工業位置開啟新檢視視窗
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}產量圖表
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}顯示工業產量歷史圖表
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}產出等級:{YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}該工業已宣佈關閉!

View File

@ -770,7 +770,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Не п
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Ввімк/вимик графік типів вантажу
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Історія виробництва
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Вироблено
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Перевезено
@ -4150,8 +4149,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Виро
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Вироблено за минулу хвилину:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% перевезено)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Показати підприємство у центрі екрану. Ctrl+клац мишею відкриє нове вікно з видом на підприємство
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Графік продуктивності
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Відобразити графік продуктивності підприємства
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Обсяг виробництва: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Підприємство оголосило про близьке закриття!

View File

@ -627,7 +627,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Không h
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Bật/tắt đồ thị cho hàng hóa này
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Lịch Sử Sản Xuất
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Đã cung cấp
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Đã vận chuyển
@ -3976,8 +3975,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Sản l
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Sản lượng phút trước:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% đã vận chuyển)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Xem vị trí trung tâm của nhà máy. Ctrl+Click mở cửa sổ mới để xem
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Biểu Đồ Sản Xuất
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Hiển thị biểu đồ lịch sử sản xuất của nhà máy
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Mức sản lượng: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nhà máy này đã thông báo sắp đóng cửa!

View File

@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Peidio a
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toglu'r graff ar gyfer y math llwyth yma
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Hanes Cynhyrchu
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Cynhyrchwyd
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Cludwyd
@ -3994,8 +3993,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Cynnyrch
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Cynnyrch y munud olaf:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% wedi'i gludo)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Canoli'r brif olygfa ar y diwydiant. Ctrl+Clic i agor ffenest golwg newydd ar leoliad y diwydiant
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graff Cynhyrchiant
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Dangos graff o hanes cynhyrchu diwydiant
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Lefel cynhyrchu: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Mae'r diwydiant wedi datgan ei fod ar fin cau!

View File

@ -1896,10 +1896,11 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v)
* Update the vehicle's destination tile from an order.
* @param order the order the vehicle currently has
* @param v the vehicle to update
* @param may_reverse Whether the vehicle is allowed to reverse when executing the updated order.
* @param conditional_depth the depth (amount of steps) to go with conditional orders. This to prevent infinite loops.
* @param pbs_look_ahead Whether we are forecasting orders for pbs reservations in advance. If true, the order indices must not be modified.
*/
bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool pbs_look_ahead)
bool UpdateOrderDest(Vehicle *v, const Order *order, bool may_reverse, int conditional_depth, bool pbs_look_ahead)
{
if (conditional_depth > v->GetNumOrders()) {
v->current_order.Free();
@ -1926,7 +1927,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
if (v->dest_tile == 0 && TimerGameEconomy::date_fract != (v->index % Ticks::DAY_TICKS)) break;
/* We need to search for the nearest depot (hangar). */
ClosestDepot closest_depot = v->FindClosestDepot();
ClosestDepot closest_depot = v->FindClosestDepot(may_reverse);
if (closest_depot.found) {
/* PBS reservations cannot reverse */
@ -2018,7 +2019,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
}
v->current_order = *order;
return UpdateOrderDest(v, order, conditional_depth + 1, pbs_look_ahead);
return UpdateOrderDest(v, order, may_reverse, conditional_depth + 1, pbs_look_ahead);
}
/**
@ -2116,7 +2117,7 @@ bool ProcessOrders(Vehicle *v)
break;
}
return UpdateOrderDest(v, order) && may_reverse;
return UpdateOrderDest(v, order, may_reverse) && may_reverse;
}
/**

View File

@ -20,7 +20,7 @@ void InvalidateVehicleOrder(const Vehicle *v, int data);
void CheckOrders(const Vehicle*);
void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist = false, bool reset_order_indices = true);
bool ProcessOrders(Vehicle *v);
bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth = 0, bool pbs_look_ahead = false);
bool UpdateOrderDest(Vehicle *v, const Order *order, bool may_reverse = false, int conditional_depth = 0, bool pbs_look_ahead = false);
VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v);
uint GetOrderDistance(VehicleOrderID prev, VehicleOrderID cur, const Vehicle *v, int conditional_depth = 0);

View File

@ -430,3 +430,83 @@ void PrintWaterRegionDebugInfo(TileIndex tile)
{
GetUpdatedWaterRegion(tile).PrintDebugInfo();
}
/**
* Tests the provided callback function on all tiles of the water patch of the region
* and returns true on the first tile that passes the callback test.
* @param callback The test function that will be called for the water patch.
* @param water_region_patch Water patch within the water region to test the callback.
* @return true if it passes the callback test, or false if the callback failed.
*/
bool TestTileInWaterRegionPatch(const WaterRegionPatchDesc &water_region_patch, TestTileIndexCallBack &callback)
{
const WaterRegion region = GetUpdatedWaterRegion(water_region_patch.x, water_region_patch.y);
/* Check if the region has a tile which passes the callback test. */
for (const TileIndex tile : region) {
if (region.GetLabel(tile) != water_region_patch.label || !callback(tile)) continue;
return true;
}
return false;
}
/**
* Tests the provided callback function on all tiles of the current water patch of the region, collects the
* tiles which passed the callback and returns the tile closest to the edge from where the region is entered from.
* @param high_level_path A span containing at least current and parent water patches.
* @param callback The test function that will be called for each tile in the water patch.
* @return The tile closest to the edge from where it came from that passed the callback test, or INVALID_TILE if no tile passed.
*/
TileIndex FindClosestEnteringTile(const std::span<WaterRegionPatchDesc> high_level_path, TestTileIndexCallBack &callback)
{
assert(high_level_path.size() > 1);
const WaterRegionPatchDesc &current_water_region_patch = high_level_path.back();
const WaterRegion current_region = GetUpdatedWaterRegion(current_water_region_patch.x, current_water_region_patch.y);
/* Check if the current region has a tile which passes the callback test. */
std::vector<TileIndex> tile_list;
for (const TileIndex tile : current_region) {
if (current_region.GetLabel(tile) != current_water_region_patch.label || !callback(tile)) continue;
/* We collect the tiles when we know which region we came from for further evaluation. */
tile_list.push_back(tile);
}
/* If there aren't any tiles that passed the callback, return with an invalid tile. */
if (tile_list.empty()) return INVALID_TILE;
/* If there's only one, just return it. */
if (tile_list.size() == 1) return tile_list.front();
const TileIndex top_tile = current_region.begin();
const TileIndex bot_tile = TileAddXY(top_tile, WATER_REGION_EDGE_LENGTH - 1, WATER_REGION_EDGE_LENGTH - 1);
/* Get the side from which the current region is entered from. */
const WaterRegionPatchDesc &parent_water_region_patch = high_level_path[high_level_path.size() - 2];
const WaterRegion parent_region = GetUpdatedWaterRegion(parent_water_region_patch.x, parent_water_region_patch.y);
const DiagDirection side = DiagdirBetweenTiles(top_tile, parent_region.begin());
/* Depending on the side, determine which corner tile to use to extract their x or y coordinates. */
const bool is_at_top = side == DIAGDIR_NE || side == DIAGDIR_NW;
const TileIndex edge_tile = is_at_top ? top_tile : bot_tile;
const bool is_axis_x = DiagDirToAxis(side) == AXIS_X;
const int x_or_y_edge = is_axis_x ? TileX(edge_tile) : TileY(edge_tile);
/* With more than one tile passing the callback, calculate the tile that is closest to the edge from whence it came. */
TileIndex best_tile = INVALID_TILE;
int best_dist = WATER_REGION_EDGE_LENGTH;
for (const TileIndex &tile : tile_list) {
const int x_or_y_tile = is_axis_x ? TileX(tile) : TileY(tile);
const int dist_to_edge = std::abs(x_or_y_tile - x_or_y_edge);
assert(dist_to_edge < WATER_REGION_EDGE_LENGTH);
if (dist_to_edge >= best_dist) continue;
best_dist = dist_to_edge;
best_tile = tile;
}
return best_tile;
}

View File

@ -64,4 +64,8 @@ void AllocateWaterRegions();
void PrintWaterRegionDebugInfo(TileIndex tile);
using TestTileIndexCallBack = std::function<bool(const TileIndex)>;
bool TestTileInWaterRegionPatch(const WaterRegionPatchDesc &water_region_patch, TestTileIndexCallBack &callback);
TileIndex FindClosestEnteringTile(const std::span<WaterRegionPatchDesc> high_level_path, TestTileIndexCallBack &callback);
#endif /* WATER_REGIONS_H */

View File

@ -34,6 +34,17 @@ Track YapfShipChooseTrack(const Ship *v, TileIndex tile, bool &path_found, ShipP
*/
bool YapfShipCheckReverse(const Ship *v, Trackdir *trackdir);
/**
* Used when user sends ship to the nearest depot or if ship needs servicing using YAPF.
* @param v ship that needs to go to some depot
* @param max_penalty max distance (in pathfinder penalty) from the current ship position
* (used also as optimization - the pathfinder can stop path finding if max_penalty
* was reached and no depot was seen)
* @param may_reverse whether the ship is allowed to reverse
* @return the data about the depot
*/
FindDepotData YapfShipFindNearestDepot(const Ship *v, int max_penalty, bool may_reverse);
/**
* Finds the best path for given road vehicle using YAPF.
* @param v the RV that needs to find a path

View File

@ -36,6 +36,7 @@ protected:
TileIndex dest_tile;
TrackdirBits dest_trackdirs;
StationID dest_station;
bool any_ship_depot = false;
bool has_intermediate_dest = false;
TileIndex intermediate_dest_tile;
@ -55,6 +56,11 @@ public:
}
}
void SetAnyShipDepotDestination()
{
this->any_ship_depot = true;
}
void SetIntermediateDestination(const WaterRegionPatchDesc &water_region_patch)
{
this->has_intermediate_dest = true;
@ -69,10 +75,16 @@ protected:
return *static_cast<Tpf*>(this);
}
TestTileIndexCallBack detect_ship_depot = [&](const TileIndex tile)
{
return IsShipDepotTile(tile) && GetShipDepotPart(tile) == DEPOT_PART_NORTH && IsTileOwner(tile, Yapf().GetVehicle()->owner);
};
public:
/** Called by YAPF to detect if node ends in the desired destination. */
inline bool PfDetectDestination(Node &n)
{
if (this->any_ship_depot) return this->detect_ship_depot(n.key.tile);
return this->PfDetectDestinationTile(n.segment_last_tile, n.segment_last_td);
}
@ -89,6 +101,11 @@ public:
return tile == this->dest_tile && ((this->dest_trackdirs & TrackdirToTrackdirBits(trackdir)) != TRACKDIR_BIT_NONE);
}
inline TileIndex GetShipDepotDestination(const std::span<WaterRegionPatchDesc> high_level_path)
{
return FindClosestEnteringTile(high_level_path, this->detect_ship_depot);
}
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::estimate.
@ -99,7 +116,7 @@ public:
static const int dg_dir_to_x_offs[] = { -1, 0, 1, 0 };
static const int dg_dir_to_y_offs[] = { 0, 1, 0, -1 };
if (this->PfDetectDestination(n)) {
if (this->any_ship_depot || this->PfDetectDestination(n)) {
n.estimate = n.cost;
return true;
}
@ -158,7 +175,7 @@ public:
}
/** Restricts the search by creating corridor or water regions through which the ship is allowed to travel. */
inline void RestrictSearch(const std::vector<WaterRegionPatchDesc> &path)
inline void RestrictSearch(const std::span<WaterRegionPatchDesc> &path)
{
this->water_region_corridor.clear();
for (const WaterRegionPatchDesc &path_entry : path) this->water_region_corridor.push_back(path_entry);
@ -211,16 +228,20 @@ public:
return result;
}
static Trackdir ChooseShipTrack(const Ship *v, TileIndex tile, TrackdirBits forward_dirs, TrackdirBits reverse_dirs,
static Trackdir ChooseShipTrack(const Ship *v, TileIndex &tile, TrackdirBits forward_dirs, TrackdirBits reverse_dirs, int max_penalty,
bool &path_found, ShipPathCache &path_cache, Trackdir &best_origin_dir)
{
const std::vector<WaterRegionPatchDesc> high_level_path = YapfShipFindWaterRegionPath(v, tile, NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1);
std::vector<WaterRegionPatchDesc> high_level_path = YapfShipFindWaterRegionPath(v, tile, NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1);
if (high_level_path.empty()) {
path_found = false;
/* Make the ship move around aimlessly. This prevents repeated pathfinder calls and clearly indicates that the ship is lost. */
return CreateRandomPath(v, path_cache, SHIP_LOST_PATH_LENGTH);
}
const bool find_closest_depot = tile == INVALID_TILE;
if (find_closest_depot) tile = v->tile;
const bool automatic_servicing = find_closest_depot && max_penalty != 0;
/* Try one time without restricting the search area, which generally results in better and more natural looking paths.
* However the pathfinder can hit the node limit in certain situations such as long aqueducts or maze-like terrain.
* If that happens we run the pathfinder again, but restricted only to the regions provided by the region pathfinder. */
@ -229,13 +250,28 @@ public:
/* Set origin and destination nodes */
pf.SetOrigin(v->tile, forward_dirs | reverse_dirs);
pf.SetDestination(v);
const bool is_intermediate_destination = static_cast<int>(high_level_path.size()) >= NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1;
if (is_intermediate_destination) pf.SetIntermediateDestination(high_level_path.back());
if (find_closest_depot) {
pf.SetAnyShipDepotDestination();
} else {
pf.SetDestination(v);
}
pf.SetMaxCost(max_penalty);
const std::span<WaterRegionPatchDesc> high_level_path_span(high_level_path.data(), std::min<size_t>(high_level_path.size(), NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1));
const bool is_intermediate_destination = static_cast<int>(high_level_path_span.size()) >= NUMBER_OR_WATER_REGIONS_LOOKAHEAD + 1;
if (is_intermediate_destination) {
if (automatic_servicing) {
/* Automatic servicing requires a valid path cost from start to end.
* However, when an intermediate destination is set, the resulting cost
* cannot be used to determine if it falls within the maximum allowed penalty. */
return INVALID_TRACKDIR;
}
pf.SetIntermediateDestination(high_level_path_span.back());
}
/* Restrict the search area to prevent the low level pathfinder from expanding too many nodes. This can happen
* when the terrain is very "maze-like" or when the high level path "teleports" via a very long aqueduct. */
if (attempt > 0) pf.RestrictSearch(high_level_path);
if (attempt > 0) pf.RestrictSearch(high_level_path_span);
/* Find best path. */
path_found = pf.FindPath(v);
@ -245,6 +281,12 @@ public:
/* Make the ship move around aimlessly. This prevents repeated pathfinder calls and clearly indicates that the ship is lost. */
if (!path_found) return CreateRandomPath(v, path_cache, SHIP_LOST_PATH_LENGTH);
/* Return early when only searching for the closest depot tile. */
if (find_closest_depot) {
tile = is_intermediate_destination ? pf.GetShipDepotDestination(high_level_path) : node->GetTile();
return INVALID_TRACKDIR;
}
/* Return only the path within the current water region if an intermediate destination was returned. If not, cache the entire path
* to the final destination tile. The low-level pathfinder might actually prefer a different docking tile in a nearby region. Without
* caching the full path the ship can get stuck in a loop. */
@ -254,7 +296,7 @@ public:
while (node->parent) {
const WaterRegionPatchDesc node_water_patch = GetWaterRegionPatchInfo(node->GetTile());
const bool node_water_patch_on_high_level_path = std::ranges::find(high_level_path, node_water_patch) != high_level_path.end();
const bool node_water_patch_on_high_level_path = std::ranges::find(high_level_path_span, node_water_patch) != high_level_path_span.end();
const bool add_full_path = !is_intermediate_destination && node_water_patch != end_water_patch;
/* The cached path must always lead to a region patch that's on the high level path.
@ -303,6 +345,7 @@ public:
{
bool path_found = false;
ShipPathCache dummy_cache;
TileIndex tile = v->tile;
Trackdir best_origin_dir = INVALID_TRACKDIR;
if (trackdir == nullptr) {
@ -310,17 +353,45 @@ public:
const Trackdir reverse_dir = ReverseTrackdir(v->GetVehicleTrackdir());
const TrackdirBits forward_dirs = TrackdirToTrackdirBits(v->GetVehicleTrackdir());
const TrackdirBits reverse_dirs = TrackdirToTrackdirBits(reverse_dir);
(void)ChooseShipTrack(v, v->tile, forward_dirs, reverse_dirs, path_found, dummy_cache, best_origin_dir);
(void)ChooseShipTrack(v, tile, forward_dirs, reverse_dirs, 0, path_found, dummy_cache, best_origin_dir);
return path_found && best_origin_dir == reverse_dir;
} else {
/* This gets called when a ship suddenly can't move forward, e.g. due to terraforming. */
const DiagDirection entry = ReverseDiagDir(VehicleExitDir(v->direction, v->state));
const TrackdirBits reverse_dirs = DiagdirReachesTrackdirs(entry) & TrackStatusToTrackdirBits(GetTileTrackStatus(v->tile, TRANSPORT_WATER, 0, entry));
(void)ChooseShipTrack(v, v->tile, TRACKDIR_BIT_NONE, reverse_dirs, path_found, dummy_cache, best_origin_dir);
(void)ChooseShipTrack(v, tile, TRACKDIR_BIT_NONE, reverse_dirs, 0, path_found, dummy_cache, best_origin_dir);
*trackdir = path_found && best_origin_dir != INVALID_TRACKDIR ? best_origin_dir : GetRandomTrackdir(reverse_dirs);
return true;
}
}
/**
* Find the best depot for a ship.
* @param v Ship
* @param max_penalty maximum pathfinder cost.
* @param may_reverse whether the ship is allowed to reverse.
* @return FindDepotData with the best depot tile, cost and whether to reverse.
*/
static inline FindDepotData FindNearestDepot(const Ship *v, int max_penalty, bool may_reverse)
{
FindDepotData depot;
bool path_found = false;
ShipPathCache dummy_cache;
TileIndex tile = INVALID_TILE;
Trackdir best_origin_dir = INVALID_TRACKDIR;
const bool search_both_ways = may_reverse && max_penalty == 0;
const Trackdir forward_dir = v->GetVehicleTrackdir();
const Trackdir reverse_dir = ReverseTrackdir(forward_dir);
const TrackdirBits forward_dirs = TrackdirToTrackdirBits(forward_dir);
const TrackdirBits reverse_dirs = search_both_ways ? TrackdirToTrackdirBits(reverse_dir) : TRACKDIR_BIT_NONE;
(void)ChooseShipTrack(v, tile, forward_dirs, reverse_dirs, max_penalty, path_found, dummy_cache, best_origin_dir);
if (path_found) {
assert(tile != INVALID_TILE);
depot.tile = tile;
}
return depot;
}
};
/** Cost Provider module of YAPF for ships. */
@ -333,6 +404,11 @@ public:
typedef typename Types::NodeList::Item Node; ///< this will be our node type.
typedef typename Node::Key Key; ///< key to hash tables.
protected:
int max_cost;
CYapfCostShipT() : max_cost(0) {}
/** to access inherited path finder */
Tpf &Yapf()
{
@ -340,6 +416,11 @@ public:
}
public:
inline void SetMaxCost(int cost)
{
this->max_cost = cost;
}
inline int CurveCost(Trackdir td1, Trackdir td2)
{
assert(IsValidTrackdir(td1));
@ -384,6 +465,10 @@ public:
uint8_t speed_frac = (GetEffectiveWaterClass(n.GetTile()) == WATER_CLASS_SEA) ? svi->ocean_speed_frac : svi->canal_speed_frac;
if (speed_frac > 0) c += YAPF_TILE_LENGTH * (1 + tf->tiles_skipped) * speed_frac / (256 - speed_frac);
/* Finish if we already exceeded the maximum path cost (i.e. when
* searching for the nearest depot). */
if (this->max_cost > 0 && (n.parent->cost + c) > this->max_cost) return false;
/* Apply it. */
n.cost = n.parent->cost + c;
return true;
@ -422,7 +507,7 @@ Track YapfShipChooseTrack(const Ship *v, TileIndex tile, bool &path_found, ShipP
{
Trackdir best_origin_dir = INVALID_TRACKDIR;
const TrackdirBits origin_dirs = TrackdirToTrackdirBits(v->GetVehicleTrackdir());
const Trackdir td_ret = CYapfShip::ChooseShipTrack(v, tile, origin_dirs, TRACKDIR_BIT_NONE, path_found, path_cache, best_origin_dir);
const Trackdir td_ret = CYapfShip::ChooseShipTrack(v, tile, origin_dirs, TRACKDIR_BIT_NONE, 0, path_found, path_cache, best_origin_dir);
return (td_ret != INVALID_TRACKDIR) ? TrackdirToTrack(td_ret) : INVALID_TRACK;
}
@ -430,3 +515,8 @@ bool YapfShipCheckReverse(const Ship *v, Trackdir *trackdir)
{
return CYapfShip::CheckShipReverse(v, trackdir);
}
FindDepotData YapfShipFindNearestDepot(const Ship *v, int max_penalty, bool may_reverse)
{
return CYapfShip::FindNearestDepot(v, max_penalty, may_reverse);
}

View File

@ -119,6 +119,7 @@ public:
protected:
Key dest;
bool any_ship_depot = false;
public:
void SetDestination(const WaterRegionPatchDesc &water_region_patch)
@ -126,18 +127,32 @@ public:
this->dest.Set(water_region_patch);
}
void SetAnyShipDepotDestination()
{
this->any_ship_depot = true;
}
protected:
TestTileIndexCallBack detect_ship_depot = [&](const TileIndex tile)
{
return IsShipDepotTile(tile) && GetShipDepotPart(tile) == DEPOT_PART_NORTH && IsTileOwner(tile, Yapf().GetVehicle()->owner);
};
Tpf &Yapf() { return *static_cast<Tpf*>(this); }
public:
inline bool PfDetectDestination(Node &n) const
inline bool PfDetectDestination(Node &n)
{
if (this->any_ship_depot) {
return TestTileInWaterRegionPatch(n.key.water_region_patch, this->detect_ship_depot);
}
return n.key == this->dest;
}
inline bool PfCalcEstimate(Node &n)
{
if (this->PfDetectDestination(n)) {
if (this->any_ship_depot || this->PfDetectDestination(n)) {
n.estimate = n.cost;
return true;
}
@ -218,6 +233,31 @@ public:
assert(!path.empty());
return path;
}
static std::vector<WaterRegionPatchDesc> FindShipDepotRegionPath(const Ship *v)
{
const WaterRegionPatchDesc start_water_region_patch = GetWaterRegionPatchInfo(v->tile);
/* We reserve 4 nodes (patches) per water region. The vast majority of water regions have 1 or 2 regions so this should be a pretty
* safe limit. We cap the limit at 65536 which is at a region size of 16x16 is equivalent to one node per region for a 4096x4096 map. */
Tpf pf(std::min(static_cast<int>(Map::Size() * NODES_PER_REGION) / WATER_REGION_NUMBER_OF_TILES, MAX_NUMBER_OF_NODES));
pf.AddOrigin(start_water_region_patch);
pf.SetAnyShipDepotDestination();
/* Find best path. */
if (!pf.FindPath(v)) return {}; // Path not found.
std::vector<WaterRegionPatchDesc> path;
Node *node = pf.GetBestNode();
while (node != nullptr) {
path.push_back(node->key.water_region_patch);
node = node->parent;
}
assert(!path.empty());
std::ranges::reverse(path);
return path;
}
};
/** Cost Provider of YAPF for water regions. */
@ -296,5 +336,8 @@ struct CYapfRegionWater : CYapfT<CYapfRegion_TypesT<CYapfRegionWater, CRegionNod
*/
std::vector<WaterRegionPatchDesc> YapfShipFindWaterRegionPath(const Ship *v, TileIndex start_tile, int max_returned_path_length)
{
const bool find_closest_depot = start_tile == INVALID_TILE;
if (find_closest_depot) return CYapfRegionWater::FindShipDepotRegionPath(v);
return CYapfRegionWater::FindWaterRegionPath(v, start_tile, max_returned_path_length);
}

View File

@ -16,5 +16,6 @@
struct Ship;
std::vector<WaterRegionPatchDesc> YapfShipFindWaterRegionPath(const Ship *v, TileIndex start_tile, int max_returned_path_length);
std::vector<WaterRegionPatchDesc> YapfFindShipDepotRegionPath(const Ship *v);
#endif /* YAPF_SHIP_REGIONS_H */

View File

@ -132,7 +132,7 @@ struct RoadVehicle final : public GroundVehicle<RoadVehicle, VEH_ROAD> {
uint Crash(bool flooded = false) override;
Trackdir GetVehicleTrackdir() const override;
TileIndex GetOrderStationLocation(StationID station) override;
ClosestDepot FindClosestDepot() override;
ClosestDepot FindClosestDepot(bool may_reverse = false) override;
bool IsBus() const;

View File

@ -346,7 +346,7 @@ static FindDepotData FindClosestRoadDepot(const RoadVehicle *v, int max_distance
return YapfRoadVehicleFindNearestDepot(v, max_distance);
}
ClosestDepot RoadVehicle::FindClosestDepot()
ClosestDepot RoadVehicle::FindClosestDepot([[maybe_unused]] bool may_reverse)
{
FindDepotData rfdd = FindClosestRoadDepot(this, 0);
if (rfdd.best_length == UINT_MAX) return ClosestDepot();

View File

@ -57,7 +57,7 @@ struct Ship final : public SpecializedVehicle<Ship, VEH_SHIP> {
void OnNewEconomyDay() override;
Trackdir GetVehicleTrackdir() const override;
TileIndex GetOrderStationLocation(StationID station) override;
ClosestDepot FindClosestDepot() override;
ClosestDepot FindClosestDepot(bool may_reverse = false) override;
void UpdateCache();
void SetDestTile(TileIndex tile) override;
};

View File

@ -17,7 +17,6 @@
#include "station_base.h"
#include "newgrf_engine.h"
#include "pathfinder/yapf/yapf.h"
#include "pathfinder/yapf/yapf_ship_regions.h"
#include "newgrf_sound.h"
#include "spritecache.h"
#include "strings_func.h"
@ -39,13 +38,8 @@
#include "table/strings.h"
#include <unordered_set>
#include "safeguards.h"
/** Max distance in tiles (as the crow flies) to search for depots when user clicks "go to depot". */
constexpr int MAX_SHIP_DEPOT_SEARCH_DISTANCE = 80;
/**
* Determine the effective #WaterClass for a ship travelling on a tile.
* @param tile Tile of interest
@ -148,57 +142,15 @@ void Ship::GetImage(Direction direction, EngineImageType image_type, VehicleSpri
result->Set(_ship_sprites[spritenum] + direction);
}
static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance)
static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance, bool may_reverse = false)
{
const int max_region_distance = (max_distance / WATER_REGION_EDGE_LENGTH) + 1;
const TileIndex tile = v->tile;
if (IsShipDepotTile(tile) && IsTileOwner(tile, v->owner)) return Depot::GetByTile(tile);
static std::unordered_set<int> visited_patch_hashes;
static std::deque<WaterRegionPatchDesc> patches_to_search;
visited_patch_hashes.clear();
patches_to_search.clear();
FindDepotData sfdd = YapfShipFindNearestDepot(Ship::From(v), max_distance, may_reverse);
/* Step 1: find a set of reachable Water Region Patches using BFS. */
const WaterRegionPatchDesc start_patch = GetWaterRegionPatchInfo(v->tile);
patches_to_search.push_back(start_patch);
visited_patch_hashes.insert(CalculateWaterRegionPatchHash(start_patch));
while (!patches_to_search.empty()) {
/* Remove first patch from the queue and make it the current patch. */
const WaterRegionPatchDesc current_node = patches_to_search.front();
patches_to_search.pop_front();
/* Add neighbours of the current patch to the search queue. */
VisitWaterRegionPatchCallback visit_func = [&](const WaterRegionPatchDesc &water_region_patch) {
/* Note that we check the max distance per axis, not the total distance. */
if (std::abs(water_region_patch.x - start_patch.x) > max_region_distance ||
std::abs(water_region_patch.y - start_patch.y) > max_region_distance) return;
const int hash = CalculateWaterRegionPatchHash(water_region_patch);
if (visited_patch_hashes.count(hash) == 0) {
visited_patch_hashes.insert(hash);
patches_to_search.push_back(water_region_patch);
}
};
VisitWaterRegionPatchNeighbours(current_node, visit_func);
}
/* Step 2: Find the closest depot within the reachable Water Region Patches. */
const Depot *best_depot = nullptr;
uint best_dist_sq = std::numeric_limits<uint>::max();
for (const Depot *depot : Depot::Iterate()) {
const TileIndex tile = depot->xy;
if (IsShipDepotTile(tile) && IsTileOwner(tile, v->owner)) {
const uint dist_sq = DistanceSquare(tile, v->tile);
if (dist_sq < best_dist_sq && dist_sq <= max_distance * max_distance &&
visited_patch_hashes.count(CalculateWaterRegionPatchHash(GetWaterRegionPatchInfo(tile))) > 0) {
best_dist_sq = dist_sq;
best_depot = depot;
}
}
}
return best_depot;
if (sfdd.tile == INVALID_TILE) return nullptr;
return Depot::GetByTile(sfdd.tile);
}
static void CheckIfShipNeedsService(Vehicle *v)
@ -209,7 +161,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
return;
}
uint max_distance = _settings_game.pf.yapf.maximum_go_to_depot_penalty / YAPF_TILE_LENGTH;
uint max_distance = _settings_game.pf.yapf.maximum_go_to_depot_penalty;
const Depot *depot = FindClosestShipDepot(v, max_distance);
@ -954,9 +906,9 @@ CommandCost CmdBuildShip(DoCommandFlags flags, TileIndex tile, const Engine *e,
return CommandCost();
}
ClosestDepot Ship::FindClosestDepot()
ClosestDepot Ship::FindClosestDepot(bool may_reverse)
{
const Depot *depot = FindClosestShipDepot(this, MAX_SHIP_DEPOT_SEARCH_DISTANCE);
const Depot *depot = FindClosestShipDepot(this, 0, may_reverse);
if (depot == nullptr) return ClosestDepot();
return ClosestDepot(depot->xy, depot->index);

View File

@ -129,7 +129,7 @@ struct Train final : public GroundVehicle<Train, VEH_TRAIN> {
uint Crash(bool flooded = false) override;
Trackdir GetVehicleTrackdir() const override;
TileIndex GetOrderStationLocation(StationID station) override;
ClosestDepot FindClosestDepot() override;
ClosestDepot FindClosestDepot(bool may_reverse = false) override;
void ReserveTrackUnderConsist() const;

View File

@ -2194,7 +2194,7 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
return YapfTrainFindNearestDepot(v, max_distance);
}
ClosestDepot Train::FindClosestDepot()
ClosestDepot Train::FindClosestDepot([[maybe_unused]] bool may_reverse)
{
FindDepotData tfdd = FindClosestTrainDepot(this, 0);
if (tfdd.best_length == UINT_MAX) return ClosestDepot();

View File

@ -2583,7 +2583,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlags flags, DepotCommandFlags command
return CommandCost();
}
ClosestDepot closest_depot = this->FindClosestDepot();
ClosestDepot closest_depot = this->FindClosestDepot(true);
static const StringID no_depot[] = {STR_ERROR_UNABLE_TO_FIND_ROUTE_TO, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR};
if (!closest_depot.found) return CommandCost(no_depot[this->type]);

View File

@ -792,9 +792,10 @@ public:
/**
* Find the closest depot for this vehicle and tell us the location,
* DestinationID and whether we should reverse.
* @param may_reverse Whether the vehicle is allowed to reverse.
* @return A structure with information about the closest depot, if found.
*/
virtual ClosestDepot FindClosestDepot() { return {}; }
virtual ClosestDepot FindClosestDepot([[maybe_unused]] bool may_reverse = false) { return {}; }
virtual void SetDestTile(TileIndex tile) { this->dest_tile = tile; }