1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
Adam Zmuda 060ca825b5
Merge 0fc4be750b into 13759e9f23 2025-07-25 07:43:58 +00:00
Peter Nelson 13759e9f23
Fix: Display GRFID in correct hex format. (#14478) 2025-07-25 08:41:48 +01:00
translators 3e06c69e26 Update: Translations from eints
portuguese: 1 change by jcteotonio
polish: 6 changes by pAter-exe
2025-07-25 04:47:26 +00:00
kojonek2 0fc4be750b Fix #12900: Join station window will be shown for stations with existing stations in tile gaps 2025-06-19 20:23:18 +02:00
4 changed files with 18 additions and 17 deletions

View File

@ -1010,11 +1010,14 @@ STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLA
STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Żaden
STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL :{BLACK}Wyświetl wszystkie ładunki na wykresie stawek za ładunek
STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ukryj wszystkie ładunki na wykresie stawek za ładunek
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Przełącz ukrywanie/wyświetlanie wykresu danego typu ładunku
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Przełącz ukrywanie/wyświetlanie wykresu ładunku danego typu
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Historia Ładunków
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Wyprodukowano
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Przetransportowano
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Dostarczono
STR_GRAPH_INDUSTRY_RANGE_WAITING :Oczekujący
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Pokaż szczegóły oceny wydajności
@ -4403,6 +4406,8 @@ 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_CARGO_GRAPH :{BLACK}Wykres Produkcji
STR_INDUSTRY_VIEW_CARGO_GRAPH_TOOLTIP :{BLACK}Wyświetl na wykresie historię stanu ładunków w tym przedsiębiorstwie
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

@ -20,7 +20,7 @@
##id 0x0000
STR_NULL :
STR_EMPTY :
STR_UNDEFINED :(frase indefinida)
STR_UNDEFINED :(cadeia de caracteres indefinida)
STR_JUST_NOTHING :Nada
# Cargo related strings

View File

@ -59,7 +59,7 @@ static ChangeInfoResult LoadTranslationTable(uint first, uint last, ByteReader &
GRFFile *grf_override = GetCurrentGRFOverride();
if (grf_override != nullptr) {
/* GRF override is present, copy the translation table to the overridden GRF as well. */
GrfMsg(1, "LoadTranslationTable: Copying {} translation table to override GRFID '{}'", name, std::byteswap(grf_override->grfid));
GrfMsg(1, "LoadTranslationTable: Copying {} translation table to override GRFID {:08X}", name, std::byteswap(grf_override->grfid));
std::vector<T> &override_table = gettable(*grf_override);
override_table = translation_table;
}

View File

@ -2222,7 +2222,7 @@ static void AddNearbyStation(TileIndex tile, TileArea *ctx)
* @tparam T the station filter type, for stations to look for
*/
template <class T>
static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
static void FindStationsNearby(TileArea ta, bool distant_join)
{
TileArea ctx = ta;
@ -2230,11 +2230,6 @@ static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
_stations_nearby_list.push_back(NEW_STATION);
_deleted_stations_nearby.clear();
/* Check the inside, to return, if we sit on another station */
for (TileIndex t : ta) {
if (t < Map::Size() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return BaseStation::GetByTile(t);
}
/* Look for deleted stations */
for (const BaseStation *st : BaseStation::Iterate()) {
if (T::IsValidBaseStation(st) && !st->IsInUse() && st->owner == _local_company) {
@ -2251,17 +2246,20 @@ static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
}
}
/* Add stations that are within station tile area. Stations do not have to occupy all tiles */
for (auto t : ta) {
AddNearbyStation<T>(t, &ctx);
}
/* Only search tiles where we have a chance to stay within the station spread.
* The complete check needs to be done in the callback as we don't know the
* extent of the found station, yet. */
if (distant_join && std::min(ta.w, ta.h) >= _settings_game.station.station_spread) return nullptr;
if (distant_join && std::min(ta.w, ta.h) >= _settings_game.station.station_spread) return;
uint max_dist = distant_join ? _settings_game.station.station_spread - std::min(ta.w, ta.h) : 1;
for (auto tile : SpiralTileSequence(TileAddByDir(ctx.tile, DIR_N), max_dist, ta.w, ta.h)) {
AddNearbyStation<T>(tile, &ctx);
}
return nullptr;
}
static constexpr NWidgetPart _nested_select_station_widgets[] = {
@ -2421,7 +2419,7 @@ static WindowDesc _select_station_desc(
* @return whether we need to show the station selection window.
*/
template <class T>
static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
static bool StationJoinerNeeded(const StationPickerCmdProc &proc)
{
/* Only show selection if distant join is enabled in the settings */
if (!_settings_game.station.distant_join_stations) return false;
@ -2439,9 +2437,7 @@ static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
if (!_ctrl_pressed) return false;
/* Now check if we could build there */
if (!proc(true, StationID::Invalid())) return false;
return FindStationsNearby<T>(ta, false) == nullptr;
return proc(true, StationID::Invalid());
}
/**
@ -2453,7 +2449,7 @@ static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
template <class T>
void ShowSelectBaseStationIfNeeded(TileArea ta, StationPickerCmdProc&& proc)
{
if (StationJoinerNeeded<T>(ta, proc)) {
if (StationJoinerNeeded<T>(proc)) {
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
new SelectStationWindow<T>(_select_station_desc, ta, std::move(proc));
} else {