From 5e51d9ee823af27d00f88ef38ea4753e249e296c Mon Sep 17 00:00:00 2001 From: translators Date: Mon, 7 Jan 2019 19:45:46 +0100 Subject: [PATCH 01/30] Update: Translations from eints hebrew: 22 changes by dnd_man spanish (mexican): 1 change by Absay --- src/lang/hebrew.txt | 22 ++++++++++++++++++++++ src/lang/spanish_MX.txt | 1 + 2 files changed, 23 insertions(+) diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 8f15c95ef6..d2e5b89be6 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -686,10 +686,12 @@ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}עירב STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}הצג את חלון בחירת המנגינה # Playlist window +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}תוכנית מוזיקה - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}רשימת רצועות STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}תוכנית- '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}מחק +STR_PLAYLIST_CHANGE_SET :{BLACK}ערכת שינוי STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}מחק תוכנית נוכחית STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}(לחץ כאן כדי להוסיף לתוכנית הנוכחית(מותאם אישית1 או מותאם אישית 2 בלבד STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}(לחץ על רצועה כדי להסיר אותה מהתוכנית הנוחכית(מותאם אישית 1 או מותאם אישית 2 בלבד @@ -1351,7 +1353,9 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :צבע פני STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :ירוק STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :ירוק כהה STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :סגול +STR_CONFIG_SETTING_SCROLLMODE :התנהגות גלילת תצוגה: {STRING} STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :הזז את התצוגה עם כפתור עכבר ימני, מיקום העכבר נעול +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :הזזת מפה עם כפתור עכבר ימני, מיקום העכבר נעול STR_CONFIG_SETTING_SCROLLMODE_LMB :הזז מפה עם כפתור עכבר שמאלי STR_CONFIG_SETTING_SMOOTH_SCROLLING :{STRING} :גלילה חלקה של התצוגה המשנית STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :שלוט כיצד התצוגה הראשית נגללת למיקום מסוים כאשר מקליקים על המפה הקטנה אן כאשר נותנים הוראה לגלול לעצם מסוים על גבי המפה. אם מאופשר, חלון התצוגה נגלל באופן חלק, אם מבוטל הוא מוקפץ ישירות אל נקודת המטרה @@ -2706,19 +2710,34 @@ STR_ABOUT_VERSION :{BLACK}{REV} ג STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2018 The OpenTTD team # Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}קצב ריענון STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) STR_FRAMERATE_RATE_GAMELOOP :{WHITE}קצב סימולציה: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}מספר פעימות משחק לשניה +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}מספר פריימים של וידאו המעובדים בשניה STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK} כמה מהר המשחק כרגע רץ, בהשוואה למהירות הצפוייה בקצב סימולציה רגיל. +STR_FRAMERATE_CURRENT :נוכחי{WHITE} STR_FRAMERATE_DATA_POINTS :{WHITE}נתונים מבוססים על {COMMA} מדידות +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} מילישניה +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} פריים/ים +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} פריים/ים +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} פריים/ים +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} ש' ############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}סה"כ לולאת משחק: STR_FRAMERATE_GL_ROADVEHS :{WHITE} פעימות כלי רכב: STR_FRAMERATE_GL_SHIPS :{WHITE} פעימות כלי שייט: STR_FRAMERATE_GL_LANDSCAPE :{WHITE} נקודות עולם: STR_FRAMERATE_DRAWING :{WHITE}עיבוד גרפיקה: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} תצוגות עולם: +STR_FRAMERATE_VIDEO :{BLACK}פלט וידאו: STR_FRAMERATE_SOUND :{WHITE} ערבוב צליל: ############ End of leave-in-this-order ############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :לולאת משחק +STR_FRAMETIME_CAPTION_GL_ECONOMY :טיפול במטען STR_FRAMETIME_CAPTION_GL_TRAINS :פעימות רכבת +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :פעימות עולם STR_FRAMETIME_CAPTION_GL_LINKGRAPH :השהיית גרף קשרים STR_FRAMETIME_CAPTION_DRAWING :עיבוד גרפיקה STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :עיבוד תצוגת עולם @@ -2748,6 +2767,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}פרטי STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}אין מידע זמין STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}מחרוזת סינון: STR_SAVELOAD_OSKTITLE :{BLACK}הכנס שם לשמירה @@ -3831,6 +3851,7 @@ STR_ORDER_CONDITIONAL_AGE :גיל (שני STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :זקוק לטיפול STR_ORDER_CONDITIONAL_UNCONDITIONALLY :תמיד STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :זמן חיים נותר (שנים) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :אמינות מירבית STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}כיצד יושוו נתוני כלי הרכב לערך נתון מסויים STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :שווה ל @@ -4515,6 +4536,7 @@ STR_BASESOUNDS_DOS_DESCRIPTION :צלילי Tran STR_BASESOUNDS_WIN_DESCRIPTION :צלילי Transport Tycoon Deluxe המקורי בגרסת Windows. STR_BASESOUNDS_NONE_DESCRIPTION :אוסף צלילים ללא צלילים. STR_BASEMUSIC_WIN_DESCRIPTION :מנגינות Transport Tycoon Deluxe המקורי בגרסת Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :מנגינות Transport Tycoon Deluxe המקורי בגרסת DOS. STR_BASEMUSIC_TTO_DESCRIPTION :מנגינות Transport Tycoon Deluxe (Original/World Editor) המקורי בגרסת DOS. STR_BASEMUSIC_NONE_DESCRIPTION :אוסף מנגינות ללא מנגינות. diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 113300b766..efdaffeb3a 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -3860,6 +3860,7 @@ STR_ORDER_CONDITIONAL_AGE :Edad (años) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requiere mantenimiento STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Siempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Tiempo de vida restante (años) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fabilidad máxima STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Comparación de los datos del vehículo respecto al valor dado STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :es igual a From e934f09f02a022c7ef3d54879ce6c07454c098a6 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 9 Jan 2019 17:37:58 +0000 Subject: [PATCH 02/30] Fix: Don't increase motion counter while train is waiting at non-path signals (Author: frosch123) #5877 (#7018) --- src/train_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 0672ac2093..c8387d0a95 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3187,12 +3187,12 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse) if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) { v->cur_speed = 0; v->subspeed = 0; - v->progress = 255 - 100; + v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0. if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_oneway_signal * 20) return false; } else if (HasSignalOnTrackdir(gp.new_tile, i)) { v->cur_speed = 0; v->subspeed = 0; - v->progress = 255 - 10; + v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0. if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_twoway_signal * 73) { DiagDirection exitdir = TrackdirToExitdir(i); TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir); From ad5a9daed52c7793a465b58b5407a5e58688e842 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 9 Jan 2019 17:48:08 +0000 Subject: [PATCH 03/30] Change: Desert tiles are now half-desert if a neighboured tile is non-desert or sea/coast. (patch by frosch123) #4754 (#7015) --- src/clear_cmd.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index f9eb88df54..c4aeb3a52e 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -208,16 +208,19 @@ static void TileLoopClearAlps(TileIndex tile) } /** - * Tests if at least one surrounding tile is desert + * Tests if at least one surrounding tile is non-desert * @param tile tile to check - * @return does this tile have at least one desert tile around? + * @return does this tile have at least one non-desert tile around? */ -static inline bool NeighbourIsDesert(TileIndex tile) +static inline bool NeighbourIsNormal(TileIndex tile) { - return GetTropicZone(tile + TileDiffXY( 1, 0)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( -1, 0)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( 0, 1)) == TROPICZONE_DESERT || - GetTropicZone(tile + TileDiffXY( 0, -1)) == TROPICZONE_DESERT; + for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { + TileIndex t = tile + TileOffsByDiagDir(dir); + if (!IsValidTile(t)) continue; + if (GetTropicZone(t) != TROPICZONE_DESERT) return true; + if (HasTileWaterClass(t) && GetWaterClass(t) == WATER_CLASS_SEA) return true; + } + return false; } static void TileLoopClearDesert(TileIndex tile) @@ -229,9 +232,7 @@ static void TileLoopClearDesert(TileIndex tile) /* Expected desert level - 0 if it shouldn't be desert */ uint expected = 0; if (GetTropicZone(tile) == TROPICZONE_DESERT) { - expected = 3; - } else if (NeighbourIsDesert(tile)) { - expected = 1; + expected = NeighbourIsNormal(tile) ? 1 : 3; } if (current == expected) return; From a0293d313ddad5d649c966f87585417729018836 Mon Sep 17 00:00:00 2001 From: Gabda87 Date: Thu, 10 Jan 2019 10:45:38 +0100 Subject: [PATCH 04/30] Add #4115: default company colour setting (#6998) Works only in single player. --- src/lang/english.txt | 4 ++++ src/openttd.cpp | 8 ++++++++ src/settings_gui.cpp | 1 + src/settings_type.h | 1 + src/table/settings.ini | 12 ++++++++++++ 5 files changed, 26 insertions(+) diff --git a/src/lang/english.txt b/src/lang/english.txt index cb4e685c46..c0231557ce 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -189,6 +189,7 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Brown STR_COLOUR_GREY :Grey STR_COLOUR_WHITE :White +STR_COLOUR_RANDOM :Random # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -1258,6 +1259,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING2} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Starting company colour: {STRING2} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Choose starting colour for the company + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING2} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction diff --git a/src/openttd.cpp b/src/openttd.cpp index 703f04f010..3d25f5d3d1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -942,6 +942,14 @@ static void MakeNewGameDone() Company *c = Company::Get(COMPANY_FIRST); c->settings = _settings_client.company; + /* Overwrite color from settings if needed + * COLOUR_END corresponds to Random colour */ + if (_settings_client.gui.starting_colour != COLOUR_END) { + c->colour = _settings_client.gui.starting_colour; + ResetCompanyLivery(c); + _company_colours[c->index] = (Colours)c->colour; + } + IConsoleCmdExec("exec scripts/game_start.scr 0"); SetLocalCompany(COMPANY_FIRST); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 5ebac02807..134b1f58ff 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1584,6 +1584,7 @@ static SettingsContainer &GetSettingsTree() company->Add(new SettingEntry("gui.drag_signals_fixed_distance")); company->Add(new SettingEntry("gui.new_nonstop")); company->Add(new SettingEntry("gui.stop_location")); + company->Add(new SettingEntry("gui.starting_colour")); company->Add(new SettingEntry("company.engine_renew")); company->Add(new SettingEntry("company.engine_renew_months")); company->Add(new SettingEntry("company.engine_renew_money")); diff --git a/src/settings_type.h b/src/settings_type.h index 690f6d8036..8f03b1dc15 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -146,6 +146,7 @@ struct GUISettings { byte missing_strings_threshold; ///< the number of missing strings before showing the warning uint8 graph_line_thickness; ///< the thickness of the lines in the various graph guis uint8 osk_activation; ///< Mouse gesture to trigger the OSK. + byte starting_colour; ///< default color scheme for the company to start a new game with uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity. uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed. diff --git a/src/table/settings.ini b/src/table/settings.ini index c061c394f0..bb6159693a 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -2755,6 +2755,18 @@ strhelp = STR_CONFIG_SETTING_LIVERIES_HELPTEXT strval = STR_CONFIG_SETTING_LIVERIES_NONE proc = InvalidateCompanyLiveryWindow +[SDTC_VAR] +var = gui.starting_colour +type = SLE_UINT8 +flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC +guiflags = SGF_MULTISTRING +def = COLOUR_END +min = 0 +max = COLOUR_END +str = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR +strhelp = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT +strval = STR_COLOUR_DARK_BLUE + [SDTC_BOOL] var = gui.prefer_teamchat flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC From e34a6c58eaeaf5f04db6c92c93c88ea269d720b2 Mon Sep 17 00:00:00 2001 From: translators Date: Thu, 10 Jan 2019 19:45:44 +0100 Subject: [PATCH 05/30] Update: Translations from eints italian: 1 change by lorenzodv french: 29 changes by glx --- src/lang/afrikaans.txt | 1 + src/lang/arabic_egypt.txt | 1 + src/lang/basque.txt | 1 + src/lang/belarusian.txt | 1 + src/lang/brazilian_portuguese.txt | 1 + src/lang/bulgarian.txt | 1 + src/lang/catalan.txt | 1 + src/lang/croatian.txt | 1 + src/lang/czech.txt | 1 + src/lang/danish.txt | 1 + src/lang/dutch.txt | 1 + src/lang/english_AU.txt | 1 + src/lang/english_US.txt | 1 + src/lang/esperanto.txt | 1 + src/lang/estonian.txt | 1 + src/lang/faroese.txt | 1 + src/lang/finnish.txt | 1 + src/lang/french.txt | 51 ++++++++++++++++++------------ src/lang/gaelic.txt | 1 + src/lang/galician.txt | 1 + src/lang/german.txt | 1 + src/lang/greek.txt | 1 + src/lang/hebrew.txt | 1 + src/lang/hungarian.txt | 1 + src/lang/icelandic.txt | 1 + src/lang/indonesian.txt | 1 + src/lang/irish.txt | 1 + src/lang/italian.txt | 2 ++ src/lang/japanese.txt | 1 + src/lang/korean.txt | 1 + src/lang/latin.txt | 1 + src/lang/latvian.txt | 1 + src/lang/lithuanian.txt | 1 + src/lang/luxembourgish.txt | 1 + src/lang/malay.txt | 1 + src/lang/norwegian_bokmal.txt | 1 + src/lang/norwegian_nynorsk.txt | 1 + src/lang/polish.txt | 1 + src/lang/portuguese.txt | 1 + src/lang/romanian.txt | 1 + src/lang/russian.txt | 1 + src/lang/serbian.txt | 1 + src/lang/simplified_chinese.txt | 1 + src/lang/slovak.txt | 1 + src/lang/slovenian.txt | 1 + src/lang/spanish.txt | 1 + src/lang/spanish_MX.txt | 1 + src/lang/swedish.txt | 1 + src/lang/tamil.txt | 1 + src/lang/thai.txt | 1 + src/lang/traditional_chinese.txt | 1 + src/lang/turkish.txt | 1 + src/lang/ukrainian.txt | 1 + src/lang/unfinished/chuvash.txt | 1 + src/lang/unfinished/frisian.txt | 1 + src/lang/unfinished/ido.txt | 1 + src/lang/unfinished/macedonian.txt | 1 + src/lang/unfinished/maltese.txt | 1 + src/lang/unfinished/marathi.txt | 1 + src/lang/unfinished/persian.txt | 1 + src/lang/unfinished/urdu.txt | 1 + src/lang/vietnamese.txt | 1 + src/lang/welsh.txt | 1 + 63 files changed, 93 insertions(+), 21 deletions(-) diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index d1e96d41d7..eca60e70a4 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -1252,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Verander STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktuur onderhoud: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :As dit geaktiveer is sal dit veroorsaak dat infrastruktuur onderhoudskoste verhoog. Die koste groei oor-proporsioneel met die netwerk grootte, wat groter maatskappye meer as kleiner maatskappye benadeel + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lughawes verval nooit nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wanner hierdie stelling geaktiveer is, maak dit dat alle lughawens ewig beskikbaar bly, na hul bekendstelling datum diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 8c4c06b55b..7dfda5029b 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -1119,6 +1119,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :السماح ب STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}تغير هذا الخيار غير متاح عندما يكون هناك عربات STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :صيانة البنية التحتية: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :المطارات لا تنتهي صلاحيتها {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :حذر إذا فقدت المركبة {STRING} diff --git a/src/lang/basque.txt b/src/lang/basque.txt index d5511050b1..ee74b92372 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -1225,6 +1225,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Hau ezin STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Azpiegituren mantentze-lana: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Gaitua dagoenean, azpiegiturek mantentze kostuak eragiten dituzte. Kostuak garraio sarearekin proportzionalki hazten dira, hau da, kostu handiagoak izango dituzten konpainia handiagoek + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aireportuei inoiz ez zaie epea amaitzen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Gaitua badago, aireportu mota ezberdinak betirako egongo dira aukeran diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index 819bce4a2b..ada14f8931 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -1568,6 +1568,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Зьме STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Утрыманьне iнфраструктуры: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Калі ўключана, інфраструктура патрабуе выдаткаў на ўтрыманьне. Кошт расьце прапарцыянальна памерам сеткі, таму гэта больш датычыць вялікіх кампаніяў, ніж малых. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Малыя аэрапорты ніколі не састарэюць: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Уключэньне гэтай наладкі робіць усе віды аэрапортаў даступнымі назаўжды. diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 5c943e651e..0126a33428 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -1259,6 +1259,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Impossí STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenção de Infraestrutura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quando ativado, infraestrutura gera custos de manutenção. O custo aumenta proporcionalmente à malha de transportes, afetando companhias maiores mais do que as menores + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportos nunca saem de linha: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ativando essa config. mantém todos os tipos de aeroportos disponíveis à construção após sua introdução diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index d085371987..9c24ed8a74 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -1246,6 +1246,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Пром STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Поддръжка на инфраструктурата: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Когато е разрешено, съществуват разходи за поддръжка на инфраструктурата. Разходите се увеличават пропорционално на размера на пътната мрежа, влияейки повече на големите компании отколкото на по-малките + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Летишата не губят валидност: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Разрешавайки тази настройка, всеки вид летище остава завинаги достъпно след неговото представяне diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index cc641141af..59e0e3b55c 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -1257,6 +1257,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}No es po STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manteniment de la infraestructura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quan està activat, la infraestructura provoca costos de manteniment. El cost creix proporcionalment al tamany de la xarxa de transport, afectant en conseqüència més a les companyies grosses que a les petites + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Els aeroports mai caduquen: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activant aquesta opció fa que cada tipus d'aeroport estigui disponible per sempre després de la seva introducció diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index fc7a6a53bb..398891439f 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -1354,6 +1354,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Mijenjan STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Održavanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Kada je omogućeno, infrastruktura uzrokuje troškove održavanja. Cijena raste više nego proporcionalno s veličinom mreže, čime utječe veće tvrtke više od manjih + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Zračne luke nikad ne ističu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Uključivanjem ove postavke čini svaku vrstu zračne luke dostupnom zauvijek nakon uvođenja diff --git a/src/lang/czech.txt b/src/lang/czech.txt index 5512bc616d..530738b6f4 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -1343,6 +1343,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Toto nas STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Udržování infrastruktury: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Pokud je zapnuto, je třeba platit za údržbu infrastruktury. Náklady vzrůstají společně s velikostí dopravní sítě, takže velké společnosti platí více než malé. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Žádný druh letiště nezastará: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Povolení této možnosti způsobí, že všechny druhy letišť zůstanou po uvedení dostupné napořád. (nezastarají). diff --git a/src/lang/danish.txt b/src/lang/danish.txt index 813a496d15..d278cd277f 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -1253,6 +1253,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Denne in STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktur vedligeholdelse: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Når aktiveret, infrastruktur forårsager vedligeholdelsesomkostninger. Omkostningerne vokser over-proportional med nettets størrelse, hvilket påvirker større virksomheder mere end de små + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lufthavnenes levealder udløber aldrig: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktiveres denne indstilling gøres at hver lufthavnstype forbliver tilgængelig for evigt efter dens indførelse diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 4598851f64..0bde237c7e 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -1257,6 +1257,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Deze ins STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Onderhoud infrastructuur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Wanneer dit is ingeschakeld, veroorzaakt de infrastructuur onderhoudskosten. De kosten groeien boven-proportioneel met de grootte van het netwerk, waardoor grotere bedrijven hierdoor meer worden beïnvloed dan kleinere + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Vliegvelden verlopen niet: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Het inschakelen van deze instelling zorgt ervoor dat elke luchthaven soort altijd beschikbaar blijft na de introductie diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 8e001d956a..bf71047a94 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -1230,6 +1230,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows in proportion to the network size, thus affecting larger companies more than smaller ones + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index b93ecb6836..98e007bc1b 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -1255,6 +1255,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index 49149b638f..bff065d1fa 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -1156,6 +1156,7 @@ STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Permesu trairaj STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Permesu trairajn strathaltejojn sur stratoj posedataj de konkurantoj: {STRING} STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ne eblas ŝanĝi ĉi tiujn agordon dum veturiloj ĉeestas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flughavenoj neniam antikviĝas: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avertu se veturilo estas perdita: {STRING} diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index 771994978b..a8f130e67d 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -1308,6 +1308,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Sõiduki STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Taristu hooldamine: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Taristuga kaasnevad halduskulud. Kulud kasvavad taristu hulga suhtes ebaproportsionaalselt, ning mõjutavad pigem suurettevõtteid + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aegumatud lennuväljad: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Selle seade sisse lülitamine jätab kõik lennujaamade tüübid avatuks lõpmata ajaks peale nende avanemist diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index ae2729c216..3465a72111 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -1203,6 +1203,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ikki mø STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Innakervis viðlílkahald: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Um gilda, innankervi elvir til viðlíkahalds kostnað. Kostnaðurin vaksur yvir-lutfalsliga við støddina á kervinum, og ávirkar harvið størri fyritøkur meira enn smærri fyritøkur + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Floghavnir ganga ongantíð út: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Gildan av hesi áseting ger at hvørt floghavna slag altíð er tøkt eftir tað er komi í nýtslu diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index e7f5d9d651..0450afa0b3 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -1256,6 +1256,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Tätä a STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktuurin huoltokustannukset: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Mikäli käytössä, infrastruktuurista aiheutuu huoltokuluja. Kulut kasvavat suhteettomasti verkon kokoon nähden, täten ne vaikuttavat suurempiin yhtiöihin enemmän kuin pieniin + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lentokentät eivät vanhene: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Mikäli käytössä, kaikki lentokenttätyypit ovat saatavilla ikuisesti niiden julkistamisen jälkeen diff --git a/src/lang/french.txt b/src/lang/french.txt index b7729e5067..cc5b331ea0 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -190,6 +190,7 @@ STR_COLOUR_ORANGE :Orange STR_COLOUR_BROWN :Marron STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanc +STR_COLOUR_RANDOM :Aléatoire # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -816,6 +817,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Président) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} a sponsorisé la construction de la nouvelle ville {TOWN}{NBSP}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Une nouvelle ville nommée {TOWN} a été construite{NBSP}! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Un{G 0 "" "" e} nouv{G 0 eau el elle} {STRING} en construction près de {TOWN}{NBSP}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Un{G 0 "" "" e} nouv{G 0 eau el elle} {STRING} s'implante près de {TOWN}{NBSP}! @@ -1258,6 +1260,9 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Il n'est STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Entretien de l'infrastructure{NBSP}: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Si activé, les infrastructures entraineront des coût d'entretien. Le coût augmente proportionnellement à la taille du réseau, affectant les grosses compagnies plus que les petites +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Couleur de la compagnie au démarrage{NBSP}: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Choisir la couleur de démarrage pour la compagnie + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Les aéroports n'expirent jamais{NBSP}: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activer ce paramètre fait que chaque type d'aéroports reste toujours disponible après son introduction @@ -2703,36 +2708,36 @@ STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD # Framerate display window STR_FRAMERATE_CAPTION :{WHITE}Fréquence d'images STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) -STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Fréquence de simulation{NBSP}: {STRING} +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Fréquence de simulation{NBSP}: {STRING} STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Nombre de ticks simulés par seconde. -STR_FRAMERATE_RATE_BLITTER :{WHITE}Fréquence des graphismes{NBSP}: {STRING} +STR_FRAMERATE_RATE_BLITTER :{BLACK}Fréquence des graphismes{NBSP}: {STRING} STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Nombre d'images rendues par seconde. -STR_FRAMERATE_SPEED_FACTOR :{WHITE}Facteur de vitesse actuel{NBSP}: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Facteur de vitesse actuel{NBSP}: {DECIMAL}x STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}À quelle vitesse le jeu tourne actuellement, comparé à la vitesse attendue pour la simulation normale. STR_FRAMERATE_CURRENT :{WHITE}Actuel STR_FRAMERATE_AVERAGE :{WHITE}Moyen -STR_FRAMERATE_DATA_POINTS :{WHITE}Données basées sur {COMMA} mesures -STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms -STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms -STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms -STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE} images/s -STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} images/s -STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} images/s +STR_FRAMERATE_DATA_POINTS :{BLACK}Données basées sur {COMMA} mesures +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} images/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} images/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} images/s STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! -STR_FRAMERATE_GAMELOOP :{WHITE}Total de la boucle de jeu{NBSP}: -STR_FRAMERATE_GL_ECONOMY :{WHITE} Traitement des marchandises{NBSP}: -STR_FRAMERATE_GL_TRAINS :{WHITE} Ticks des trains{NBSP}: +STR_FRAMERATE_GAMELOOP :{BLACK}Total de la boucle de jeu{NBSP}: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Traitement des marchandises{NBSP}: +STR_FRAMERATE_GL_TRAINS :{BLACK} Ticks des trains{NBSP}: STR_FRAMERATE_GL_ROADVEHS :{WHITE} Ticks des véhicules routiers{NBSP}: -STR_FRAMERATE_GL_SHIPS :{WHITE} Ticks des navires{NBSP}: -STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Ticks des aéroplanes{NBSP}: -STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Ticks du monde{NBSP}: -STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Délai du flux des marchandises{NBSP}: -STR_FRAMERATE_DRAWING :{WHITE}Rendu des graphismes{NBSP}: -STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Vues{NBSP}: -STR_FRAMERATE_VIDEO :{WHITE}Sortie vidéo{NBSP}: -STR_FRAMERATE_SOUND :{WHITE}Mixage sonore{NBSP}: +STR_FRAMERATE_GL_SHIPS :{BLACK} Ticks des navires{NBSP}: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Ticks des aéroplanes{NBSP}: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Ticks du monde{NBSP}: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Délai du flux des marchandises{NBSP}: +STR_FRAMERATE_DRAWING :{BLACK}Rendu des graphismes{NBSP}: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Vues{NBSP}: +STR_FRAMERATE_VIDEO :{BLACK}Sortie vidéo{NBSP}: +STR_FRAMERATE_SOUND :{BLACK}Mixage sonore{NBSP}: ############ End of leave-in-this-order ############ Leave those lines in this order!! STR_FRAMETIME_CAPTION_GAMELOOP :Boucle de jeu @@ -2772,6 +2777,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Détails STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Pas d'informations disponibles STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}{NBSP}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF{NBSP}: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtre{NBSP}: STR_SAVELOAD_OSKTITLE :{BLACK}Entrer un nom pour la sauvegarde @@ -2970,6 +2976,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lecture après STR_NEWGRF_ERROR_GRM_FAILED :Indisponibilité de la ressource demandée (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} a été désactivé par {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Format de sprite invalide ou inconnu (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Trop d'éléments dans la liste des valeurs de la propriété (sprite {3:NUM}, propriété {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Fonction de rappel de production d'industrie invalide (sprite {3:NUM}, "{1:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Attention{NBSP}! @@ -3856,6 +3864,7 @@ STR_ORDER_CONDITIONAL_AGE :Âge du véhicu STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Entretien nécessaire STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Toujours STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Durée de vie restante (années) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fiabilité maximum STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Comment comparer les données du véhicule à la valeur donnée STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :est égal à diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 139d775cd3..2cbd7023b1 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -1453,6 +1453,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Cha ghab STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cumail suas a' bhun-structair: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Nuair a bhios seo air, bidh cumail suas a' bhun-structair a' cosg airgid. Fàsaidh na cosgaisean nas luaithe na meud an lìonraidh, mar sin bheir an roghainn seo barrachd buaidh air companaidhean mòra + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Chan fhalbh an ùine air puirt-adhair: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Nuair a chuireas tu an roghainn seo an comas, cumaidh gach port-adhair a' dol gu bràth an dèidh a thogail diff --git a/src/lang/galician.txt b/src/lang/galician.txt index a40620073f..c0896f1728 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -1252,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non é p STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantemento de infraestrutura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cando se activa, a infraestrutura provoca custos de mantemento. O custo aumenta sobre-proporcionadamente co tamaño da rede, e afecta máis ás compañías máis grandes cás pequenas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Os aeroportos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activar esta opción fai que cada tipo de aeroporto siga estando dispoñíbel para sempre dende a súa aparición diff --git a/src/lang/german.txt b/src/lang/german.txt index cd117258b4..c7a63de4e4 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -1252,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Diese Ei STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Instandhaltung der Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Unterhaltskosten für Infrastruktur einschalten. Die Unterhaltskosten wachsen mit zunehmender Netzwerkgröße überproportional an, so dass sie größere Firmen stärker belasten als kleinere + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flughäfen veralten nie: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wird diese Option aktiviert, können Flughäfen, die einmal eingeführt wurden, das ganze Spiel über gebaut werden und veralten nie diff --git a/src/lang/greek.txt b/src/lang/greek.txt index 5b5cd91621..8251cfa6e7 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -1362,6 +1362,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Δεν STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Συντήρηση υποδομής: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Όταν είναι ενεργοποιημένη, οι υποδομές προκαλούν έξοδα συντήρησης. Το κόστος μεγαλώνει δυσανάλογα με το μέγεθος του δικτύου, επηρεάζοντας έτσι τις μεγάλες εταιρείες περισσότερο από τις μικρότερες + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Τα αεροδρόμια δεν λήγουν ποτέ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ενεργοποιώντας αυτήν τη ρύθμιση κάθε τύπος αεροδρομίου παραμένει διαθέσιμο για πάντα μετά την παρουσίασή του diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index d2e5b89be6..8ef90cdc7c 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -1270,6 +1270,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}שינו STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :תחזוקת תשתיות: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :כאשר מאופשר, תשתיות גורמות לעלויות תחזוקה. העלות גדלה באופן שהוא מעבר ליחסי לעומת גודל הרשת, וכך משפיע יותר על חברות גדולות מאשר על חברות קטנות + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :בטל התיישנות נמלי תעופה: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :אפשור הגדרה זו גורם לכל סוג נמל תעופה להישאר זמין לעד אחרי השקתו diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index f9f2e19a2b..8125f2a649 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -1315,6 +1315,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}A beáll STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Az infrastruktúra fenntartási költségének engedélyezése: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Bekapcsolva az infrastruktúrának fenntartási költsége van. A költség hatványozottan nő a hálózatnagysággal, nagyobb hatással a nagyobb vállalatokra mint a kisebbekre + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Repülőterek nem avulnak el: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bekapcsolva minden repülőtértípus örökké elérhető marad bevezetése után diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index 31c6ff796b..d847ba02e4 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -1203,6 +1203,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ekki er STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Viðhald á innviðum: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ef þessi stilling er virk kostar að reka innviði fyrirtækisins. Kostnaður eykst í auknu hlutfalli við stærð fyrirtækisins, því eru áhrifin meiri á stór fyrirtæki en lítil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Alltaf hægt að byggja allar gerðir flugvalla: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ef þessi stilling er virk þá er hver tegund flugvallar alltaf aðgengileg eftir að hann verður fyrst aðgengilegur diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index f0d8efc7a8..30447a88a8 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -1256,6 +1256,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Tidak di STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Pemeliharaan Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Jika dinyalakan, infrastruktur membutuhkan biaya pemeliharaan. Biaya berkembang secara proporsional sesuai dengan ukuran jaringan, lebih berdampak pada perusahaan besar dari pada perusahaan kecil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Bandara tidak kedaluarsa: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Menyalakan setelan ini membuat semua jenis bandara tetap ada selamanya sejak pendesainanya diff --git a/src/lang/irish.txt b/src/lang/irish.txt index 0ea266d541..86dbcbcb62 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Ní féi STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cothabháil bonneagair: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Má tá sé cumasaithe, bíonn costais chothabhála ar bhonneagar. Méadaíonn an costas níos tapúla ná méid an líonra, rad a fhágann go mbíonn tionchar níos mó aige ar chuideachtaí móra ná ar chuideachtaí beaga + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Ní imíonn aerfoirt as dáta riamh: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Má dhéantar an socrú seo a chumasú beidh gach cineál aerfoirt ar fáil go deo tar éis é a thabhairt isteach diff --git a/src/lang/italian.txt b/src/lang/italian.txt index 53a3d342d0..c16354f1ce 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -1282,6 +1282,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non è p STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenzione infrastrutture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Se abilitata, le infrastrutture causano dei costi di manutenzione. I costi crescono in modo più che proporzionale alla dimensione della rete, influenzando maggiormente le compagnie più grandi rispetto alle piccole + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Non rendere mai obsoleti i tipi di aeroporto: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Abilitando questa impostazione, tutti i tipi di aeroporto rimangono disponibili indefinitamente dopo essere stati introdotti @@ -3889,6 +3890,7 @@ STR_ORDER_CONDITIONAL_AGE :Età (anni) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Manutenzione richiesta STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Sempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Vita rimanente (anni) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Affidabilità massima STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Modalità di confronto del dato del veicolo con il valore inserito STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :è uguale a diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index c1b2fb1e75..880866c945 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}この STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :インフラ補修: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :有効にすると、インフラ設備にも維持費が発生するようになります。維持費はネットワークのサイズに非線形で比例する為、小さい会社よりも大きい会社の方が影響が大きくなります + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :空港の旧式化撤廃: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :有効にすると、いずれの種類の空港であっても、その開発後であれば永久に建設が可能になります diff --git a/src/lang/korean.txt b/src/lang/korean.txt index ea66904cd8..8c5736136c 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -1259,6 +1259,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}이미 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :기반시설 유지비: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :이 설정을 켜면, 기반시설 유지비가 발생합니다. 유지비는 교통망의 규모에 비례하며 대형 회사는 소형 회사보다 많은 유지비가 들어갑니다. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :옛날 공항을 사라지지 않고 계속 만들 수 있게 함: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :이 설정을 켜면, 소형 공항을 포함한 모든 공항 종류를 도입 이후에 계속 사용할 수 있게 됩니다. diff --git a/src/lang/latin.txt b/src/lang/latin.txt index 9fa9f87293..d5a4a744dd 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -1443,6 +1443,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non lice STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Tuitio infrastructurae: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Electa, infrastructura prodit expensa tuitionis. Expensa crescunt celerius quam pro portione magnitudini retis, ergo societates magnae affectantur magis quam parvae + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportus numquam recedunt: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Electa, omnes aeroportuum typi permanent post introductionem diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index 4f723b5a88..79788a54c1 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -1236,6 +1236,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Ļauj būvēt c STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Šo iestatījumu nav iespējams mainīt, kad tur ir transportlīdzekļi STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktūras uzturēšana: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lidostas darbosies mūžīgi: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Ieslēdzot šo iestatījumu, katrs lidostas veids pēc tā ieviešanas vienmēr ir pieejams diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index 163c90c70d..631613d82d 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -1456,6 +1456,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Neįmano STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastruktūros priežiūra reikalauja išlaidų: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Infrastruktūros (kelių, geležinkelių, stotelių, angarą ir kitų objektų) priežiūra kainuoja. Kaštai auga proporcingai kompanijos dydžiui, taigi didesnėms kompanijoms infrastruktūros priežiūra kainuos daugiau, nei mažesnėms + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Oro uostai niekada nepasensta: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Kartą atsiradę, oro uostų tipai niekada nebepasens ir galimybė juos statyti niekuomet nebus pašalinta diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 60ffaf64a3..044d1b82f0 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Déi Ast STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastrukturënnerhalt {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Wann ugeschalt, kaschten Infrastrukturen Ennerhaltskäschten. D'Käschten wuessen iwwerproportional zu der Netzwierkgréisst, an treffen sou grouss Firmen méi wéi klenger + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Fluchhäfen lafen nie of: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Wann ugeschalt, bleift all Fluchhafentyp säit senger Aféierung bestoen diff --git a/src/lang/malay.txt b/src/lang/malay.txt index e5ba9a2dc0..956b5c38f0 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -1208,6 +1208,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Menukar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Penyelenggaraan Infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Apabila diupayakan,infrastuktur menyebabkan kos penyelenggaraan. Kadar kos tumbuh berdasarkan saiz rangkaian, sekaligus menjejaskan syarikat yang lebih besar daripada yang kecil + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Lapangan terbang tidak akan tamat tempohnya: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Beri amaran sekiranya kenderaan sesat: {STRING} diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 65c4e10c7f..55b78fec69 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -1254,6 +1254,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Det er i STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vedlikehold av infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Når aktivert, medfører infrastruktur vedlikeholdskostnader. Kostnadene vokser over-proporsjonalt med nettverkets størrelse, og påvirker dermed større selskaper mer enn de små + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flyplasser utgår aldri: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktivering av denne innstillingen gjør at hver type flyplass forblir tilgjengelig for alltid etter at sin introduksjon diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index 93db95f84b..587ce0cce1 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -1240,6 +1240,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Tillatt bygging STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Endring av denne instillinga er ikkje mogleg når det finst køyretøy STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vedlikehald av infrastruktur: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flyplassar utgår aldri: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Advarsel om køyretøyet køyrer seg vill: {STRING} diff --git a/src/lang/polish.txt b/src/lang/polish.txt index 965c08cb42..628a398f29 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -1633,6 +1633,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Zmiana t STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Utrzymywanie infrastruktury: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Kiedy włączone, utrzymanie infrastruktury jest naliczane w kosztach. Koszty wzrastają nadproporcjonalnie do rozmiarów sieci połączeń, a więc dotykają bardziej duże niż małe firmy + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Pozwól budować stare lotniska: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Włączona opcja sprawia, że każdy typ lotniska będzie dostępny na zawsze od chwili wprowadzenia diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index d9c00b1101..e50745fc71 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -1252,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Não é STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Manutenção de infraestruturas: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Quando activo, as infraestruturas têm custos de manutenção. O custo cresce mais do que proporcionalmente com o tamanho da rede e com isso afecta mais as companhias maiores comparado com as mais pequeneas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroportos nunca expiram: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activar esta preferência torna cada tipo de aeroporto disponível para sempre após a sua introdução diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 6b891bb7e8..14bd028643 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -1245,6 +1245,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Schimbar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mentenanță infrastructură: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cand este activă, infrastructura necesita cheltuieli cu intreținerea. Costurile cresc proporțional cu rețeaua de transport, afectând companiile mari mai mult decât companiile mici + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeroporturile nu expiră niciodată: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activarea acestei opțiuni determina ca fiecare tip de aeroport sa fie disponibil permanent, după ce a fost introdus. diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 22eaeb0782..7574bd8bfb 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -1410,6 +1410,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Изме STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Обслуживание инфраструктуры: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Включает затраты на содержание инфраструктуры. Стоимость непропорционально увеличивается с ростом транспортной сети, оказывая, таким образом, большее влияние на крупные компании, чем на малые. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропорты не устаревают: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :При включении все типы аэропортов доступны для строительства в любое время после их первоначального появления diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index d253ac97ed..74b99a1f72 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -1450,6 +1450,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Promena STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Održavanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ako je omogućeno, infrastruktura će imati troškove održavanja. Trošak raste brže sa porastom veličine putne mreže i time više pogađa veća preduzeća od manjih + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Nezastarevanje aerodroma: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Omogućavanje ovog podešavanja čini svaki tip aerodroma zauvek pristupan nakon njegovog uvođenja diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 535e94a582..652972818d 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -1256,6 +1256,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}当有 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :加强版固定资产维护: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :固定资产会发生维护费用,“打开”本选项时,维护费用的增长会超过交通网络的增长规模,因而,对大公司影响更大。 + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :总允许建设小型机场: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :“打开”此选项,每种类型机场出现后一直是可用的 diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index b828879d48..0a127f4d61 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -1319,6 +1319,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Zmena na STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Správa infraštruktúry: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Ak je zapnuté, infraštruktúra generuje výdavky na údržbu. Poplatky rastú proporcionálne s veľkosťou spoločnosti, čo ovplyvňuje viac veľké spoločnosti ako malé. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Letiská nikdy neexiprujú: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Povoluje zachovať vsetky typy letísk navzdy. diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 0704d6e95b..ee1a36e19f 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -1404,6 +1404,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Sprememb STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Vzdrževanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Če je omogočeno, infrastruktura upošteva vzdrževalne stroške, ki rastejo skozi čas proporcionalno z velikostjo omrežja. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Letališča nikoli ne potečejo: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Če je omogočeno, bo vsak tip letališča ostal omogočen vedno po uvedbi. diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 43f9d57b19..75550babea 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -1259,6 +1259,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Cambiar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantenimiento de infraestructuras: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cuando se activa, las infraestructuras tienen costes de mantenimiento. Los costes de la infraestructura aumentan con el tamaño de la red, con lo cual afectan a compañías grandes en mayor grado que a las pequeñas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeropuertos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Permite a todos los aeropuertos estar disponibles permanentemente una vez han sido introducidos diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index efdaffeb3a..194364b1e9 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -1259,6 +1259,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}No se pu STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantenimiento de infraestructura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cuando se activa, la infraestructura tiene costo de mantenimiento, el cual aumenta en relación con el tamaño de la red de transporte. Esto afecta en mayor medida a las empresas grandes que a las pequeñas + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeropuertos siempre disponibles: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Los tipos de aeropuertos estarán disponibles todo el tiempo tras haber sido introducidos diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 1e9fe336a7..30bd9ea8ff 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Det är STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Underhåll av infrastruktur: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Om det är aktiverat så kostar underhåll av infrastruktur. Kostnaden ökar mer än proportionellt mot nätverkets storlek, vilket innebär att större företag drabbas hårdare än små företag av underhållskostnader. + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Flygplatser blir aldrig gamla: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Aktivering av denna inställning gör så att alla flygplatstyper finns kvar i obegränsad tid efter att de blivit tillgängliga diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index d123db86e1..a42fa3440a 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -1173,6 +1173,7 @@ STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :வழிசெ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}வாகனங்கள் இருக்கும் பொது இந்த அமைப்பினை மாற்ற இயலாது STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :கட்டட பராமரிப்பு: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :விமான நிலையங்கள் என்றும் காலாவதியாகாது: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :வாகனம் தொலைந்தால் எச்சரிக்கை செய்: {STRING} diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 878b9c26c5..c3584238f5 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -1228,6 +1228,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}ไม STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :ค่าบำรุงรักษาโครงสร้างพื้นฐาน: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :เมื่อเปิดใช้งาน สาธารณูประโภคที่สร้างโดยบริษัทจะมีค่าบำรุงรักษา ยิ่งเครือข่ายยิ่งมากจะยิ่งเสียค่าใช้จ่ายมากขึ้น + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :ท่าอากาศยานไม่มีวันหมดอายุ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :เปิดใช้งานสิ่งนี้ จะทำให้สามารถสร้างท่าอากาศยานแบบเก่าๆได้แม้เวลาจะผ่านไปนานแล้วก็ตาม diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index e837d1efef..621572e561 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}當有 STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :基礎建設維護: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :如啟用此選項,基礎建設會產生維護成本。該成本的增長會根據公司基礎建設的規模而加倍增大,因此該設定對大公司的影響比對小公司更大 + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :機場永不過期:{STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :如啟用此選項,所有機場一經面世,就永遠可以選擇建設 diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index c7b456f68d..a92a09f38a 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -1252,6 +1252,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Araçlar STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Altyapı bakımları: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Etkinleştirildiğinde; altyapı, bakım giderine neden olur. Maliyet ağ büyüklüğüne göre daha hızlı yükselir, dolayısıyla büyük şirketleri küçüklere göre daha çok etkiler + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Havalimanlarının süresi asla dolmasın: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bu ayarı etkinleştirmek her havaalanı türünün, tanıtımından sonra sürekli olarak kullanılabilir kalmasını sağlar. diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index d4f33017f1..22f5d8f677 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -1379,6 +1379,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Цю н STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Витрати на утримання інфраструктури: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :При включенні інфраструктура потребує коштів для утримання. Витрати збільшуються не пропорційно з ростом розміру мережі, більше впливаючи на великі компанії ніж на малі + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аеропорти не застарівають: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :При включенні кожен аеропорт буде доступним для будівництва безстроково після його впровадження. diff --git a/src/lang/unfinished/chuvash.txt b/src/lang/unfinished/chuvash.txt index 474c328f96..d8661586bc 100644 --- a/src/lang/unfinished/chuvash.txt +++ b/src/lang/unfinished/chuvash.txt @@ -573,6 +573,7 @@ STR_CONFIG_SETTING_HORIZONTAL_POS_RIGHT :Сылтӑмр STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :ҫук STR_CONFIG_SETTING_PLANE_CRASHES_NONE :ҫук + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропорт кивел мар: {STRING} diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt index 624eec2f33..2b3b80966e 100644 --- a/src/lang/unfinished/frisian.txt +++ b/src/lang/unfinished/frisian.txt @@ -1249,6 +1249,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}At der f STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Ynfrastruktuerûnderhâld: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :By ynskeakeljen binne der koster ferbûn oan it ûnderhâld fan ynfrastruktuer. De kosten wurde heger by gruttere netwurken wêrtoch gruttere bedriuwen hjir mear lêst fan hawwe + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Fleanfjilden ferrinne nea: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :By ynskeakeljen bliuwe alle fleanfjildtypes foar ivich beskikber diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt index 114c434f36..41317c107c 100644 --- a/src/lang/unfinished/ido.txt +++ b/src/lang/unfinished/ido.txt @@ -533,6 +533,7 @@ STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :normala + STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Obskur-verda STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violkolora diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt index 30a0f142b1..7e19065f8b 100644 --- a/src/lang/unfinished/macedonian.txt +++ b/src/lang/unfinished/macedonian.txt @@ -843,6 +843,7 @@ STR_CONFIG_SETTING_SMOKE_AMOUNT :Износ на STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Инфраструктура за одржување: {STRING} + STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Дебелина на линии во графици: {STRING} diff --git a/src/lang/unfinished/maltese.txt b/src/lang/unfinished/maltese.txt index 4fc0e8cb10..b0f3aecdda 100644 --- a/src/lang/unfinished/maltese.txt +++ b/src/lang/unfinished/maltese.txt @@ -460,6 +460,7 @@ STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Iddeċiedi kemm + STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avza jekk jintilef il-vehikolu: {STRING} diff --git a/src/lang/unfinished/marathi.txt b/src/lang/unfinished/marathi.txt index 4576bccbae..f5ff89ac9e 100644 --- a/src/lang/unfinished/marathi.txt +++ b/src/lang/unfinished/marathi.txt @@ -796,6 +796,7 @@ STR_CONFIG_SETTING_REALISTIC :खरेखु STR_CONFIG_SETTING_SMOKE_AMOUNT :वाहनांचा धूर/ठिणग्या: {STRING} + STR_CONFIG_SETTING_WARN_LOST_VEHICLE : वाहन हरवल्यास सूचित करा: {STRING} diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt index 231f11af81..618375a246 100644 --- a/src/lang/unfinished/persian.txt +++ b/src/lang/unfinished/persian.txt @@ -1167,6 +1167,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :اجازه اس STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}تغییر دادن این تنظیم هنگامی که خودرو وجود دارد ممکن نیست STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :تعمیر و نگهداری زیرساخت ها: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :فرودگاه‌ها هیچ‌گاه از کار نیافتند: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :اعلام هشدار هنگام گم شدن وسیله نقلیه: {STRING} diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt index b5fd180e01..fd42e84d90 100644 --- a/src/lang/unfinished/urdu.txt +++ b/src/lang/unfinished/urdu.txt @@ -1113,6 +1113,7 @@ STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :مد مقابل STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}جب گاڑیاں موجود ہوں تو یہ سیٹنگ بدلنا ممکن نہیں STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :انفراسٹرکچر کی بحالی: {STRING} + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :ہوائی اڈوں کی معیاد کبھی ختم نہ ہو: {STRING} STR_CONFIG_SETTING_WARN_LOST_VEHICLE :اگر گاڑی کھو جاے تو انتباہ کیجئیے: {STRING} diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index 61a15d3681..92ae0f40bb 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -1258,6 +1258,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Không t STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Phí bảo trì cơ sở hạ tầng: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Khi mở, thì hạ tầng công ty sẽ sinh ra chi phí bảo trì. Chi phí sẽ tăng theo mạng lưới giao thông bạn xây dựng, và sẽ tiêu tốn của công ty lớn nhiều hơn công ty nhỏ + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Sân bay không bao giờ thành đồ cổ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bật tùy chọn này cho phép tất cả các loại sân bay không bị lỗi thời diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 9561354fb0..14277fdd7a 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -1251,6 +1251,7 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Nid yw'n STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Cynnal a chadw tanadeiledd: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Pan fo wedi'i alluogi, mae tanadeiledd yn creu costau cynnal a chadw. Mae'r cost yn codi'n gyflymach na'i gyfradd gyda thŵf y rhwydwaith, gan effeithio'n fwy ar gwmniau mawr na rhai bychan + STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Maes awyr ddim yn dibennu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Mae galluogi'r dewis yma'n peri i bob math o faes awyr aros ar gael am byth wedi ei gyflwyniad gyntaf From 916e911806083a2fe06a79f6f10e275015079149 Mon Sep 17 00:00:00 2001 From: nikolas Date: Tue, 8 Jan 2019 16:00:56 -0500 Subject: [PATCH 06/30] Doc: Fix a few typos in docs/multiplayer.txt --- docs/multiplayer.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/multiplayer.txt b/docs/multiplayer.txt index 7f4227cd8a..62314d7b4c 100644 --- a/docs/multiplayer.txt +++ b/docs/multiplayer.txt @@ -90,7 +90,7 @@ Table of contents - [network] sync_freq: change it in console with: 'set network.sync_freq ' the number should be between the 50 and 1000, not much lower, not much - higer. It indicates the time between sync-frames. A sync-frame is a frame + higher. It indicates the time between sync-frames. A sync-frame is a frame which checks if all clients are still in sync. When the value it too high, clients can desync in 1960, but the server detects it in 1970. Not really handy. The lower the value, the more bandwidth it uses. @@ -104,7 +104,7 @@ Table of contents - In UNIX like systems, you can fork your dedicated server by adding -f as parameter. - - You can automaticly clean companies that do not have a client connected to + - You can automatically clean companies that do not have a client connected to them, for, let's say, 3 years. You can do this via: 'set autoclean_companies' and 'set autoclean_protected' and 'set autoclean_unprotected'. Unprotected removes a password from a company when it is not used for more then the @@ -113,7 +113,7 @@ Table of contents - You can also do this manually via the console: 'reset_company'. - - You can let your server automaticly restart a map when, let's say, year 2030 + - You can let your server automatically restart a map when, let's say, year 2030 is reached. See 'set restart_game_date' for detail. - If you want to be on the server-list, enable Advertising. To do this, select From 2a8fa5fef9021bff67a13899832bf6f0a18e6ea1 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 4 May 2018 21:29:22 +0100 Subject: [PATCH 07/30] Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. --- src/airport_gui.cpp | 2 +- src/dock_gui.cpp | 2 +- src/graph_gui.cpp | 10 +++++----- src/group_gui.cpp | 2 +- src/industry_gui.cpp | 2 +- src/main_gui.cpp | 11 ++++++----- src/misc_gui.cpp | 13 +++++++------ src/newgrf_gui.cpp | 6 +++--- src/news_gui.cpp | 28 +++++++++++++++++----------- src/openttd.cpp | 7 +++---- src/rail_gui.cpp | 2 +- src/road_gui.cpp | 2 +- src/smallmap_gui.cpp | 4 ++-- src/smallmap_gui.h | 8 ++++---- src/station_gui.cpp | 4 ++-- src/statusbar_gui.cpp | 19 +++++++++++-------- src/toolbar_gui.cpp | 18 ++++++++++++++++-- src/vehicle_gui.cpp | 4 ++-- src/window.cpp | 25 ++++++++++++++++++++++--- src/window_func.h | 32 ++++++++++++++++++++++++++++++++ src/window_gui.h | 7 ++++++- 21 files changed, 144 insertions(+), 64 deletions(-) diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 6437f236cd..243f91b247 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -543,7 +543,7 @@ public: this->SelectFirstAvailableAirport(false); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index f09720b357..e2224dfa28 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -451,7 +451,7 @@ public: } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 48b8c4c84a..4f8fe68704 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -539,7 +539,7 @@ public: if (widget == WID_CV_KEY_BUTTON) ShowGraphLegend(); } - virtual void OnTick() + virtual void OnGameTick() { this->UpdateStatistics(false); } @@ -998,9 +998,9 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { } } - virtual void OnTick() + virtual void OnGameTick() { - /* Override default OnTick */ + /* Override default OnGameTick */ } /** @@ -1239,7 +1239,7 @@ public: } - virtual void OnTick() + virtual void OnGameTick() { if (this->companies.NeedResort()) { this->SetDirty(); @@ -1472,7 +1472,7 @@ struct PerformanceRatingDetailWindow : Window { } } - virtual void OnTick() + virtual void OnGameTick() { if (_pause_mode != PM_UNPAUSED) return; diff --git a/src/group_gui.cpp b/src/group_gui.cpp index aef934ccf5..dbb1baa0f7 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -858,7 +858,7 @@ public: this->SetDirty(); } - virtual void OnTick() + virtual void OnGameTick() { if (_pause_mode != PM_UNPAUSED) return; if (this->groups.NeedResort() || this->vehicles.NeedResort()) { diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 98c9edda21..50ef283591 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -647,7 +647,7 @@ public: if (success && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); } - virtual void OnTick() + virtual void OnGameTick() { if (_pause_mode != PM_UNPAUSED) return; if (!this->timer_enabled) return; diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 199546d439..12ee574bb6 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -235,10 +235,11 @@ enum { struct MainWindow : Window { - uint refresh; + int refresh; - static const uint LINKGRAPH_REFRESH_PERIOD = 0xff; - static const uint LINKGRAPH_DELAY = 0xf; + /* Refresh times in milliseconds */ + static const uint LINKGRAPH_REFRESH_PERIOD = 7650; + static const uint LINKGRAPH_DELAY = 450; MainWindow(WindowDesc *desc) : Window(desc) { @@ -253,9 +254,9 @@ struct MainWindow : Window this->refresh = LINKGRAPH_DELAY; } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->refresh > 0) return; + if (!TimerElapsed(this->refresh, delta_ms)) return; this->refresh = LINKGRAPH_REFRESH_PERIOD; diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index b122d172d1..31faae2d4e 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -454,15 +454,16 @@ static const char * const _credits[] = { struct AboutWindow : public Window { int text_position; ///< The top of the scrolling text - byte counter; ///< Used to scroll the text every 5 ticks int line_height; ///< The height of a single line static const int num_visible_lines = 19; ///< The number of lines visible simultaneously + static const uint TIMER_INTERVAL = 150; ///< Scrolling interval in ms + uint timer; + AboutWindow() : Window(&_about_desc) { this->InitNested(WN_GAME_OPTIONS_ABOUT); - this->counter = 5; this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y; } @@ -502,11 +503,11 @@ struct AboutWindow : public Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->counter == 0) { - this->counter = 5; - this->text_position--; + uint count = CountIntervalElapsed(this->timer, delta_ms, TIMER_INTERVAL); + if (count > 0) { + this->text_position -= count; /* If the last text has scrolled start a new from the start */ if (this->text_position < (int)(this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y - lengthof(_credits) * this->line_height)) { this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y; diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index d506eb026c..0b0512544e 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -403,7 +403,7 @@ struct NewGRFParametersWindow : public Window { par_info->SetValue(this->grf_config, val); this->clicked_button = num; - this->timeout = 5; + this->timeout = 150; } } else if (par_info->type == PTYPE_UINT_ENUM && !par_info->complete_labels && click_count >= 2) { /* Display a query box so users can enter a custom value. */ @@ -483,9 +483,9 @@ struct NewGRFParametersWindow : public Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->timeout == 0) { + if (TimerElapsed(this->timeout, delta_ms)) { this->clicked_button = UINT_MAX; this->SetDirty(); } diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 71a39eb3a9..183b27b90e 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -260,11 +260,13 @@ struct NewsWindow : Window { uint16 chat_height; ///< Height of the chat window. uint16 status_height; ///< Height of the status bar window const NewsItem *ni; ///< News item to display. - static uint duration; ///< Remaining time for showing current news message (may only be accessed while a news item is displayed). + static int duration; ///< Remaining time for showing the current news message (may only be access while a news item is displayed). + + uint timer; NewsWindow(WindowDesc *desc, const NewsItem *ni) : Window(desc), ni(ni) { - NewsWindow::duration = 555; + NewsWindow::duration = 16650; const Window *w = FindWindowByClass(WC_SEND_NETWORK_MSG); this->chat_height = (w != NULL) ? w->height : 0; this->status_height = FindWindowById(WC_STATUS_BAR, 0)->height; @@ -485,11 +487,18 @@ struct NewsWindow : Window { this->SetWindowTop(newtop); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - /* Scroll up newsmessages from the bottom in steps of 4 pixels */ - int newtop = max(this->top - 4, _screen.height - this->height - this->status_height - this->chat_height); - this->SetWindowTop(newtop); + int count = CountIntervalElapsed(this->timer, delta_ms, 15); + if (count > 0) { + /* Scroll up newsmessages from the bottom */ + int newtop = max(this->top - 2 * count, _screen.height - this->height - this->status_height - this->chat_height); + this->SetWindowTop(newtop); + } + + /* Decrement the news timer. We don't need to action an elapsed event here, + * so no need to use TimerElapsed(). */ + if (NewsWindow::duration > 0) NewsWindow::duration -= delta_ms; } private: @@ -536,7 +545,7 @@ private: } }; -/* static */ uint NewsWindow::duration = 0; // Instance creation. +/* static */ int NewsWindow::duration = 0; // Instance creation. /** Open up an own newspaper window for the news item */ @@ -588,11 +597,8 @@ static bool ReadyForNextItem() * Check if the status bar message is still being displayed? */ if (IsNewsTickerShown()) return false; - /* Newspaper message, decrement duration counter */ - if (NewsWindow::duration != 0) NewsWindow::duration--; - /* neither newsticker nor newspaper are running */ - return (NewsWindow::duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); + return (NewsWindow::duration <= 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); } /** Move to the next news item */ diff --git a/src/openttd.cpp b/src/openttd.cpp index 3d25f5d3d1..fdde191402 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -76,7 +76,7 @@ void IncreaseDate(); void DoPaletteAnimations(); void MusicLoop(); void ResetMusic(); -void CallWindowTickEvent(); +void CallWindowGameTickEvent(); bool HandleBootstrap(); extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY); @@ -1363,7 +1363,6 @@ void StateGameLoop() #ifndef DEBUG_DUMP_COMMANDS Game::GameLoop(); #endif - CallWindowTickEvent(); return; } @@ -1381,7 +1380,7 @@ void StateGameLoop() BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); UpdateLandscapingLimits(); - CallWindowTickEvent(); + CallWindowGameTickEvent(); NewsLoop(); } else { if (_debug_desync_level > 2 && _date_fract == 0 && (_date & 0x1F) == 0) { @@ -1411,7 +1410,7 @@ void StateGameLoop() #endif UpdateLandscapingLimits(); - CallWindowTickEvent(); + CallWindowGameTickEvent(); NewsLoop(); cur_company.Restore(); } diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 5a533e5c55..234edbf22f 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1368,7 +1368,7 @@ public: } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 6faa422627..e3091ec8af 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1053,7 +1053,7 @@ struct BuildRoadStationWindow : public PickerWindowBase { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { CheckRedrawStationCoverage(this); } diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 135d7491c1..447d25e4a0 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1570,10 +1570,10 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } } -/* virtual */ void SmallMapWindow::OnTick() +/* virtual */ void SmallMapWindow::OnRealtimeTick(uint delta_ms) { /* Update the window every now and then */ - if (--this->refresh != 0) return; + if (!TimerElapsed(this->refresh, delta_ms)) return; if (this->map_type == SMT_LINKSTATS) { uint32 company_mask = this->GetOverlayCompanyMask(); diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h index c3151b1a71..60b39b7a3c 100644 --- a/src/smallmap_gui.h +++ b/src/smallmap_gui.h @@ -67,8 +67,8 @@ protected: static const uint LEGEND_BLOB_WIDTH = 8; ///< Width of the coloured blob in front of a line text in the #WID_SM_LEGEND widget. static const uint INDUSTRY_MIN_NUMBER_OF_COLUMNS = 2; ///< Minimal number of columns in the #WID_SM_LEGEND widget for the #SMT_INDUSTRY legend. - static const uint FORCE_REFRESH_PERIOD = 0x1F; ///< map is redrawn after that many ticks - static const uint BLINK_PERIOD = 0x0F; ///< highlight blinking interval + static const uint FORCE_REFRESH_PERIOD = 930; ///< map is redrawn after that many milliseconds. + static const uint BLINK_PERIOD = 450; ///< highlight blinking interval in milliseconds. uint min_number_of_columns; ///< Minimal number of columns in legends. uint min_number_of_fixed_rows; ///< Minimal number of rows in the legends for the fixed layouts only (all except #SMT_INDUSTRY). @@ -79,7 +79,7 @@ protected: int32 subscroll; ///< Number of pixels (0..3) between the right end of the base tile and the pixel at the top-left corner of the smallmap display. int zoom; ///< Zoom level. Bigger number means more zoom-out (further away). - uint8 refresh; ///< Refresh counter, zeroed every FORCE_REFRESH_PERIOD ticks. + int refresh; ///< Refresh timer, in millseconds. LinkGraphOverlay *overlay; static void BreakIndustryChainLink(); @@ -187,7 +187,7 @@ public: virtual void OnInvalidateData(int data = 0, bool gui_scope = true); virtual bool OnRightClick(Point pt, int widget); virtual void OnMouseWheel(int wheel); - virtual void OnTick(); + virtual void OnRealtimeTick(uint delta_ms); virtual void OnScroll(Point delta); virtual void OnMouseOver(Point pt, int widget); }; diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 3f64b139ac..4c0bf295ce 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -621,7 +621,7 @@ public: } } - virtual void OnTick() + virtual void OnGameTick() { if (_pause_mode != PM_UNPAUSED) return; if (this->stations.NeedResort()) { @@ -2312,7 +2312,7 @@ struct SelectStationWindow : Window { DeleteWindowById(WC_SELECT_STATION, 0); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { if (_thd.dirty & 2) { _thd.dirty &= ~2; diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 25efa6bb1c..e45697130d 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -79,10 +79,11 @@ static bool DrawScrollingStatusText(const NewsItem *ni, int scroll_pos, int left struct StatusBarWindow : Window { bool saving; int ticker_scroll; + uint ticker_timer; int reminder_timeout; static const int TICKER_STOP = 1640; ///< scrolling is finished when counter reaches this value - static const int REMINDER_START = 91; ///< initial value of the reminder counter (right dot on the right) + static const int REMINDER_START = 1350; ///< time in ms for reminder notification (red dot on the right) to stay static const int REMINDER_STOP = 0; ///< reminder disappears when counter reaches this value static const int COUNTER_STEP = 2; ///< this is subtracted from active counters every tick @@ -203,6 +204,7 @@ struct StatusBarWindow : Window { case SBI_SHOW_REMINDER: this->reminder_timeout = REMINDER_START; break; case SBI_NEWS_DELETED: this->ticker_scroll = TICKER_STOP; // reset ticker ... + this->ticker_timer = 0; this->reminder_timeout = REMINDER_STOP; // ... and reminder break; } @@ -217,19 +219,20 @@ struct StatusBarWindow : Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { if (_pause_mode != PM_UNPAUSED) return; if (this->ticker_scroll < TICKER_STOP) { // Scrolling text - this->ticker_scroll += COUNTER_STEP; - this->SetWidgetDirty(WID_S_MIDDLE); + uint count = CountIntervalElapsed(this->ticker_timer, delta_ms, 15); + if (count > 0) { + this->ticker_scroll += count; + this->SetWidgetDirty(WID_S_MIDDLE); + } } - if (this->reminder_timeout > REMINDER_STOP) { // Red blot to show there are new unread newsmessages - this->reminder_timeout -= COUNTER_STEP; - } else if (this->reminder_timeout < REMINDER_STOP) { - this->reminder_timeout = REMINDER_STOP; + // Red blot to show there are new unread newsmessages + if (TimerElapsed(this->reminder_timeout, delta_ms)) { this->SetWidgetDirty(WID_S_MIDDLE); } } diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 40ac3634f1..4f0f140115 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1978,6 +1978,8 @@ enum MainToolbarHotkeys { /** Main toolbar. */ struct MainToolbarWindow : Window { + int timer; + MainToolbarWindow(WindowDesc *desc) : Window(desc) { this->InitNested(0); @@ -1988,6 +1990,8 @@ struct MainToolbarWindow : Window { this->SetWidgetDisabledState(WID_TN_FAST_FORWARD, _networking); // if networking, disable fast-forward button PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); + + this->timer = MILLISECONDS_PER_TICK; } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2092,8 +2096,11 @@ struct MainToolbarWindow : Window { _last_started_action = CBF_NONE; } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!TimerElapsed(this->timer, delta_ms)) return; + this->timer = MILLISECONDS_PER_TICK; + if (this->IsWidgetLowered(WID_TN_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TN_PAUSE); this->SetWidgetDirty(WID_TN_PAUSE); @@ -2310,6 +2317,8 @@ enum MainToolbarEditorHotkeys { }; struct ScenarioEditorToolbarWindow : Window { + int timer; + ScenarioEditorToolbarWindow(WindowDesc *desc) : Window(desc) { this->InitNested(0); @@ -2318,6 +2327,8 @@ struct ScenarioEditorToolbarWindow : Window { CLRBITS(this->flags, WF_WHITE_BORDER); PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); + + this->timer = MILLISECONDS_PER_TICK; } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2445,8 +2456,11 @@ struct ScenarioEditorToolbarWindow : Window { this->SetWidgetDirty(WID_TE_DATE_FORWARD); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!TimerElapsed(this->timer, delta_ms)) return; + this->timer = MILLISECONDS_PER_TICK; + if (this->IsWidgetLowered(WID_TE_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TE_PAUSE); this->SetDirty(); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 4926f7a4fc..7e0fa14b60 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1676,7 +1676,7 @@ public: this->SetDirty(); } - virtual void OnTick() + virtual void OnGameTick() { if (_pause_mode != PM_UNPAUSED) return; if (this->vehicles.NeedResort()) { @@ -2733,7 +2733,7 @@ public: } } - virtual void OnTick() + virtual void OnGameTick() { const Vehicle *v = Vehicle::Get(this->window_number); bool veh_stopped = v->IsStoppedInDepot(); diff --git a/src/window.cpp b/src/window.cpp index 22084c200e..7457bdcbf5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3074,14 +3074,33 @@ void InputLoop() HandleAutoscroll(); } +/** + * Dispatch OnRealtimeTick event over all windows + */ +void CallWindowRealtimeTickEvent(uint delta_ms) +{ + Window *w; + FOR_ALL_WINDOWS_FROM_FRONT(w) { + w->OnRealtimeTick(delta_ms); + } +} + /** * Update the continuously changing contents of the windows, such as the viewports */ void UpdateWindows() { + static uint32 last_realtime_tick = _realtime_tick; + uint delta_ms = _realtime_tick - last_realtime_tick; + last_realtime_tick = _realtime_tick; + + if (delta_ms == 0) return; + PerformanceMeasurer framerate(PFE_DRAWING); PerformanceAccumulator::Reset(PFE_DRAWWORLD); + CallWindowRealtimeTickEvent(delta_ms); + Window *w; static int highlight_timer = 1; @@ -3263,13 +3282,13 @@ void InvalidateWindowClassesData(WindowClass cls, int data, bool gui_scope) } /** - * Dispatch WE_TICK event over all windows + * Dispatch OnTick event over all windows */ -void CallWindowTickEvent() +void CallWindowGameTickEvent() { Window *w; FOR_ALL_WINDOWS_FROM_FRONT(w) { - w->OnTick(); + w->OnGameTick(); } } diff --git a/src/window_func.h b/src/window_func.h index 453b889789..f2ae638fe7 100644 --- a/src/window_func.h +++ b/src/window_func.h @@ -56,4 +56,36 @@ void DeleteWindowByClass(WindowClass cls); bool EditBoxInGlobalFocus(); Point GetCaretPosition(); +/** + * Count how many times the interval has elapsed, and update the timer. + * Use to ensure a specific amount of events happen within a timeframe, e.g. for animation. + * The timer value does not need to be initialised. + * @param timer Timer to test. Value will be increased. + * @param delta Time since last test. + * @param interval Timing interval. + * @return Number of times the interval has elapsed. + */ +static inline uint CountIntervalElapsed(uint &timer, uint delta, uint interval) +{ + uint count = delta / interval; + if (timer + (delta % interval) >= interval) count++; + timer = (timer + delta) % interval; + return count; +} + +/** + * Test if a timer has elapsed, and update the timer. + * Use to ensure an event happens only once within a timeframe, e.g. for window updates. + * The timer value must be initialised in order for the timer to elapsed. + * @param timer Timer to test. Value will be decreased. + * @param delta Time since last test. + * @return True iff the timer has elapsed. + */ +static inline bool TimerElapsed(int &timer, uint delta) +{ + if (timer <= 0) return false; + timer -= delta; + return timer <= 0; +} + #endif /* WINDOW_FUNC_H */ diff --git a/src/window_gui.h b/src/window_gui.h index b81b06e391..f5f9734c37 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -678,13 +678,18 @@ public: /** * Called once per (game) tick. */ - virtual void OnTick() {} + virtual void OnGameTick() {} /** * Called once every 100 (game) ticks. */ virtual void OnHundredthTick() {} + /** + * Called periodically. + */ + virtual void OnRealtimeTick(uint delta_ms) {} + /** * Called when this window's timeout has been reached. */ From 15320a37b9255f28b5e66404b33e6fb0f1f05e9e Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 4 May 2018 21:40:59 +0100 Subject: [PATCH 08/30] Change: OnGameTick() is only called when not paused. --- src/graph_gui.cpp | 2 -- src/group_gui.cpp | 1 - src/industry_gui.cpp | 1 - src/station_gui.cpp | 1 - src/vehicle_gui.cpp | 1 - 5 files changed, 6 deletions(-) diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 4f8fe68704..bbf1c22d62 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1474,8 +1474,6 @@ struct PerformanceRatingDetailWindow : Window { virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; - /* Update the company score every 5 days */ if (--this->timeout == 0) { this->UpdateCompanyStats(); diff --git a/src/group_gui.cpp b/src/group_gui.cpp index dbb1baa0f7..7db04e9b35 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -860,7 +860,6 @@ public: virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->groups.NeedResort() || this->vehicles.NeedResort()) { this->SetDirty(); } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 50ef283591..05cc67ee2b 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -649,7 +649,6 @@ public: virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (!this->timer_enabled) return; if (--this->callback_timer == 0) { /* We have just passed another day. diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 4c0bf295ce..11af2f55f4 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -623,7 +623,6 @@ public: virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->stations.NeedResort()) { DEBUG(misc, 3, "Periodic rebuild station list company %d", this->window_number); this->SetDirty(); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 7e0fa14b60..450b0cc2d8 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1678,7 +1678,6 @@ public: virtual void OnGameTick() { - if (_pause_mode != PM_UNPAUSED) return; if (this->vehicles.NeedResort()) { StationID station = (this->vli.type == VL_STATION_LIST) ? this->vli.index : INVALID_STATION; From ead9c9eab5d206cb13eb169e392e1291e767efaf Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 10 May 2018 21:49:52 +0100 Subject: [PATCH 09/30] Change: Switch various window timers to real time instead of game ticks. --- src/openttd.cpp | 11 ---------- src/window.cpp | 53 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/openttd.cpp b/src/openttd.cpp index fdde191402..0e0b4188a4 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1473,10 +1473,6 @@ void GameLoop() IncreaseSpriteLRU(); InteractiveRandom(); - extern int _caret_timer; - _caret_timer += 3; - CursorTick(); - #ifdef ENABLE_NETWORK /* Check for UDP stuff */ if (_network_available) NetworkBackgroundLoop(); @@ -1493,13 +1489,6 @@ void GameLoop() /* Singleplayer */ StateGameLoop(); } - - /* Check chat messages roughly once a second. */ - static uint check_message = 0; - if (++check_message > 1000 / MILLISECONDS_PER_TICK) { - check_message = 0; - NetworkChatMessageLoop(); - } #else StateGameLoop(); #endif /* ENABLE_NETWORK */ diff --git a/src/window.cpp b/src/window.cpp index 7457bdcbf5..64bb8fcbbb 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -37,6 +37,7 @@ #include "game/game.hpp" #include "video/video_driver.hpp" #include "framerate_type.h" +#include "network/network_func.h" #include "safeguards.h" @@ -1919,6 +1920,8 @@ void ResetWindowSystem() static void DecreaseWindowCounters() { + if (_scroller_click_timeout != 0) _scroller_click_timeout--; + Window *w; FOR_ALL_WINDOWS_FROM_FRONT(w) { if (_scroller_click_timeout == 0) { @@ -3046,7 +3049,6 @@ void InputLoop() assert(HasModalProgress() || IsLocalCompany()); CheckSoftLimit(); - HandleKeyScrolling(); /* Do the actual free of the deleted windows. */ for (Window *v = _z_front_window; v != NULL; /* nothing */) { @@ -3059,9 +3061,6 @@ void InputLoop() free(w); } - if (_scroller_click_timeout != 0) _scroller_click_timeout--; - DecreaseWindowCounters(); - if (_input_events_this_tick != 0) { /* The input loop is called only once per GameLoop() - so we can clear the counter here */ _input_events_this_tick = 0; @@ -3071,7 +3070,6 @@ void InputLoop() /* HandleMouseEvents was already called for this tick */ HandleMouseEvents(); - HandleAutoscroll(); } /** @@ -3101,11 +3099,30 @@ void UpdateWindows() CallWindowRealtimeTickEvent(delta_ms); + static int network_message_timer = 1; + if (TimerElapsed(network_message_timer, delta_ms)) { + network_message_timer = 1000; + NetworkChatMessageLoop(); + } + Window *w; + static int window_timer = 1; + if (TimerElapsed(window_timer, delta_ms)) { + window_timer = MILLISECONDS_PER_TICK; + + extern int _caret_timer; + _caret_timer += 3; + CursorTick(); + + HandleKeyScrolling(); + HandleAutoscroll(); + DecreaseWindowCounters(); + } + static int highlight_timer = 1; - if (--highlight_timer == 0) { - highlight_timer = 15; + if (TimerElapsed(highlight_timer, delta_ms)) { + highlight_timer = 450; _window_highlight_colour = !_window_highlight_colour; } @@ -3118,25 +3135,25 @@ void UpdateWindows() * But still empty the invalidation queues above. */ if (_network_dedicated) return; - static int we4_timer = 0; - int t = we4_timer + 1; + static int hundredth_timer = 1; + if (TimerElapsed(hundredth_timer, delta_ms)) { + hundredth_timer = 3000; // Historical reason: 100 * MILLISECONDS_PER_TICK - if (t >= 100) { FOR_ALL_WINDOWS_FROM_FRONT(w) { w->OnHundredthTick(); } - t = 0; } - we4_timer = t; - FOR_ALL_WINDOWS_FROM_FRONT(w) { - if ((w->flags & WF_WHITE_BORDER) && --w->white_border_timer == 0) { - CLRBITS(w->flags, WF_WHITE_BORDER); - w->SetDirty(); + if (window_timer == MILLISECONDS_PER_TICK) { // window_timer has elapsed this call + FOR_ALL_WINDOWS_FROM_FRONT(w) { + if ((w->flags & WF_WHITE_BORDER) && --w->white_border_timer == 0) { + CLRBITS(w->flags, WF_WHITE_BORDER); + w->SetDirty(); + } } - } - DrawDirtyBlocks(); + DrawDirtyBlocks(); + } FOR_ALL_WINDOWS_FROM_BACK(w) { /* Update viewport only if window is not shaded. */ From 59fe4f28c8f0bf47e7af40095dc6fba145188930 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 11 May 2018 17:52:06 +0100 Subject: [PATCH 10/30] Change: Animate text effects by real time instead of game ticks. --- src/openttd.cpp | 2 -- src/texteff.cpp | 12 +++++++++--- src/texteff.hpp | 2 +- src/window.cpp | 2 ++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/openttd.cpp b/src/openttd.cpp index 0e0b4188a4..49d5e8250c 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1495,8 +1495,6 @@ void GameLoop() if (!_pause_mode && HasBit(_display_opt, DO_FULL_ANIMATION)) DoPaletteAnimations(); - if (!_pause_mode || _game_mode == GM_EDITOR || _settings_game.construction.command_pause_level > CMDPL_NO_CONSTRUCTION) MoveAllTextEffects(); - InputLoop(); SoundDriver::GetInstance()->MainLoop(); diff --git a/src/texteff.cpp b/src/texteff.cpp index cdb8b8ce6a..0f79f51c12 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -16,6 +16,7 @@ #include "core/smallvec_type.hpp" #include "viewport_func.h" #include "settings_type.h" +#include "window_func.h" #include "safeguards.h" @@ -82,20 +83,25 @@ void RemoveTextEffect(TextEffectID te_id) _text_effects[te_id].Reset(); } -void MoveAllTextEffects() +void MoveAllTextEffects(uint delta_ms) { + static uint texteffecttimer = 0; + uint count = CountIntervalElapsed(texteffecttimer, delta_ms, MILLISECONDS_PER_TICK); + if (count == 0) return; + const TextEffect *end = _text_effects.End(); for (TextEffect *te = _text_effects.Begin(); te != end; te++) { if (te->string_id == INVALID_STRING_ID) continue; if (te->mode != TE_RISING) continue; - if (te->duration-- == 0) { + if (te->duration < count) { te->Reset(); continue; } te->MarkDirty(ZOOM_LVL_OUT_8X); - te->top -= ZOOM_LVL_BASE; + te->duration -= count; + te->top -= count * ZOOM_LVL_BASE; te->MarkDirty(ZOOM_LVL_OUT_8X); } } diff --git a/src/texteff.hpp b/src/texteff.hpp index 9ef74c1714..114cebed02 100644 --- a/src/texteff.hpp +++ b/src/texteff.hpp @@ -28,7 +28,7 @@ enum TextEffectMode { typedef uint16 TextEffectID; -void MoveAllTextEffects(); +void MoveAllTextEffects(uint delta_ms); TextEffectID AddTextEffect(StringID msg, int x, int y, uint8 duration, TextEffectMode mode); void InitTextEffects(); void DrawTextEffects(DrawPixelInfo *dpi); diff --git a/src/window.cpp b/src/window.cpp index 64bb8fcbbb..efa206d565 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3126,6 +3126,8 @@ void UpdateWindows() _window_highlight_colour = !_window_highlight_colour; } + if (!_pause_mode || _game_mode == GM_EDITOR || _settings_game.construction.command_pause_level > CMDPL_NO_CONSTRUCTION) MoveAllTextEffects(delta_ms); + FOR_ALL_WINDOWS_FROM_FRONT(w) { w->ProcessScheduledInvalidations(); w->ProcessHighlightedInvalidations(); From 806e7d25dddcc8b0e9c3f372ed956c63c6508381 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 20 May 2018 09:58:36 +0100 Subject: [PATCH 11/30] Change: Use GUITimer class instead of bare int/uints. --- projects/openttd_vs140.vcxproj | 1 + projects/openttd_vs140.vcxproj.filters | 3 ++ projects/openttd_vs141.vcxproj | 1 + projects/openttd_vs141.vcxproj.filters | 3 ++ source.list | 1 + src/guitimer_func.h | 65 ++++++++++++++++++++++++++ src/main_gui.cpp | 13 +++--- src/misc_gui.cpp | 6 ++- src/newgrf_gui.cpp | 8 ++-- src/news_gui.cpp | 7 ++- src/smallmap_gui.cpp | 9 ++-- src/smallmap_gui.h | 3 +- src/statusbar_gui.cpp | 21 +++++---- src/texteff.cpp | 6 +-- src/toolbar_gui.cpp | 17 +++---- src/window.cpp | 29 ++++++------ src/window_func.h | 32 ------------- 17 files changed, 140 insertions(+), 85 deletions(-) create mode 100644 src/guitimer_func.h diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj index dccc5e4f6c..0ca84bed3d 100644 --- a/projects/openttd_vs140.vcxproj +++ b/projects/openttd_vs140.vcxproj @@ -521,6 +521,7 @@ + diff --git a/projects/openttd_vs140.vcxproj.filters b/projects/openttd_vs140.vcxproj.filters index 47f431e556..7ad671fc7c 100644 --- a/projects/openttd_vs140.vcxproj.filters +++ b/projects/openttd_vs140.vcxproj.filters @@ -651,6 +651,9 @@ Header Files + + Header Files + Header Files diff --git a/projects/openttd_vs141.vcxproj b/projects/openttd_vs141.vcxproj index 8167bce6cb..ec563572f3 100644 --- a/projects/openttd_vs141.vcxproj +++ b/projects/openttd_vs141.vcxproj @@ -521,6 +521,7 @@ + diff --git a/projects/openttd_vs141.vcxproj.filters b/projects/openttd_vs141.vcxproj.filters index 47f431e556..7ad671fc7c 100644 --- a/projects/openttd_vs141.vcxproj.filters +++ b/projects/openttd_vs141.vcxproj.filters @@ -651,6 +651,9 @@ Header Files + + Header Files + Header Files diff --git a/source.list b/source.list index b89f7d736d..f78b8cecff 100644 --- a/source.list +++ b/source.list @@ -210,6 +210,7 @@ group.h group_gui.h group_type.h gui.h +guitimer_func.h heightmap.h highscore.h hotkeys.h diff --git a/src/guitimer_func.h b/src/guitimer_func.h new file mode 100644 index 0000000000..44ce042287 --- /dev/null +++ b/src/guitimer_func.h @@ -0,0 +1,65 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file guitimer_func.h GUI Timers. */ + +#ifndef GUITIMER_FUNC_H +#define GUITIMER_FUNC_H + +class GUITimer +{ +protected: + uint timer; + uint interval; + +public: + GUITimer() : timer(0), interval(0) { } + explicit GUITimer(uint interval) : timer(0), interval(interval) { } + + inline bool HasElapsed() const + { + return this->interval == 0; + } + + inline void SetInterval(uint interval) + { + this->timer = 0; + this->interval = interval; + } + + /** + * Count how many times the interval has elapsed. + * Use to ensure a specific amount of events happen within a timeframe, e.g. for animation. + * @param delta Time since last test. + * @return Number of times the interval has elapsed. + */ + inline uint CountElapsed(uint delta) + { + if (this->interval == 0) return 0; + uint count = delta / this->interval; + if (this->timer + (delta % this->interval) >= this->interval) count++; + this->timer = (this->timer + delta) % this->interval; + return count; + } + + /** + * Test if a timer has elapsed. + * Use to ensure an event happens only once within a timeframe, e.g. for window updates. + * @param delta Time since last test. + * @return True iff the timer has elapsed. + */ + inline bool Elapsed(uint delta) + { + if (this->CountElapsed(delta) == 0) return false; + this->SetInterval(0); + return true; + } +}; + +#endif /* GUITIMER_FUNC_H */ diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 12ee574bb6..2eb24c8dc2 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -32,6 +32,7 @@ #include "linkgraph/linkgraph_gui.h" #include "tilehighlight_func.h" #include "hotkeys.h" +#include "guitimer_func.h" #include "saveload/saveload.h" @@ -235,7 +236,7 @@ enum { struct MainWindow : Window { - int refresh; + GUITimer refresh; /* Refresh times in milliseconds */ static const uint LINKGRAPH_REFRESH_PERIOD = 7650; @@ -251,14 +252,14 @@ struct MainWindow : Window nvp->InitializeViewport(this, TileXY(32, 32), ZOOM_LVL_VIEWPORT); this->viewport->overlay = new LinkGraphOverlay(this, WID_M_VIEWPORT, 0, 0, 3); - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } virtual void OnRealtimeTick(uint delta_ms) { - if (!TimerElapsed(this->refresh, delta_ms)) return; + if (!this->refresh.Elapsed(delta_ms)) return; - this->refresh = LINKGRAPH_REFRESH_PERIOD; + this->refresh.SetInterval(LINKGRAPH_REFRESH_PERIOD); if (this->viewport->overlay->GetCargoMask() == 0 || this->viewport->overlay->GetCompanyMask() == 0) { @@ -435,7 +436,7 @@ struct MainWindow : Window this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom); this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x; this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y; - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } virtual void OnMouseWheel(int wheel) @@ -450,7 +451,7 @@ struct MainWindow : Window if (this->viewport != NULL) { NWidgetViewport *nvp = this->GetWidget(WID_M_VIEWPORT); nvp->UpdateViewportCoordinates(this); - this->refresh = LINKGRAPH_DELAY; + this->refresh.SetInterval(LINKGRAPH_DELAY); } } diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 31faae2d4e..149ebe7177 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -26,6 +26,7 @@ #include "core/geometry_func.hpp" #include "newgrf_debug.h" #include "zoom_func.h" +#include "guitimer_func.h" #include "widgets/misc_widget.h" @@ -458,13 +459,14 @@ struct AboutWindow : public Window { static const int num_visible_lines = 19; ///< The number of lines visible simultaneously static const uint TIMER_INTERVAL = 150; ///< Scrolling interval in ms - uint timer; + GUITimer timer; AboutWindow() : Window(&_about_desc) { this->InitNested(WN_GAME_OPTIONS_ABOUT); this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y; + this->timer.SetInterval(TIMER_INTERVAL); } virtual void SetStringParameters(int widget) const @@ -505,7 +507,7 @@ struct AboutWindow : public Window { virtual void OnRealtimeTick(uint delta_ms) { - uint count = CountIntervalElapsed(this->timer, delta_ms, TIMER_INTERVAL); + uint count = this->timer.CountElapsed(delta_ms); if (count > 0) { this->text_position -= count; /* If the last text has scrolled start a new from the start */ diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 0b0512544e..6a45304833 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -30,6 +30,7 @@ #include "textfile_gui.h" #include "tilehighlight_func.h" #include "fios.h" +#include "guitimer_func.h" #include "widgets/newgrf_widget.h" #include "widgets/misc_widget.h" @@ -150,7 +151,7 @@ struct NewGRFParametersWindow : public Window { bool clicked_increase; ///< True if the increase button was clicked, false for the decrease button. bool clicked_dropdown; ///< Whether the dropdown is open. bool closing_dropdown; ///< True, if the dropdown list is currently closing. - int timeout; ///< How long before we unpress the last-pressed button? + GUITimer timeout; ///< How long before we unpress the last-pressed button? uint clicked_row; ///< The selected parameter int line_height; ///< Height of a row in the matrix widget. Scrollbar *vscroll; @@ -162,7 +163,6 @@ struct NewGRFParametersWindow : public Window { clicked_button(UINT_MAX), clicked_dropdown(false), closing_dropdown(false), - timeout(0), clicked_row(UINT_MAX), editable(editable) { @@ -403,7 +403,7 @@ struct NewGRFParametersWindow : public Window { par_info->SetValue(this->grf_config, val); this->clicked_button = num; - this->timeout = 150; + this->timeout.SetInterval(150); } } else if (par_info->type == PTYPE_UINT_ENUM && !par_info->complete_labels && click_count >= 2) { /* Display a query box so users can enter a custom value. */ @@ -485,7 +485,7 @@ struct NewGRFParametersWindow : public Window { virtual void OnRealtimeTick(uint delta_ms) { - if (TimerElapsed(this->timeout, delta_ms)) { + if (timeout.Elapsed(delta_ms)) { this->clicked_button = UINT_MAX; this->SetDirty(); } diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 183b27b90e..b79418c899 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -33,6 +33,7 @@ #include "command_func.h" #include "company_base.h" #include "settings_internal.h" +#include "guitimer_func.h" #include "widgets/news_widget.h" @@ -262,7 +263,7 @@ struct NewsWindow : Window { const NewsItem *ni; ///< News item to display. static int duration; ///< Remaining time for showing the current news message (may only be access while a news item is displayed). - uint timer; + GUITimer timer; NewsWindow(WindowDesc *desc, const NewsItem *ni) : Window(desc), ni(ni) { @@ -273,6 +274,8 @@ struct NewsWindow : Window { this->flags |= WF_DISABLE_VP_SCROLL; + this->timer.SetInterval(15); + this->CreateNestedTree(); /* For company news with a face we have a separate headline in param[0] */ @@ -489,7 +492,7 @@ struct NewsWindow : Window { virtual void OnRealtimeTick(uint delta_ms) { - int count = CountIntervalElapsed(this->timer, delta_ms, 15); + int count = this->timer.CountElapsed(delta_ms); if (count > 0) { /* Scroll up newsmessages from the bottom */ int newtop = max(this->top - 2 * count, _screen.height - this->height - this->status_height - this->chat_height); diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 447d25e4a0..df9fd2df23 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -23,6 +23,7 @@ #include "sound_func.h" #include "window_func.h" #include "company_base.h" +#include "guitimer_func.h" #include "smallmap_gui.h" @@ -1055,7 +1056,7 @@ void SmallMapWindow::SetupWidgetData() this->GetWidget(WID_SM_SELECT_BUTTONS)->SetDisplayedPlane(plane); } -SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(FORCE_REFRESH_PERIOD) +SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(GUITimer(FORCE_REFRESH_PERIOD)) { _smallmap_industry_highlight = INVALID_INDUSTRYTYPE; this->overlay = new LinkGraphOverlay(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1); @@ -1390,7 +1391,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } if (new_highlight != _smallmap_industry_highlight) { _smallmap_industry_highlight = new_highlight; - this->refresh = _smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD; + this->refresh.SetInterval(_smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD); _smallmap_industry_highlight_state = true; this->SetDirty(); } @@ -1573,7 +1574,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) /* virtual */ void SmallMapWindow::OnRealtimeTick(uint delta_ms) { /* Update the window every now and then */ - if (!TimerElapsed(this->refresh, delta_ms)) return; + if (!this->refresh.Elapsed(delta_ms)) return; if (this->map_type == SMT_LINKSTATS) { uint32 company_mask = this->GetOverlayCompanyMask(); @@ -1585,7 +1586,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) } _smallmap_industry_highlight_state = !_smallmap_industry_highlight_state; - this->refresh = _smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD; + this->refresh.SetInterval(_smallmap_industry_highlight != INVALID_INDUSTRYTYPE ? BLINK_PERIOD : FORCE_REFRESH_PERIOD); this->SetDirty(); } diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h index 60b39b7a3c..486f2a6524 100644 --- a/src/smallmap_gui.h +++ b/src/smallmap_gui.h @@ -19,6 +19,7 @@ #include "blitter/factory.hpp" #include "linkgraph/linkgraph_gui.h" #include "widgets/smallmap_widget.h" +#include "guitimer_func.h" /* set up the cargos to be displayed in the smallmap's route legend */ void BuildLinkStatsLegend(); @@ -79,7 +80,7 @@ protected: int32 subscroll; ///< Number of pixels (0..3) between the right end of the base tile and the pixel at the top-left corner of the smallmap display. int zoom; ///< Zoom level. Bigger number means more zoom-out (further away). - int refresh; ///< Refresh timer, in millseconds. + GUITimer refresh; ///< Refresh timer. LinkGraphOverlay *overlay; static void BreakIndustryChainLink(); diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index e45697130d..88ba495f34 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -26,6 +26,7 @@ #include "statusbar_gui.h" #include "toolbar_gui.h" #include "core/geometry_func.hpp" +#include "guitimer_func.h" #include "widgets/statusbar_widget.h" @@ -79,8 +80,8 @@ static bool DrawScrollingStatusText(const NewsItem *ni, int scroll_pos, int left struct StatusBarWindow : Window { bool saving; int ticker_scroll; - uint ticker_timer; - int reminder_timeout; + GUITimer ticker_timer; + GUITimer reminder_timeout; static const int TICKER_STOP = 1640; ///< scrolling is finished when counter reaches this value static const int REMINDER_START = 1350; ///< time in ms for reminder notification (red dot on the right) to stay @@ -89,8 +90,9 @@ struct StatusBarWindow : Window { StatusBarWindow(WindowDesc *desc) : Window(desc) { - this->ticker_scroll = TICKER_STOP; - this->reminder_timeout = REMINDER_STOP; + this->ticker_scroll = TICKER_STOP; + this->ticker_timer.SetInterval(15); + this->reminder_timeout.SetInterval(REMINDER_STOP); this->InitNested(); CLRBITS(this->flags, WF_WHITE_BORDER); @@ -180,7 +182,7 @@ struct StatusBarWindow : Window { } } - if (this->reminder_timeout > 0) { + if (!this->reminder_timeout.HasElapsed()) { Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS); DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, r.right - WD_FRAMERECT_RIGHT - icon_size.width, r.top + WD_FRAMERECT_TOP + (int)(FONT_HEIGHT_NORMAL - icon_size.height) / 2); } @@ -201,11 +203,10 @@ struct StatusBarWindow : Window { case SBI_SAVELOAD_START: this->saving = true; break; case SBI_SAVELOAD_FINISH: this->saving = false; break; case SBI_SHOW_TICKER: this->ticker_scroll = 0; break; - case SBI_SHOW_REMINDER: this->reminder_timeout = REMINDER_START; break; + case SBI_SHOW_REMINDER: this->reminder_timeout.SetInterval(REMINDER_START); break; case SBI_NEWS_DELETED: this->ticker_scroll = TICKER_STOP; // reset ticker ... - this->ticker_timer = 0; - this->reminder_timeout = REMINDER_STOP; // ... and reminder + this->reminder_timeout.SetInterval(REMINDER_STOP); // ... and reminder break; } } @@ -224,7 +225,7 @@ struct StatusBarWindow : Window { if (_pause_mode != PM_UNPAUSED) return; if (this->ticker_scroll < TICKER_STOP) { // Scrolling text - uint count = CountIntervalElapsed(this->ticker_timer, delta_ms, 15); + uint count = this->ticker_timer.CountElapsed(delta_ms); if (count > 0) { this->ticker_scroll += count; this->SetWidgetDirty(WID_S_MIDDLE); @@ -232,7 +233,7 @@ struct StatusBarWindow : Window { } // Red blot to show there are new unread newsmessages - if (TimerElapsed(this->reminder_timeout, delta_ms)) { + if (this->reminder_timeout.Elapsed(delta_ms)) { this->SetWidgetDirty(WID_S_MIDDLE); } } diff --git a/src/texteff.cpp b/src/texteff.cpp index 0f79f51c12..ee5ce592b4 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -16,7 +16,7 @@ #include "core/smallvec_type.hpp" #include "viewport_func.h" #include "settings_type.h" -#include "window_func.h" +#include "guitimer_func.h" #include "safeguards.h" @@ -85,8 +85,8 @@ void RemoveTextEffect(TextEffectID te_id) void MoveAllTextEffects(uint delta_ms) { - static uint texteffecttimer = 0; - uint count = CountIntervalElapsed(texteffecttimer, delta_ms, MILLISECONDS_PER_TICK); + static GUITimer texteffecttimer = GUITimer(MILLISECONDS_PER_TICK); + uint count = texteffecttimer.CountElapsed(delta_ms); if (count == 0) return; const TextEffect *end = _text_effects.End(); diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 4f0f140115..cd0f518dfd 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -48,6 +48,7 @@ #include "story_base.h" #include "toolbar_gui.h" #include "framerate_type.h" +#include "guitimer_func.h" #include "widgets/toolbar_widget.h" @@ -1978,7 +1979,7 @@ enum MainToolbarHotkeys { /** Main toolbar. */ struct MainToolbarWindow : Window { - int timer; + GUITimer timer; MainToolbarWindow(WindowDesc *desc) : Window(desc) { @@ -1991,7 +1992,7 @@ struct MainToolbarWindow : Window { PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); - this->timer = MILLISECONDS_PER_TICK; + this->timer.SetInterval(MILLISECONDS_PER_TICK); } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2098,8 +2099,8 @@ struct MainToolbarWindow : Window { virtual void OnRealtimeTick(uint delta_ms) { - if (!TimerElapsed(this->timer, delta_ms)) return; - this->timer = MILLISECONDS_PER_TICK; + if (!this->timer.Elapsed(delta_ms)) return; + this->timer.SetInterval(MILLISECONDS_PER_TICK); if (this->IsWidgetLowered(WID_TN_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TN_PAUSE); @@ -2317,7 +2318,7 @@ enum MainToolbarEditorHotkeys { }; struct ScenarioEditorToolbarWindow : Window { - int timer; + GUITimer timer; ScenarioEditorToolbarWindow(WindowDesc *desc) : Window(desc) { @@ -2328,7 +2329,7 @@ struct ScenarioEditorToolbarWindow : Window { PositionMainToolbar(this); DoZoomInOutWindow(ZOOM_NONE, this); - this->timer = MILLISECONDS_PER_TICK; + this->timer.SetInterval(MILLISECONDS_PER_TICK); } virtual void FindWindowPlacementAndResize(int def_width, int def_height) @@ -2458,8 +2459,8 @@ struct ScenarioEditorToolbarWindow : Window { virtual void OnRealtimeTick(uint delta_ms) { - if (!TimerElapsed(this->timer, delta_ms)) return; - this->timer = MILLISECONDS_PER_TICK; + if (!this->timer.Elapsed(delta_ms)) return; + this->timer.SetInterval(MILLISECONDS_PER_TICK); if (this->IsWidgetLowered(WID_TE_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(WID_TE_PAUSE); diff --git a/src/window.cpp b/src/window.cpp index efa206d565..bbde131a4b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -38,6 +38,7 @@ #include "video/video_driver.hpp" #include "framerate_type.h" #include "network/network_func.h" +#include "guitimer_func.h" #include "safeguards.h" @@ -3099,17 +3100,17 @@ void UpdateWindows() CallWindowRealtimeTickEvent(delta_ms); - static int network_message_timer = 1; - if (TimerElapsed(network_message_timer, delta_ms)) { - network_message_timer = 1000; + static GUITimer network_message_timer = GUITimer(1); + if (network_message_timer.Elapsed(delta_ms)) { + network_message_timer.SetInterval(1000); NetworkChatMessageLoop(); } Window *w; - static int window_timer = 1; - if (TimerElapsed(window_timer, delta_ms)) { - window_timer = MILLISECONDS_PER_TICK; + static GUITimer window_timer = GUITimer(1); + if (window_timer.Elapsed(delta_ms)) { + if (_network_dedicated) window_timer.SetInterval(MILLISECONDS_PER_TICK); extern int _caret_timer; _caret_timer += 3; @@ -3120,9 +3121,9 @@ void UpdateWindows() DecreaseWindowCounters(); } - static int highlight_timer = 1; - if (TimerElapsed(highlight_timer, delta_ms)) { - highlight_timer = 450; + static GUITimer highlight_timer = GUITimer(1); + if (highlight_timer.Elapsed(delta_ms)) { + highlight_timer.SetInterval(450); _window_highlight_colour = !_window_highlight_colour; } @@ -3137,16 +3138,18 @@ void UpdateWindows() * But still empty the invalidation queues above. */ if (_network_dedicated) return; - static int hundredth_timer = 1; - if (TimerElapsed(hundredth_timer, delta_ms)) { - hundredth_timer = 3000; // Historical reason: 100 * MILLISECONDS_PER_TICK + static GUITimer hundredth_timer = GUITimer(1); + if (hundredth_timer.Elapsed(delta_ms)) { + hundredth_timer.SetInterval(3000); // Historical reason: 100 * MILLISECONDS_PER_TICK FOR_ALL_WINDOWS_FROM_FRONT(w) { w->OnHundredthTick(); } } - if (window_timer == MILLISECONDS_PER_TICK) { // window_timer has elapsed this call + if (window_timer.HasElapsed()) { + window_timer.SetInterval(MILLISECONDS_PER_TICK); + FOR_ALL_WINDOWS_FROM_FRONT(w) { if ((w->flags & WF_WHITE_BORDER) && --w->white_border_timer == 0) { CLRBITS(w->flags, WF_WHITE_BORDER); diff --git a/src/window_func.h b/src/window_func.h index f2ae638fe7..453b889789 100644 --- a/src/window_func.h +++ b/src/window_func.h @@ -56,36 +56,4 @@ void DeleteWindowByClass(WindowClass cls); bool EditBoxInGlobalFocus(); Point GetCaretPosition(); -/** - * Count how many times the interval has elapsed, and update the timer. - * Use to ensure a specific amount of events happen within a timeframe, e.g. for animation. - * The timer value does not need to be initialised. - * @param timer Timer to test. Value will be increased. - * @param delta Time since last test. - * @param interval Timing interval. - * @return Number of times the interval has elapsed. - */ -static inline uint CountIntervalElapsed(uint &timer, uint delta, uint interval) -{ - uint count = delta / interval; - if (timer + (delta % interval) >= interval) count++; - timer = (timer + delta) % interval; - return count; -} - -/** - * Test if a timer has elapsed, and update the timer. - * Use to ensure an event happens only once within a timeframe, e.g. for window updates. - * The timer value must be initialised in order for the timer to elapsed. - * @param timer Timer to test. Value will be decreased. - * @param delta Time since last test. - * @return True iff the timer has elapsed. - */ -static inline bool TimerElapsed(int &timer, uint delta) -{ - if (timer <= 0) return false; - timer -= delta; - return timer <= 0; -} - #endif /* WINDOW_FUNC_H */ From c693463c29f98f763cc4dd6346527262b34ff6ea Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 20 May 2018 13:03:09 +0100 Subject: [PATCH 12/30] Fix: Always draw dirty blocks, else fast-forward is super fast. --- src/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index bbde131a4b..7a7a2a1825 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3156,10 +3156,10 @@ void UpdateWindows() w->SetDirty(); } } - - DrawDirtyBlocks(); } + DrawDirtyBlocks(); + FOR_ALL_WINDOWS_FROM_BACK(w) { /* Update viewport only if window is not shaded. */ if (w->viewport != NULL && !w->IsShaded()) UpdateViewportPosition(w); From f99f993e99b662fe3621013d3468c3d75a12ecac Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 11 Jan 2019 12:41:12 +0000 Subject: [PATCH 13/30] Doc: replace 4 references to SVN with Git #6698 (#7036) --- README.md | 4 ++-- docs/HOWTO_compile_lang_files.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 96d3e49f36..6004bdc7f5 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ When you are sure it is not already reported you should: After you have done all that you can report the bug. Please include the following information in your bug report: -- OpenTTD version (PLEASE test the latest SVN/nightly build) +- OpenTTD version (PLEASE test the latest Git revision/nightly build) - Bug details, including instructions how to reproduce it - Platform (Windows, Linux, FreeBSD, …) and compiler (including version) if you compiled OpenTTD yourself. @@ -655,7 +655,7 @@ someone else may have already started translating to the same language. So, now that you have notified the development team about your intention to translate (You did, right? Of course you did.) you can pick up english.txt -(found in the SVN repository under /src/lang) and translate. +(found in the Git repository under /src/lang) and translate. You must change the first two lines of the file appropriately: diff --git a/docs/HOWTO_compile_lang_files.txt b/docs/HOWTO_compile_lang_files.txt index c56f97a621..547854e508 100644 --- a/docs/HOWTO_compile_lang_files.txt +++ b/docs/HOWTO_compile_lang_files.txt @@ -29,7 +29,7 @@ english.txt to work. Below are some examples of strgen usage. 1.1) Examples ---- -------- Example 1: -if you are in the root of your working copy (svn code), you should type +if you are in the root of your working copy (git repository), you should type strgen/strgen -s lang lang/english.txt to compile englist.txt into english.lng. It will be placed in the lang dir @@ -50,7 +50,7 @@ You can interchange english.txt to whichever language you want to generate a 1.2) strgen command switches ---- ----------------------- -v | --version -strgen will tell what svn revision it was last modified +strgen will tell what git revision it was last modified -t | --todo strgen will add to any untranslated/missing strings and use the english From fa95af2da8ddca0ddcef2b2e1a781818c8dd08da Mon Sep 17 00:00:00 2001 From: nikolas Date: Fri, 11 Jan 2019 10:08:02 -0500 Subject: [PATCH 14/30] Codechange: Fix typo in variable name: pices -> pieces (#7033) --- src/company_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index ac9ca9bda9..c62c6d61cf 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -2194,16 +2194,16 @@ struct CompanyWindow : Window uint y = r.top; /* Collect rail and road counts. */ - uint rail_pices = c->infrastructure.signal; + uint rail_pieces = c->infrastructure.signal; uint road_pieces = 0; - for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pices += c->infrastructure.rail[i]; + for (uint i = 0; i < lengthof(c->infrastructure.rail); i++) rail_pieces += c->infrastructure.rail[i]; for (uint i = 0; i < lengthof(c->infrastructure.road); i++) road_pieces += c->infrastructure.road[i]; - if (rail_pices == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) { + if (rail_pieces == 0 && road_pieces == 0 && c->infrastructure.water == 0 && c->infrastructure.station == 0 && c->infrastructure.airport == 0) { DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_NONE); } else { - if (rail_pices != 0) { - SetDParam(0, rail_pices); + if (rail_pieces != 0) { + SetDParam(0, rail_pieces); DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL); y += FONT_HEIGHT_NORMAL; } From c80608a83c774376e0bb65043e9218631b553867 Mon Sep 17 00:00:00 2001 From: translators Date: Fri, 11 Jan 2019 19:45:46 +0100 Subject: [PATCH 15/30] Update: Translations from eints spanish: 3 changes by SilverSurferZzZ spanish (mexican): 3 changes by Absay --- src/lang/spanish.txt | 5 +++-- src/lang/spanish_MX.txt | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 75550babea..2679486be2 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -190,6 +190,7 @@ STR_COLOUR_ORANGE :Naranja STR_COLOUR_BROWN :Marrón STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanco +STR_COLOUR_RANDOM :Aleatorio # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -374,7 +375,7 @@ STR_SCENEDIT_FILE_MENU_QUIT :Salir ############ range for settings menu starts STR_SETTINGS_MENU_GAME_OPTIONS :Opciones de juego STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :Configuración -STR_SETTINGS_MENU_SCRIPT_SETTINGS :Configuración de scripts +STR_SETTINGS_MENU_SCRIPT_SETTINGS :Configuración de Scripts STR_SETTINGS_MENU_NEWGRF_SETTINGS :Configuración NewGRF STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Opciones de transparencia STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Ver nombres de municipios @@ -4021,7 +4022,7 @@ STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Comproba STR_ERROR_AI_NO_AI_FOUND :No se encontró IA apropiada para cargar.{}Ésta es una IA por defecto que no realiza acción alguna.{}Puedes descargar nuevas IA mediante el sistema de 'Contenido Online' STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}Uno de los scripts ejecutados ha fallado. Por favor, informe del fallo al autor del script con una captura de la ventana de depuración de Script / IA -STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}La ventana de depuración de scripts solo está disponible para el servidor +STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}La ventana de depuración de Scripts solo está disponible para el servidor # AI configuration window STR_AI_CONFIG_CAPTION :{WHITE}Configuración de Scripts de Juego / IA diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 194364b1e9..6807929a4f 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -190,6 +190,7 @@ STR_COLOUR_ORANGE :Naranja STR_COLOUR_BROWN :Café STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Blanco +STR_COLOUR_RANDOM :Aleatorio # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -1259,6 +1260,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}No se pu STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantenimiento de infraestructura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cuando se activa, la infraestructura tiene costo de mantenimiento, el cual aumenta en relación con el tamaño de la red de transporte. Esto afecta en mayor medida a las empresas grandes que a las pequeñas +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Color inicial de la empresa: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Elegir el color inicial de la empresa STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Aeropuertos siempre disponibles: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Los tipos de aeropuertos estarán disponibles todo el tiempo tras haber sido introducidos From 65746a02757fc56bf72ec58121bc2bae26798585 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Thu, 10 Jan 2019 19:56:41 -0500 Subject: [PATCH 16/30] Fix: Spelling fixes on some Latin American town names --- src/table/townname.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/table/townname.h b/src/table/townname.h index 25c997d255..7f1f1b62bf 100644 --- a/src/table/townname.h +++ b/src/table/townname.h @@ -639,7 +639,7 @@ static const char * const _name_spanish_real[] = { "Barcelona", "Barinas", "San Crist\xC3\xB3""bal", - "San Fransisco", + "San Francisco", "San Mart\xC3\xADn", "Guayana", "San Carlos", @@ -650,14 +650,14 @@ static const char * const _name_spanish_real[] = { "Elorza", "Arismendi", "Trujillo", - "Carupano", + "Car\xC3\xBApano", "Anaco", "Lima", "Cuzco", "Iquitos", "Callao", "Huacho", - "Camana", + "Caman\xC3\xA1", "Puerto Chala", "Santa Cruz", "Quito", @@ -684,12 +684,12 @@ static const char * const _name_spanish_real[] = { "Potos\xC3\xAD", "Tupiza", "La Quiaca", - "Yacuiba", + "Yacu\xC3\xAD""ba", "San Borja", - "Fuerte Olimpio", + "Fuerte Olimpo", "Fort\xC3\xADn Esteros", "Campo Grande", - "Bogota", + "Bogot\xC3\xA1", "El Banco", "Zaragoza", "Neiva", From 06cd561cea26c41553b7a6b327a7ac1fbdea23d2 Mon Sep 17 00:00:00 2001 From: "Johannes E. Krause" Date: Mon, 7 Jan 2019 21:28:21 +0100 Subject: [PATCH 17/30] Add: when placing non-rectangular airport, consider airport tile table tiles only (patch by adf88, #6613) --- src/station_cmd.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 16f135df25..b4c7523606 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -771,22 +771,22 @@ CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z } /** - * Tries to clear the given area. - * @param tile_area Area to check. + * Checks if an airport can be built at the given location and clear the area. + * @param tile_iter Airport tile iterator. * @param flags Operation to perform. * @return The cost in case of success, or an error code if it failed. */ -CommandCost CheckFlatLand(TileArea tile_area, DoCommandFlag flags) +static CommandCost CheckFlatLandAirport(AirportTileTableIterator tile_iter, DoCommandFlag flags) { CommandCost cost(EXPENSES_CONSTRUCTION); int allowed_z = -1; - TILE_AREA_LOOP(tile_cur, tile_area) { - CommandCost ret = CheckBuildableTile(tile_cur, 0, allowed_z, true); + for (; tile_iter != INVALID_TILE; ++tile_iter) { + CommandCost ret = CheckBuildableTile(tile_iter, 0, allowed_z, true); if (ret.Failed()) return ret; cost.AddCost(ret); - ret = DoCommand(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR); + ret = DoCommand(tile_iter, 0, 0, flags, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; cost.AddCost(ret); } @@ -2218,11 +2218,11 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT); } - CommandCost cost = CheckFlatLand(airport_area, flags); + AirportTileTableIterator iter(as->table[layout], tile); + CommandCost cost = CheckFlatLandAirport(iter, flags); if (cost.Failed()) return cost; /* The noise level is the noise from the airport and reduce it to account for the distance to the town center. */ - AirportTileTableIterator iter(as->table[layout], tile); Town *nearest = AirportGetNearestTown(as, iter); uint newnoise_level = GetAirportNoiseLevelForTown(as, iter, nearest->xy); From 82e530b5172f12bb638a64f9c80c705a03559286 Mon Sep 17 00:00:00 2001 From: nikolas Date: Sat, 12 Jan 2019 02:33:13 -0500 Subject: [PATCH 18/30] Fix: Remove duplicate town name "Huacho" (#7038) Huacho appears twice in the Spanish town names list. This change removes the second one, and replaces it with a new one: Medellin. --- src/table/townname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/table/townname.h b/src/table/townname.h index 7f1f1b62bf..ce4e961751 100644 --- a/src/table/townname.h +++ b/src/table/townname.h @@ -662,7 +662,7 @@ static const char * const _name_spanish_real[] = { "Santa Cruz", "Quito", "Cuenca", - "Huacho", + "Medell\xC3\xADn", "Tulc\xC3\xA1n", "Esmeraldas", "Ibarra", From 0f9d1019e64db8fe2413ee730d99aa48c078da6c Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Thu, 10 Jan 2019 22:27:37 -0500 Subject: [PATCH 19/30] Add: Mexican Peso currency OpenTTD doesn't have any pesos, so I've added Mexican pesos, at its current exchange rate: 1GBP = 24.39MXN, rounded to 24. --- src/currency.cpp | 1 + src/currency.h | 1 + src/lang/english.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/src/currency.cpp b/src/currency.cpp index 615c5113bb..b87f77393b 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -63,6 +63,7 @@ static const CurrencySpec origin_currency_specs[CURRENCY_END] = { { 3, "", CF_NOEURO, "", NBSP "GEL", 1, STR_GAME_OPTIONS_CURRENCY_GEL }, ///< Georgian Lari { 4901, "", CF_NOEURO, "", NBSP "Rls", 1, STR_GAME_OPTIONS_CURRENCY_IRR }, ///< Iranian Rial { 80, "", CF_NOEURO, "", NBSP "rub", 1, STR_GAME_OPTIONS_CURRENCY_RUB }, ///< New Russian Ruble + { 24, "", CF_NOEURO, "$", "", 0, STR_GAME_OPTIONS_CURRENCY_MXN }, ///< Mexican peso }; /** Array of currencies used by the system */ diff --git a/src/currency.h b/src/currency.h index 2529aca11f..401df5ec1f 100644 --- a/src/currency.h +++ b/src/currency.h @@ -59,6 +59,7 @@ enum Currencies { CURRENCY_GEL, ///< Georgian Lari CURRENCY_IRR, ///< Iranian Rial CURRENCY_RUB, ///< New Russian Ruble + CURRENCY_MXN, ///< Mexican Peso CURRENCY_END, ///< always the last item }; diff --git a/src/lang/english.txt b/src/lang/english.txt index c0231557ce..e272dd1688 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -930,6 +930,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Custom... STR_GAME_OPTIONS_CURRENCY_GEL :Georgian Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranian Rial (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :New Russian Ruble (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Mexican Peso (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Road vehicles From 96854b2b8bea85926113326e1fd37ee357f7e59e Mon Sep 17 00:00:00 2001 From: Joan Josep Date: Sat, 12 Jan 2019 18:04:04 +0100 Subject: [PATCH 20/30] Codechange #5859: Simplify CheckTrainStayInDepot() (#7045) --- src/train_cmd.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index c8387d0a95..01aa946edb 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2149,12 +2149,10 @@ static bool CheckTrainStayInDepot(Train *v) seg_state = _settings_game.pf.reserve_paths ? SIGSEG_PBS : UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner); } - /* We are leaving a depot, but have to go to the exact same one; re-enter */ + /* We are leaving a depot, but have to go to the exact same one; re-enter. */ if (v->current_order.IsType(OT_GOTO_DEPOT) && v->tile == v->dest_tile) { - /* We need to have a reservation for this to work. */ - if (HasDepotReservation(v->tile)) return true; - SetDepotReservation(v->tile, true); - VehicleEnterDepot(v); + /* Service when depot has no reservation. */ + if (!HasDepotReservation(v->tile)) VehicleEnterDepot(v); return true; } From 9aecbac2b4a4137abc44ff12a672916ec7482047 Mon Sep 17 00:00:00 2001 From: Joan Josep Date: Sun, 13 Jan 2019 00:20:10 +0100 Subject: [PATCH 21/30] Codechange: Define INVALID_TOWN as a TownID (#7044) --- src/road_cmd.cpp | 6 +++--- src/town.h | 2 +- src/town_cmd.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index bdc8ce7f30..175e776e5e 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -333,7 +333,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec if (rt == ROADTYPE_ROAD && IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_TOWN)) { /* Update nearest-town index */ const Town *town = CalcClosestTownFromTile(tile); - SetTownIndex(tile, town == NULL ? (TownID)INVALID_TOWN : town->index); + SetTownIndex(tile, town == NULL ? INVALID_TOWN : town->index); } SetRoadBits(tile, ROAD_NONE, rt); SetRoadTypes(tile, rts); @@ -494,7 +494,7 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if ((Company::IsValidID(company) && p2 != 0) || (company == OWNER_TOWN && !Town::IsValidID(p2)) || (company == OWNER_DEITY && p2 != 0)) return CMD_ERROR; if (company != OWNER_TOWN) { const Town *town = CalcClosestTownFromTile(tile); - p2 = (town != NULL) ? town->index : (TownID)INVALID_TOWN; + p2 = (town != NULL) ? town->index : INVALID_TOWN; if (company == OWNER_DEITY) { company = OWNER_TOWN; @@ -1444,7 +1444,7 @@ void UpdateNearestTownForRoadTiles(bool invalidate) for (TileIndex t = 0; t < MapSize(); t++) { if (IsTileType(t, MP_ROAD) && !IsRoadDepot(t) && !HasTownOwnedRoad(t)) { - TownID tid = (TownID)INVALID_TOWN; + TownID tid = INVALID_TOWN; if (!invalidate) { const Town *town = CalcClosestTownFromTile(t); if (town != NULL) tid = town->index; diff --git a/src/town.h b/src/town.h index 19a4118bad..a905ea837b 100644 --- a/src/town.h +++ b/src/town.h @@ -31,7 +31,7 @@ typedef TileMatrix AcceptanceMatrix; static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation -static const uint INVALID_TOWN = 0xFFFF; +static const TownID INVALID_TOWN = 0xFFFF; static const uint TOWN_GROWTH_WINTER = 0xFFFFFFFE; ///< The town only needs this cargo in the winter (any amount) static const uint TOWN_GROWTH_DESERT = 0xFFFFFFFF; ///< The town needs the cargo for growth when on desert (any amount) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 927651864f..4289d901a1 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -3335,7 +3335,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold) if (!HasTownOwnedRoad(tile)) { TownID tid = GetTownIndex(tile); - if (tid == (TownID)INVALID_TOWN) { + if (tid == INVALID_TOWN) { /* in the case we are generating "many random towns", this value may be INVALID_TOWN */ if (_generating_world) return CalcClosestTownFromTile(tile, threshold); assert(Town::GetNumItems() == 0); From 5ff0c24993c52546f1809e87a036d1e8f21d6e17 Mon Sep 17 00:00:00 2001 From: PeterN Date: Sat, 12 Jan 2019 23:23:23 +0000 Subject: [PATCH 22/30] Fix #6780: Some windows didn't get updated from OnTick() (#7048) --- src/ai/ai_gui.cpp | 9 +++++---- src/framerate_gui.cpp | 25 ++++++++++++++----------- src/network/network_gui.cpp | 9 ++++++++- src/widgets/dropdown.cpp | 8 +++++++- src/window.cpp | 2 +- 5 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 101a97d0a9..4b248f5efc 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -29,6 +29,7 @@ #include "../widgets/dropdown_func.h" #include "../hotkeys.h" #include "../core/geometry_func.hpp" +#include "../guitimer_func.h" #include "ai.hpp" #include "ai_gui.hpp" @@ -286,7 +287,7 @@ struct AISettingsWindow : public Window { bool clicked_increase; ///< Whether we clicked the increase or decrease button. bool clicked_dropdown; ///< Whether the dropdown is open. bool closing_dropdown; ///< True, if the dropdown list is currently closing. - int timeout; ///< Timeout for unclicking the button. + GUITimer timeout; ///< Timeout for unclicking the button. int clicked_row; ///< The clicked row of settings. int line_height; ///< Height of a row in the matrix widget. Scrollbar *vscroll; ///< Cache of the vertical scrollbar. @@ -505,7 +506,7 @@ struct AISettingsWindow : public Window { if (new_val != old_val) { this->ai_config->SetSetting(config_item.name, new_val); this->clicked_button = num; - this->timeout = 5; + this->timeout.SetInterval(150); } } else if (!bool_item && !config_item.complete_labels) { /* Display a query box so users can enter a custom value. */ @@ -568,9 +569,9 @@ struct AISettingsWindow : public Window { this->vscroll->SetCapacityFromWidget(this, WID_AIS_BACKGROUND); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { - if (--this->timeout == 0) { + if (this->timeout.Elapsed(delta_ms)) { this->clicked_button = -1; this->SetDirty(); } diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 7e8e5f34fd..908cf81c0b 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -15,9 +15,9 @@ #include "window_gui.h" #include "table/sprites.h" #include "strings_func.h" -#include "debug.h" #include "console_func.h" #include "console_type.h" +#include "guitimer_func.h" #include "widgets/framerate_widget.h" @@ -295,7 +295,7 @@ static const NWidgetPart _framerate_window_widgets[] = { struct FramerateWindow : Window { bool small; - uint32 next_update; + GUITimer next_update; struct CachedDecimal { StringID strid; @@ -339,21 +339,24 @@ struct FramerateWindow : Window { this->InitNested(number); this->small = this->IsShaded(); this->UpdateData(); + this->next_update.SetInterval(100); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + bool elapsed = this->next_update.Elapsed(delta_ms); + /* Check if the shaded state has changed, switch caption text if it has */ if (this->small != this->IsShaded()) { this->small = this->IsShaded(); this->GetWidget(WID_FRW_CAPTION)->SetDataTip(this->small ? STR_FRAMERATE_CAPTION_SMALL : STR_FRAMERATE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); - this->next_update = 0; + elapsed = true; } - if (_realtime_tick >= this->next_update) { + if (elapsed) { this->UpdateData(); this->SetDirty(); - this->next_update = _realtime_tick + 100; + this->next_update.SetInterval(100); } } @@ -527,7 +530,7 @@ static const NWidgetPart _frametime_graph_window_widgets[] = { struct FrametimeGraphWindow : Window { int vertical_scale; ///< number of TIMESTAMP_PRECISION units vertically int horizontal_scale; ///< number of half-second units horizontally - uint32 next_scale_update; ///< realtime tick for next scale update + GUITimer next_scale_update; ///< interval for next scale update PerformanceElement element; ///< what element this window renders graph for Dimension graph_size; ///< size of the main graph area (excluding axis labels) @@ -537,7 +540,7 @@ struct FrametimeGraphWindow : Window { this->element = (PerformanceElement)number; this->horizontal_scale = 4; this->vertical_scale = TIMESTAMP_PRECISION / 10; - this->next_scale_update = 0; + this->next_scale_update.SetInterval(1); this->InitNested(number); } @@ -649,12 +652,12 @@ struct FrametimeGraphWindow : Window { this->SelectVerticalScale(peak_value); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { this->SetDirty(); - if (this->next_scale_update < _realtime_tick) { - this->next_scale_update = _realtime_tick + 500; + if (this->next_scale_update.Elapsed(delta_ms)) { + this->next_scale_update.SetInterval(500); this->UpdateScale(); } } diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 3e4a4b0501..65ecb3b99a 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -31,6 +31,7 @@ #include "../core/geometry_func.hpp" #include "../genworld.h" #include "../map_type.h" +#include "../guitimer_func.h" #include "../widgets/network_widget.h" @@ -234,6 +235,7 @@ protected: Scrollbar *vscroll; ///< vertical scrollbar of the list of servers QueryString name_editbox; ///< Client name editbox. QueryString filter_editbox; ///< Editbox for filter on servers + GUITimer requery_timer; ///< Timer for network requery int lock_offset; ///< Left offset for lock icon. int blot_offset; ///< Left offset for green/yellow/red compatibility icon. @@ -480,6 +482,8 @@ public: this->server = this->last_joined; if (this->last_joined != NULL) NetworkUDPQueryServer(this->last_joined->address); + this->requery_timer.SetInterval(MILLISECONDS_PER_TICK); + this->servers.SetListing(this->last_sorting); this->servers.SetSortFuncs(this->sorter_funcs); this->servers.SetFilterFuncs(this->filter_funcs); @@ -903,8 +907,11 @@ public: this->vscroll->SetCapacityFromWidget(this, WID_NG_MATRIX); } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->requery_timer.Elapsed(delta_ms)) return; + this->requery_timer.SetInterval(MILLISECONDS_PER_TICK); + NetworkGameListRequery(); } }; diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index f8ddf55695..816e981a14 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -14,6 +14,7 @@ #include "../string_func.h" #include "../strings_func.h" #include "../window_func.h" +#include "../guitimer_func.h" #include "dropdown_type.h" #include "dropdown_widget.h" @@ -97,6 +98,7 @@ struct DropdownWindow : Window { bool drag_mode; bool instant_close; ///< Close the window when the mouse button is raised. int scrolling; ///< If non-zero, auto-scroll the item list (one time). + GUITimer scrolling_timer; ///< Timer for auto-scroll of the item list. Point position; ///< Position of the topleft corner of the window. Scrollbar *vscroll; @@ -155,6 +157,7 @@ struct DropdownWindow : Window { this->click_delay = 0; this->drag_mode = true; this->instant_close = instant_close; + this->scrolling_timer = GUITimer(MILLISECONDS_PER_TICK); } ~DropdownWindow() @@ -254,8 +257,11 @@ struct DropdownWindow : Window { } } - virtual void OnTick() + virtual void OnRealtimeTick(uint delta_ms) { + if (!this->scrolling_timer.Elapsed(delta_ms)) return; + this->scrolling_timer.SetInterval(MILLISECONDS_PER_TICK); + if (this->scrolling != 0) { int pos = this->vscroll->GetPosition(); diff --git a/src/window.cpp b/src/window.cpp index 7a7a2a1825..cd75113536 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3304,7 +3304,7 @@ void InvalidateWindowClassesData(WindowClass cls, int data, bool gui_scope) } /** - * Dispatch OnTick event over all windows + * Dispatch OnGameTick event over all windows */ void CallWindowGameTickEvent() { From 4fc1b2baaefad669b51d88f980aaf33670795f26 Mon Sep 17 00:00:00 2001 From: nikolas Date: Sun, 13 Jan 2019 02:38:48 -0500 Subject: [PATCH 23/30] Fix: Grammar in a bunch of comments (#7054) --- src/core/random_func.hpp | 2 +- src/tile_map.h | 4 ++-- src/town_type.h | 2 +- src/townname.cpp | 12 ++++++------ src/townname_type.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp index 0c6b8f1ca7..ae476624e8 100644 --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -29,7 +29,7 @@ struct Randomizer { void SetSeed(uint32 seed); }; extern Randomizer _random; ///< Random used in the game state calculations -extern Randomizer _interactive_random; ///< Random used every else where is does not (directly) influence the game state +extern Randomizer _interactive_random; ///< Random used everywhere else, where it does not (directly) influence the game state /** Stores the state of all random number generators */ struct SavedRandomSeeds { diff --git a/src/tile_map.h b/src/tile_map.h index 7ee5727bea..89f532e4f0 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -132,9 +132,9 @@ static inline void SetTileType(TileIndex tile, TileType type) } /** - * Checks if a tile is a give tiletype. + * Checks if a tile is a given tiletype. * - * This function checks if a tile got the given tiletype. + * This function checks if a tile has the given tiletype. * * @param tile The tile to check * @param type The type to check against diff --git a/src/town_type.h b/src/town_type.h index 39deb61677..0c93c8df85 100644 --- a/src/town_type.h +++ b/src/town_type.h @@ -54,7 +54,7 @@ enum Ratings { RATING_GROWTH_UP_STEP = 5, ///< when a town grows, all companies have rating increased a bit ... RATING_GROWTH_MAXIMUM = RATING_MEDIOCRE, ///< ... up to RATING_MEDIOCRE RATING_STATION_UP_STEP = 12, ///< when a town grows, company gains reputation for all well serviced stations ... - RATING_STATION_DOWN_STEP = -15, ///< ... but loses for bad serviced stations + RATING_STATION_DOWN_STEP = -15, ///< ... but loses for badly serviced stations RATING_TUNNEL_BRIDGE_DOWN_STEP = -250, ///< penalty for removing town owned tunnel or bridge RATING_TUNNEL_BRIDGE_MINIMUM = 0, ///< minimum rating after removing tunnel or bridge diff --git a/src/townname.cpp b/src/townname.cpp index 2067fa1bb3..b6d55f1ef4 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -121,17 +121,17 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names) */ bool GenerateTownName(uint32 *townnameparts, TownNames *town_names) { - /* Do not set too low tries, since when we run out of names, we loop - * for #tries only one time anyway - then we stop generating more - * towns. Do not show it too high neither, since looping through all - * the other towns may take considerable amount of time (10000 is - * too much). */ TownNameParams par(_settings_game.game_creation.town_name); /* This function is called very often without entering the gameloop * inbetween. So reset layout cache to prevent it from growing too big. */ Layouter::ReduceLineCache(); + /* Do not set i too low, since when we run out of names, we loop + * for #tries only one time anyway - then we stop generating more + * towns. Do not set it too high either, since looping through all + * the other towns may take considerable amount of time (10000 is + * too much). */ for (int i = 1000; i != 0; i--) { uint32 r = _generating_world ? Random() : InteractiveRandom(); if (!VerifyTownName(r, &par, town_names)) continue; @@ -1045,7 +1045,7 @@ static const TownNameGeneratorParams _town_name_generators[] = { /** - * Generates town name from given seed. a language. + * Generates town name from given seed. * @param buf output buffer * @param last end of buffer * @param lang town name language diff --git a/src/townname_type.h b/src/townname_type.h index 0177294d99..ba8f926861 100644 --- a/src/townname_type.h +++ b/src/townname_type.h @@ -23,7 +23,7 @@ typedef std::set TownNames; /** - * Struct holding a parameters used to generate town name. + * Struct holding parameters used to generate town name. * Speeds things up a bit because these values are computed only once per name generation. */ struct TownNameParams { From efc44466d663466d13c93a020f5f16a3aca864ba Mon Sep 17 00:00:00 2001 From: glx22 Date: Sun, 13 Jan 2019 08:40:54 +0100 Subject: [PATCH 24/30] Fix: make -k switch useful when testing regression (#7053) --- bin/ai/regression/run.sh | 12 ++++++------ bin/ai/regression/run.vbs | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/ai/regression/run.sh b/bin/ai/regression/run.sh index d47a664ea3..c9197c4d56 100755 --- a/bin/ai/regression/run.sh +++ b/bin/ai/regression/run.sh @@ -43,11 +43,11 @@ for tst in $tests; do if [ -n "$gdb" ]; then $gdb ./openttd -x -c ai/regression/regression.cfg $params -g $sav else - ./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > tmp.regression + ./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > $tst/tmp.regression fi if [ -z "$gdb" ]; then - res="`diff -ub $tst/result.txt tmp.regression`" + res="`diff -ub $tst/result.txt $tst/tmp.regression`" if [ -z "$res" ]; then echo "passed!" else @@ -58,14 +58,14 @@ for tst in $tests; do fi rm $tst/info.nut + + if [ "$1" != "-k" ]; then + rm -f $tst/tmp.regression + fi done if [ -f scripts/game_start.scr.regression ]; then mv scripts/game_start.scr.regression scripts/game_start.scr fi -if [ "$1" != "-k" ]; then - rm -f tmp.regression -fi - exit $ret diff --git a/bin/ai/regression/run.vbs b/bin/ai/regression/run.vbs index 88cea5c4eb..930562ec68 100644 --- a/bin/ai/regression/run.vbs +++ b/bin/ai/regression/run.vbs @@ -99,11 +99,11 @@ Function RunTest(test, params, ret) command = ".\openttd -x -c ai/regression/regression.cfg " & params & " -g " & sav & " -d script=2 -d misc=9" ' 2>&1 must be after >tmp.regression, else stderr is not redirected to the file - WshShell.Run "cmd /c " & command & " >tmp.regression 2>&1", 0, True + WshShell.Run "cmd /c " & command & " >"& test & "/tmp.regression 2>&1", 0, True - FilterFile "tmp.regression" + FilterFile test & "/tmp.regression" - If CompareFiles(test & "/result.txt", "tmp.regression") Then + If CompareFiles(test & "/result.txt", test & "/tmp.regression") Then RunTest = "passed!" Else RunTest = "failed!" @@ -111,6 +111,14 @@ Function RunTest(test, params, ret) End If FSO.DeleteFile test & "/info.nut" + + If WScript.Arguments.Count > 0 Then + If WScript.Arguments.Item(0) = "-k" Then + Exit Function + End If + End If + + FSO.DeleteFile test & "/tmp.regression" End Function On Error Resume Next @@ -143,12 +151,4 @@ If FSO.FileExists("scripts/game_start.scr.regression") Then FSO.MoveFile "scripts/game_start.scr.regression", "scripts/game_start.scr" End If -If WScript.Arguments.Count > 0 Then - If WScripts.Arguments.Items(0) = "-k" Then - WScript.Quit ret - End If -End If - -FSO.DeleteFile "tmp.regression" - WScript.Quit ret From f4b8a67aed0c27da3b74b3db827d2e85de74286b Mon Sep 17 00:00:00 2001 From: Alberth289346 Date: Sun, 13 Jan 2019 08:57:33 +0100 Subject: [PATCH 25/30] Fix #6408: Improve wording of the dragging signal distance tooltips (juanjo) (#7055) --- src/lang/english.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/english.txt b/src/lang/english.txt index e272dd1688..0bb6ff9c5b 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2381,9 +2381,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Si STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal density -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal density -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal density +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal distance +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal distance +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal distance # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge From 52a66e4dd3ed3831d0bfa02ecde72e6f2a491e05 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 6 Jan 2019 10:23:40 +0100 Subject: [PATCH 26/30] Fix 192770e6da: not all REV instances were renamed to VERSION --- Makefile.bundle.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.bundle.in b/Makefile.bundle.in index ff9ec1b2e1..eaf7134dde 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -54,7 +54,7 @@ ifdef OSXAPP $(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources" $(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo" $(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns" - $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(REV)" + $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(VERSION)" $(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(BASESET_DIR)" endif ifeq ($(OS),UNIX) @@ -151,10 +151,10 @@ bundle_lha: bundle bundle_dmg: bundle @echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg' - $(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(REV)" - $(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(REV)" - $(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg" - $(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)" + $(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(VERSION)" + $(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(VERSION)" + $(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(VERSION)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg" + $(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(VERSION)" bundle_exe: all @echo '[BUNDLE] Creating $(BUNDLE_NAME).exe' From 750927372f7d10f648aa2015193d1f7f800f3a69 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 5 Jan 2019 20:11:29 +0100 Subject: [PATCH 27/30] Add: [AzurePipeline] introducing a release pipeline This release pipeline creates all the official release binaries, and publishes them as artifacts. Currently it can only produce nightlies and custom builds; stable/testing release binaries are untested. This commit also splits up the pipeline in small bits, to both improve readability, and to share code with the CI pipeline where possible. --- azure-pipelines-ci.yml | 86 ++------- azure-pipelines-release-stable.yml | 7 + azure-pipelines-release.yml | 7 + azure-pipelines/changelog.sh | 20 +++ azure-pipelines/manifest.sh | 60 +++++++ azure-pipelines/templates/ci-git-rebase.yml | 9 + azure-pipelines/templates/ci-opengfx.yml | 8 + azure-pipelines/templates/linux-build.yml | 18 ++ .../templates/linux-claim-bundles.yml | 5 + azure-pipelines/templates/osx-build.yml | 5 + .../templates/osx-dependencies.yml | 11 ++ azure-pipelines/templates/release-bundles.yml | 19 ++ .../templates/release-fetch-source.yml | 20 +++ .../templates/release-manifest.yml | 13 ++ .../templates/release-prepare-source.yml | 24 +++ azure-pipelines/templates/release.yml | 169 ++++++++++++++++++ azure-pipelines/templates/windows-build.yml | 11 ++ .../templates/windows-dependencies.yml | 10 ++ .../templates/windows-dependency-nsis.yml | 28 +++ .../templates/windows-dependency-zip.yml | 5 + findversion.sh | 2 - 21 files changed, 466 insertions(+), 71 deletions(-) create mode 100644 azure-pipelines-release-stable.yml create mode 100644 azure-pipelines-release.yml create mode 100755 azure-pipelines/changelog.sh create mode 100755 azure-pipelines/manifest.sh create mode 100644 azure-pipelines/templates/ci-git-rebase.yml create mode 100644 azure-pipelines/templates/ci-opengfx.yml create mode 100644 azure-pipelines/templates/linux-build.yml create mode 100644 azure-pipelines/templates/linux-claim-bundles.yml create mode 100644 azure-pipelines/templates/osx-build.yml create mode 100644 azure-pipelines/templates/osx-dependencies.yml create mode 100644 azure-pipelines/templates/release-bundles.yml create mode 100644 azure-pipelines/templates/release-fetch-source.yml create mode 100644 azure-pipelines/templates/release-manifest.yml create mode 100644 azure-pipelines/templates/release-prepare-source.yml create mode 100644 azure-pipelines/templates/release.yml create mode 100644 azure-pipelines/templates/windows-build.yml create mode 100644 azure-pipelines/templates/windows-dependencies.yml create mode 100644 azure-pipelines/templates/windows-dependency-nsis.yml create mode 100644 azure-pipelines/templates/windows-dependency-zip.yml diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index e71ab60ea4..d624f8ce73 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -17,37 +17,12 @@ jobs: BuildPlatform: 'x64' steps: - # Rebase to origin/master for every PR. This means users don't have to - # rebase every time master changes. As long as the PR applies cleanly, we - # will validate it. - - script: | - git config user.email 'info@openttd.org' - git config user.name 'OpenTTD CI' - git rebase origin/master - displayName: 'Rebase to master' - - bash: | - set -ex - curl -L https://github.com/OpenTTD/OpenTTD-CF/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip - unzip windows-dependencies.zip - rm -f windows-dependencies.zip - displayName: 'Download dependencies' - workingDirectory: $(Build.ArtifactStagingDirectory) - - script: $(Build.ArtifactStagingDirectory)\windows-dependencies\vcpkg.exe integrate install - displayName: 'Install dependencies' - - bash: | - set -ex - cd bin/baseset - curl -L https://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip > opengfx-0.5.2-all.zip - unzip opengfx-0.5.2-all.zip - rm -f opengfx-0.5.2-all.zip - displayName: 'Install OpenGFX' - - task: VSBuild@1 - displayName: 'Build' - inputs: - solution: 'projects/openttd_vs141.sln' - platform: $(BuildPlatform) - configuration: Release - maximumCpuCount: true + - template: azure-pipelines/templates/ci-git-rebase.yml + - template: azure-pipelines/templates/windows-dependencies.yml + - template: azure-pipelines/templates/ci-opengfx.yml + - template: azure-pipelines/templates/windows-build.yml + parameters: + BuildPlatform: $(BuildPlatform) - script: | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 cd projects @@ -67,22 +42,13 @@ jobs: linux-i386-gcc-6: {} steps: - # Rebase to origin/master for every PR. This means users don't have to - # rebase every time master changes. As long as the PR applies cleanly, we - # will validate it. - - script: | - git config user.email 'info@openttd.org' - git config user.name 'OpenTTD CI' - git rebase origin/master - displayName: 'Rebase to master' - - task: Docker@1 - displayName: 'Build and test' - inputs: - command: 'Run an image' - imageName: openttd/compile-farm-ci:$(Agent.JobName) - volumes: '$(Build.SourcesDirectory):$(Build.SourcesDirectory)' - workingDirectory: '$(Build.SourcesDirectory)' - runInBackground: false + - template: azure-pipelines/templates/ci-git-rebase.yml + # The dockers already have the dependencies installed + # The dockers already have OpenGFX installed + - template: azure-pipelines/templates/linux-build.yml + parameters: + Image: compile-farm-ci + Tag: $(Agent.JobName) - job: macos displayName: 'MacOS' @@ -90,27 +56,9 @@ jobs: vmImage: 'macOS-10.13' steps: - # Rebase to origin/master for every PR. This means users don't have to - # rebase every time master changes. As long as the PR applies cleanly, we - # will validate it. - - script: | - git config user.email 'info@openttd.org' - git config user.name 'OpenTTD CI' - git rebase origin/master - displayName: 'Rebase to master' - - script: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng - displayName: 'Install dependencies' - - bash: | - set -ex - mkdir -p ~/Documents/OpenTTD/baseset - cd ~/Documents/OpenTTD/baseset - wget https://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip - unzip opengfx-0.5.2-all.zip - rm -f opengfx-0.5.2-all.zip - displayName: 'Install OpenGFX' - - script: './configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-static' - displayName: 'Configure' - - script: 'make -j2' - displayName: 'Build' + - template: azure-pipelines/templates/ci-git-rebase.yml + - template: azure-pipelines/templates/osx-dependencies.yml + - template: azure-pipelines/templates/ci-opengfx.yml + - template: azure-pipelines/templates/osx-build.yml - script: 'make regression' displayName: 'Test' diff --git a/azure-pipelines-release-stable.yml b/azure-pipelines-release-stable.yml new file mode 100644 index 0000000000..3c42c6bee5 --- /dev/null +++ b/azure-pipelines-release-stable.yml @@ -0,0 +1,7 @@ +trigger: none +pr: none + +jobs: +- template: azure-pipelines/templates/release.yml + parameters: + IsStableRelease: true diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml new file mode 100644 index 0000000000..79e2da77ac --- /dev/null +++ b/azure-pipelines-release.yml @@ -0,0 +1,7 @@ +trigger: none +pr: none + +jobs: +- template: azure-pipelines/templates/release.yml + parameters: + IsStableRelease: false diff --git a/azure-pipelines/changelog.sh b/azure-pipelines/changelog.sh new file mode 100755 index 0000000000..71bc56fac7 --- /dev/null +++ b/azure-pipelines/changelog.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +tag=$(git describe --tags 2>/dev/null) + +# If we are a tag, show the part of the changelog that matches the tag. +# In case of a stable, also show all betas and RCs. +if [ -n "$tag" ]; then + grep="." + if [ "$(echo $tag | grep '-')" = "" ]; then + grep='^[0-9]\.[0-9]\.[0-9][^-]' + fi + 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 }' + exit 0 +fi + +# In all other cases, show the git log of the last 7 days +revdate=$(git log -1 --pretty=format:"%ci") +last_week=$(date -u -d "$revdate -7days" +"%Y-%m-%d %H:%M") +git log --after="${last_week}" --pretty=fuller diff --git a/azure-pipelines/manifest.sh b/azure-pipelines/manifest.sh new file mode 100755 index 0000000000..4d11972777 --- /dev/null +++ b/azure-pipelines/manifest.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +set -ex + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +FOLDER=$1 + +if [ ! -e .version ] || [ ! -e .release_date ]; then + echo "This script should be executed in the root of an extracted source tarball" + exit 1 +fi + +# Find the name based on the version +if [ "${ISSTABLERELEASE}" = "true" ]; then + isTesting=$(cat .version | grep "RC\|beta" || true) + if [ -z "${isTesting}" ]; then + NAME="stable" + else + NAME="testing" + fi +else + NAME=$(cat .version | cut -d- -f2 | cut -d- -f-2) +fi + +# Convert the date to a YAML date +DATE=$(cat .release_date | tr ' ' T | sed 's/TUTC/:00-00:00/') +VERSION=$(cat .version) +BASE="openttd-${VERSION}" + +echo "name: ${NAME}" >> manifest.yaml +echo "date: ${DATE}" >> manifest.yaml +echo "base: ${BASE}-" >> manifest.yaml +echo "files:" >> manifest.yaml + +error="" +for i in $(ls ${FOLDER} | grep -v ".txt$\|.md$\|sum$" | sort); do + if [ -n "$(echo $i | grep pdb.xz)" ]; then continue; fi + if [ -n "$(echo $i | grep dbg.deb)" ]; then continue; fi + + if [ ! -e ${FOLDER}/$i.md5sum ] || [ ! -e ${FOLDER}/$i.sha1sum ] || [ ! -e ${FOLDER}/$i.sha256sum ]; then + echo "ERROR: missing checksum file for ${i}" 1>&2 + error="y" + continue + fi + + echo "- id: $i" >> manifest.yaml + echo " size: $(stat -c"%s" ${FOLDER}/$i)" >> manifest.yaml + echo " md5sum: $(cat ${FOLDER}/$i.md5sum | cut -d\ -f1)" >> manifest.yaml + echo " sha1sum: $(cat ${FOLDER}/$i.sha1sum | cut -d\ -f1)" >> manifest.yaml + echo " sha256sum: $(cat ${FOLDER}/$i.sha256sum | cut -d\ -f1)" >> manifest.yaml +done + +if [ -n "${error}" ]; then + echo "ERROR: exiting due to earlier errors" 1>&2 + exit 1 +fi diff --git a/azure-pipelines/templates/ci-git-rebase.yml b/azure-pipelines/templates/ci-git-rebase.yml new file mode 100644 index 0000000000..924302fee3 --- /dev/null +++ b/azure-pipelines/templates/ci-git-rebase.yml @@ -0,0 +1,9 @@ +steps: +# Rebase to origin/master for every PR. This means users don't have to +# rebase every time master changes. As long as the PR applies cleanly, we +# will validate it. +- script: | + git config user.email 'info@openttd.org' + git config user.name 'OpenTTD CI' + git rebase origin/master + displayName: 'Rebase to master' diff --git a/azure-pipelines/templates/ci-opengfx.yml b/azure-pipelines/templates/ci-opengfx.yml new file mode 100644 index 0000000000..098f0d2a69 --- /dev/null +++ b/azure-pipelines/templates/ci-opengfx.yml @@ -0,0 +1,8 @@ +steps: +- bash: | + set -ex + cd bin/baseset + curl -L https://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip > opengfx-0.5.2-all.zip + unzip opengfx-0.5.2-all.zip + rm -f opengfx-0.5.2-all.zip + displayName: 'Install OpenGFX' diff --git a/azure-pipelines/templates/linux-build.yml b/azure-pipelines/templates/linux-build.yml new file mode 100644 index 0000000000..0e4fffefb0 --- /dev/null +++ b/azure-pipelines/templates/linux-build.yml @@ -0,0 +1,18 @@ +parameters: + Image: '' + Tag: '' + ContainerCommand: '' + +steps: +- task: Docker@1 + ${{ if eq(parameters.Image, 'compile-farm') }}: + displayName: 'Build' + ${{ if eq(parameters.Image, 'compile-farm-ci') }}: + displayName: 'Build and test' + inputs: + command: 'Run an image' + imageName: openttd/${{ parameters.Image }}:${{ parameters.Tag }} + volumes: '$(Build.SourcesDirectory):$(Build.SourcesDirectory)' + workingDirectory: '$(Build.SourcesDirectory)' + containerCommand: ${{ parameters.ContainerCommand }} + runInBackground: false diff --git a/azure-pipelines/templates/linux-claim-bundles.yml b/azure-pipelines/templates/linux-claim-bundles.yml new file mode 100644 index 0000000000..4434dfcc7d --- /dev/null +++ b/azure-pipelines/templates/linux-claim-bundles.yml @@ -0,0 +1,5 @@ +steps: +# Because we run the compile in a docker (under root), we are not owner +# of the 'bundles' folder. Fix that by executing a chown on it. +- bash: sudo chown -R $(id -u):$(id -g) bundles + displayName: 'Claim bundles folder back' diff --git a/azure-pipelines/templates/osx-build.yml b/azure-pipelines/templates/osx-build.yml new file mode 100644 index 0000000000..ae1724125d --- /dev/null +++ b/azure-pipelines/templates/osx-build.yml @@ -0,0 +1,5 @@ +steps: +- script: './configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-static' + displayName: 'Configure' +- script: 'make -j2' + displayName: 'Build' diff --git a/azure-pipelines/templates/osx-dependencies.yml b/azure-pipelines/templates/osx-dependencies.yml new file mode 100644 index 0000000000..c4b723c58b --- /dev/null +++ b/azure-pipelines/templates/osx-dependencies.yml @@ -0,0 +1,11 @@ +steps: +- script: | + set -ex + HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng + # Remove the dynamic libraries of these libraries, to ensure we use + # the static versions. That is important, as it is unlikely any + # end-user has these brew libraries installed. + rm /usr/local/Cellar/lzo/*/lib/*.dylib + rm /usr/local/Cellar/xz/*/lib/*.dylib + rm /usr/local/Cellar/libpng/*/lib/*.dylib + displayName: 'Install dependencies' diff --git a/azure-pipelines/templates/release-bundles.yml b/azure-pipelines/templates/release-bundles.yml new file mode 100644 index 0000000000..9c5a48b966 --- /dev/null +++ b/azure-pipelines/templates/release-bundles.yml @@ -0,0 +1,19 @@ +parameters: + CalculateChecksums: true + +steps: +- ${{ if eq(parameters.CalculateChecksums, true) }}: + - bash: | + set -ex + cd bundles + for i in $(ls); do + openssl dgst -r -md5 -hex $i > $i.md5sum + openssl dgst -r -sha1 -hex $i > $i.sha1sum + openssl dgst -r -sha256 -hex $i > $i.sha256sum + done + displayName: 'Calculate checksums' +- task: PublishBuildArtifacts@1 + displayName: 'Publish bundles' + inputs: + PathtoPublish: bundles/ + ArtifactName: bundles diff --git a/azure-pipelines/templates/release-fetch-source.yml b/azure-pipelines/templates/release-fetch-source.yml new file mode 100644 index 0000000000..8b43983067 --- /dev/null +++ b/azure-pipelines/templates/release-fetch-source.yml @@ -0,0 +1,20 @@ +# Fetch the source tarball as prepared by an earlier job. In there is the +# version predefined. This ensures we are all going to compile the same +# source with the same version. + +steps: +- checkout: none +- task: DownloadBuildArtifacts@0 + displayName: 'Download source' + inputs: + downloadType: specific + itemPattern: 'bundles/openttd-*-source.tar.xz' + downloadPath: '$(Build.ArtifactStagingDirectory)' +- bash: tar --xz -xf ../a/bundles/openttd-*-source.tar.xz --strip-components=1 + displayName: 'Extracting source' +- bash: | + set -e + VERSION=$(cat .version) + echo "${VERSION}" + echo "##vso[build.updatebuildnumber]${VERSION}" + displayName: 'Change BuildNumber to version' diff --git a/azure-pipelines/templates/release-manifest.yml b/azure-pipelines/templates/release-manifest.yml new file mode 100644 index 0000000000..5c076b30e9 --- /dev/null +++ b/azure-pipelines/templates/release-manifest.yml @@ -0,0 +1,13 @@ +steps: +- task: DownloadBuildArtifacts@0 + displayName: 'Download all bundles' + inputs: + downloadType: specific + itemPattern: 'bundles/*' + downloadPath: '$(Build.ArtifactStagingDirectory)' +- script: | + set -ex + ./azure-pipelines/manifest.sh ../a/bundles/ + mkdir -p bundles + mv manifest.yaml bundles/ + displayName: 'Create manifest.yaml' diff --git a/azure-pipelines/templates/release-prepare-source.yml b/azure-pipelines/templates/release-prepare-source.yml new file mode 100644 index 0000000000..22ec126b1f --- /dev/null +++ b/azure-pipelines/templates/release-prepare-source.yml @@ -0,0 +1,24 @@ +# Set the revisions, and remove the VCS files. +# This ensures everything else picks up on the predefined versions, and not +# that because of some build process the version all of a sudden changes. + +steps: +- script: | + set -ex + git checkout -B ${BUILD_SOURCEBRANCHNAME} + ./findversion.sh > .ottdrev + ./azure-pipelines/changelog.sh > .changelog + TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date + cat .ottdrev | cut -f 1 -d$'\t' > .version + echo "Release Date: $(cat .release_date)" + echo "Revision: $(cat .ottdrev)" + echo "Version: $(cat .version)" + displayName: 'Create version files' +- script: | + set -e + VERSION=$(cat .version) + echo "${VERSION}" + echo "##vso[build.updatebuildnumber]${VERSION}" + displayName: 'Change BuildNumber to version' +- script: find . -iname .hg -or -iname .git -or -iname .svn | xargs rm -rf + displayName: 'Remove VCS information' diff --git a/azure-pipelines/templates/release.yml b/azure-pipelines/templates/release.yml new file mode 100644 index 0000000000..4daf66dedb --- /dev/null +++ b/azure-pipelines/templates/release.yml @@ -0,0 +1,169 @@ +parameters: + # If this is false, not all targets are triggered. For example: + # The NSIS installer for Windows and the creation of debs only work for + # releases. Not for any other type of binary. So they are skilled if this + # is set to false. + IsStableRelease: false + +jobs: +- job: source + displayName: 'Source' + pool: + vmImage: 'ubuntu-16.04' + + steps: + - template: release-prepare-source.yml + - script: | + set -ex + + # Rename the folder to openttd-NNN-source + mkdir openttd-$(Build.BuildNumber) + find . -maxdepth 1 -not -name . -not -name openttd-$(Build.BuildNumber) -exec mv {} openttd-$(Build.BuildNumber)/ \; + # Copy back release_date, as it is needed for the template 'release-bundles' + cp openttd-$(Build.BuildNumber)/.release_date .release_date + + mkdir bundles + tar --xz -cf bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber) + zip -9 -r -q bundles/openttd-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber) + displayName: 'Create bundle' + - template: release-bundles.yml + +- job: meta + displayName: 'Metadata' + pool: + vmImage: 'ubuntu-16.04' + dependsOn: source + + steps: + - template: release-fetch-source.yml + - script: | + set -ex + + mkdir -p bundles + cp .changelog bundles/changelog.txt + cp .release_date bundles/released.txt + cp README.md bundles/README.md + displayName: 'Copy meta files' + - template: release-bundles.yml + parameters: + CalculateChecksums: false + +- job: docs + displayName: 'Docs' + pool: + vmImage: 'ubuntu-16.04' + dependsOn: source + + steps: + - template: release-fetch-source.yml + - template: linux-build.yml + parameters: + Image: compile-farm + ContainerCommand: '$(Build.BuildNumber)' + Tag: docs + - template: linux-claim-bundles.yml + - template: release-bundles.yml + +- job: windows + displayName: 'Windows' + pool: + vmImage: 'VS2017-Win2016' + dependsOn: source + + strategy: + matrix: + Win32: + BuildPlatform: 'Win32' + BundlePlatform: 'win32' + Win64: + BuildPlatform: 'x64' + BundlePlatform: 'win64' + + steps: + - template: release-fetch-source.yml + - template: windows-dependencies.yml + - template: windows-dependency-zip.yml + - ${{ if eq(parameters.IsStableRelease, true) }}: + - template: windows-dependency-nsis.yml + - template: windows-build.yml + parameters: + BuildPlatform: $(BuildPlatform) + - bash: | + set -ex + make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform) + displayName: 'Create bundles' + - ${{ if eq(parameters.IsStableRelease, true) }}: + - bash: | + set -ex + # NSIS will be part of the Hosted image in the next update. Till then, we set the PATH ourself + export PATH="${PATH}:/c/Program Files (x86)/NSIS" + make -f Makefile.msvc bundle_exe PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform) + displayName: 'Create installer bundle' + - template: release-bundles.yml + +- ${{ if eq(parameters.IsStableRelease, true) }}: + - job: linux_stable + displayName: 'Linux' + pool: + vmImage: 'ubuntu-16.04' + dependsOn: source + + strategy: + matrix: + linux-ubuntu-xenial-i386-gcc: {} + linux-ubuntu-xenial-amd64-gcc: {} + linux-ubuntu-bionic-i386-gcc: {} + linux-ubuntu-bionic-amd64-gcc: {} + linux-debian-jessie-i386-gcc: {} + linux-debian-jessie-amd64-gcc: {} + linux-debian-stretch-i386-gcc: {} + linux-debian-stretch-amd64-gcc: {} + + steps: + - template: release-fetch-source.yml + - template: linux-build.yml + parameters: + Image: compile-farm + ContainerCommand: '$(Build.BuildNumber)' + Tag: $(Agent.JobName) + - template: linux-claim-bundles.yml + - template: release-bundles.yml + +- job: macos + displayName: 'MacOS' + pool: + vmImage: 'macOS-10.13' + dependsOn: source + + steps: + - template: release-fetch-source.yml + - template: osx-dependencies.yml + - template: osx-build.yml + - script: 'make bundle_zip bundle_dmg BUNDLE_NAME=openttd-$(Build.BuildNumber)-macosx' + displayName: 'Create bundles' + - template: release-bundles.yml + +- job: manifest + displayName: 'Manifest' + pool: + vmImage: 'ubuntu-16.04' + dependsOn: + - source + - docs + - windows + - ${{ if eq(parameters.IsStableRelease, true) }}: + - linux_stable + - macos + # "Skipped" is not a status, and is not succeeded. So it seems to be + # considered failed. So we trigger if all the earlier jobs are done (which + # might be succeeded, failed, or skipped), and run this job. This is not + # optimal, but given the rules, it is the only way to get this to work (as + # some jobs might be skipped). + condition: succeededOrFailed() + + steps: + - template: release-fetch-source.yml + - template: release-manifest.yml + - template: release-bundles.yml + parameters: + CalculateChecksums: false diff --git a/azure-pipelines/templates/windows-build.yml b/azure-pipelines/templates/windows-build.yml new file mode 100644 index 0000000000..5e12f2243f --- /dev/null +++ b/azure-pipelines/templates/windows-build.yml @@ -0,0 +1,11 @@ +parameters: + BuildPlatform: '' + +steps: +- task: VSBuild@1 + displayName: 'Build' + inputs: + solution: 'projects/openttd_vs141.sln' + platform: ${{ parameters.BuildPlatform }} + configuration: Release + maximumCpuCount: true diff --git a/azure-pipelines/templates/windows-dependencies.yml b/azure-pipelines/templates/windows-dependencies.yml new file mode 100644 index 0000000000..06f56e626b --- /dev/null +++ b/azure-pipelines/templates/windows-dependencies.yml @@ -0,0 +1,10 @@ +steps: +- bash: | + set -ex + curl -L https://github.com/OpenTTD/OpenTTD-CF/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip + unzip windows-dependencies.zip + rm -f windows-dependencies.zip + displayName: 'Download dependencies' + workingDirectory: $(Build.ArtifactStagingDirectory) +- script: $(Build.ArtifactStagingDirectory)\windows-dependencies\vcpkg.exe integrate install + displayName: 'Install dependencies' diff --git a/azure-pipelines/templates/windows-dependency-nsis.yml b/azure-pipelines/templates/windows-dependency-nsis.yml new file mode 100644 index 0000000000..a1ee8f81e5 --- /dev/null +++ b/azure-pipelines/templates/windows-dependency-nsis.yml @@ -0,0 +1,28 @@ +parameters: + condition: true + +steps: +- bash: | + set -ex + # NSIS will be part of the Hosted image in the next update. Till then, we install it ourself + choco install nsis -y + + mkdir nsis-plugin; cd nsis-plugin + curl -L https://devs.openttd.org/~truebrain/nsis-plugins/Nsis7z.zip > Nsis7z.zip + unzip Nsis7z.zip + cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/" + cd ..; rm -rf nsis-plugin + + mkdir nsis-plugin; cd nsis-plugin + curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisGetVersion.zip > NsisGetVersion.zip + unzip NsisGetVersion.zip + cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/" + cd ..; rm -rf nsis-plugin + + mkdir nsis-plugin; cd nsis-plugin + curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisFindProc.zip > NsisFindProc.zip + unzip NsisFindProc.zip + cp -R *.dll "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/" + cd ..; rm -rf nsis-plugin + displayName: 'Install NSIS with the 7z, GetVersion, and FindProc plugins' + condition: and(succeeded(), ${{ parameters.condition }}) diff --git a/azure-pipelines/templates/windows-dependency-zip.yml b/azure-pipelines/templates/windows-dependency-zip.yml new file mode 100644 index 0000000000..e2ae06dbe7 --- /dev/null +++ b/azure-pipelines/templates/windows-dependency-zip.yml @@ -0,0 +1,5 @@ +steps: +- bash: | + set -ex + choco install zip + displayName: 'Install zip' diff --git a/findversion.sh b/findversion.sh index 8fd292c8bc..ead908167e 100755 --- a/findversion.sh +++ b/findversion.sh @@ -74,8 +74,6 @@ if [ -d "$ROOT_DIR/.git" ]; then if [ -n "$TAG" ]; then VERSION="${TAG}" - elif [ "${BRANCH}" = "master" ]; then - VERSION="${ISODATE}-g${SHORTHASH}" else VERSION="${ISODATE}-${BRANCH}-g${SHORTHASH}" fi From 89f0017a674c40afb4a7abbee973d86f678f4e39 Mon Sep 17 00:00:00 2001 From: PeterN Date: Sun, 13 Jan 2019 16:50:21 +0000 Subject: [PATCH 28/30] Fix #7050: Missing guard around network chat message function for compiling with networking disabled. (#7058) --- src/window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/window.cpp b/src/window.cpp index cd75113536..d67c7f2f70 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3100,11 +3100,13 @@ void UpdateWindows() CallWindowRealtimeTickEvent(delta_ms); +#ifdef ENABLE_NETWORKING static GUITimer network_message_timer = GUITimer(1); if (network_message_timer.Elapsed(delta_ms)) { network_message_timer.SetInterval(1000); NetworkChatMessageLoop(); } +#endif Window *w; From ca7ee345024337d37932880ee9c1c3a9cb656697 Mon Sep 17 00:00:00 2001 From: translators Date: Sun, 13 Jan 2019 19:45:41 +0100 Subject: [PATCH 29/30] Update: Translations from eints croatian: 8 changes by VoyagerOne --- src/lang/croatian.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 398891439f..dac4678a8e 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -285,6 +285,7 @@ STR_COLOUR_ORANGE :Narančasta STR_COLOUR_BROWN :Smeđa STR_COLOUR_GREY :Siva STR_COLOUR_WHITE :Bijela +STR_COLOUR_RANDOM :Nasumično # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -1025,6 +1026,7 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Proizvoljno... STR_GAME_OPTIONS_CURRENCY_GEL :Gruzijski Lari (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Iranski Rial (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Nove ruske rublje (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Meksički Pesos (MXN) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Cestovna vozila @@ -1354,6 +1356,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Mijenjan STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Održavanje infrastrukture: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Kada je omogućeno, infrastruktura uzrokuje troškove održavanja. Cijena raste više nego proporcionalno s veličinom mreže, čime utječe veće tvrtke više od manjih +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Početna boja za kompaniju: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Odaberi početnu boju za kompaniju STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Zračne luke nikad ne ističu: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Uključivanjem ove postavke čini svaku vrstu zračne luke dostupnom zauvijek nakon uvođenja @@ -2473,9 +2477,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Kombo si STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Putni signal (električni){}Putni signal omogućava da više od jednog vlaka uđe istovremeno u signalni blok, ako vlak može rezervirati putanju do sigurnog zaustavnog mjesta. Standardne putne signale moguće je proći iz suprotnog smjera STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Jednosmjerni putni signal (električni){}Putni znak omogućava da više od jednog vlaka uđe istovremeno u signalni blok, ako vlak može rezervirati putanju do sigurnog zaustavnog mjesta. Jednosmjerne putne signale nije moguće proći iz suprotnog smjera. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Pretvaranje signala{}Kada je odabrano, klikanjem na postojeći signal pretvara taj signal u odabranu vrstu i varijantu, Ctrl+Klik mijenja postojeću varijantu. Shift+Klik prikazuje procjenu troška pretvorbe -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Gustoća signala prilikom izgradnje -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Smanji gustoću signala prilikom izgradnje -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećaj gustoću signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Razmak između signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Smanji razmak između signala prilikom izgradnje +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećaj razmak između signala prilikom izgradnje # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Odaberi željeznički most @@ -3956,6 +3960,7 @@ STR_ORDER_CONDITIONAL_AGE :Starost vozila STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Treba servis STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Uvijek STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Preostali životni vijek (godina) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Maksimalna pouzdanost STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Kako usporediti podatke vozila sa zadanom vrijednošću STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :je jednako From 823c5bfa3bf403aeac55a44fadfba802dddb8e1e Mon Sep 17 00:00:00 2001 From: Joan Josep Date: Sun, 13 Jan 2019 23:29:17 +0100 Subject: [PATCH 30/30] Fix #5978: Ensure group GUI stats and lists are invalidated properly (3298, Juanjo) (#7046) --- src/autoreplace_cmd.cpp | 4 ++++ src/group_cmd.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 48f818c947..95568e3811 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -19,6 +19,7 @@ #include "autoreplace_gui.h" #include "articulated_vehicles.h" #include "core/random_func.hpp" +#include "vehiclelist.h" #include "table/strings.h" @@ -777,6 +778,9 @@ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, ui if (flags & DC_EXEC) { GroupStatistics::UpdateAutoreplace(_current_company); if (IsLocalCompany()) SetWindowDirty(WC_REPLACE_VEHICLE, Engine::Get(old_engine_type)->type); + + const VehicleType vt = Engine::Get(old_engine_type)->type; + SetWindowDirty(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); } if ((flags & DC_EXEC) && IsLocalCompany()) InvalidateAutoreplaceWindow(old_engine_type, id_g); diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 66d75fb44e..3edaf76271 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -232,7 +232,7 @@ void GroupStatistics::Clear() stats.autoreplace_defined = true; stats.autoreplace_finished = true; } - if (stats.num_engines[erl->from] > 0) stats.autoreplace_finished = false; + if (GetGroupNumEngines(company, erl->group_id, erl->from) > 0) stats.autoreplace_finished = false; } } @@ -409,11 +409,12 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if (flags & DC_EXEC) { g->parent = (pg == NULL) ? INVALID_GROUP : pg->index; + GroupStatistics::UpdateAutoreplace(g->owner); } } if (flags & DC_EXEC) { - SetWindowDirty(WC_REPLACE_VEHICLE, g->vehicle_type); + InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1); InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack()); }