From 80e3397f8549f06a6c75a274029560934c45ea7b Mon Sep 17 00:00:00 2001 From: dP Date: Wed, 3 Nov 2021 23:33:38 +0300 Subject: [PATCH 01/10] Fix 3a1a915: Every 16th client never reconnects after server restart --- src/network/network_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index bc5f24ac38..f03601b39f 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -1055,9 +1055,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet * care about the server shutting down. */ if (this->status >= STATUS_JOIN) { /* To throttle the reconnects a bit, every clients waits its - * Client ID modulo 16. This way reconnects should be spread - * out a bit. */ - _network_reconnect = _network_own_client_id % 16; + * Client ID modulo 16 + 1 (value 0 means no reconnect). + * This way reconnects should be spread out a bit. */ + _network_reconnect = _network_own_client_id % 16 + 1; ShowErrorMessage(STR_NETWORK_MESSAGE_SERVER_REBOOT, INVALID_STRING_ID, WL_CRITICAL); } From 33ef34189e25779c222efa068313c6df5ea532ed Mon Sep 17 00:00:00 2001 From: Dmitry Erlikh Date: Wed, 3 Nov 2021 22:10:21 +0100 Subject: [PATCH 02/10] Fix #9648: add missing commas in crash message --- src/saveload/afterload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 6a42ea81c6..d3194cd4e2 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -393,8 +393,8 @@ static void CDECL HandleSavegameLoadCrash(int signum) "or older version.\n" "It will load a NewGRF with the same GRF ID as the missing NewGRF.\n" "This means that if the author makes incompatible NewGRFs with the\n" - "same GRF ID OpenTTD cannot magically do the right thing. In most\n" - "cases OpenTTD will load the savegame and not crash, but this is an\n" + "same GRF ID, OpenTTD cannot magically do the right thing. In most\n" + "cases, OpenTTD will load the savegame and not crash, but this is an\n" "exception.\n" "Please load the savegame with the appropriate NewGRFs installed.\n" "The missing/compatible NewGRFs are:\n"); From 6ff0858b38cac1fa734081adef1ae6d6b6297a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Sat, 6 Nov 2021 17:32:37 +0100 Subject: [PATCH 03/10] Fix #9669, cbe00ec: Only try valid reverse directions (#9672) --- src/pathfinder/npf/npf.cpp | 7 +++++-- src/pathfinder/yapf/yapf_ship.cpp | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index f7cb1a5cda..25681507c7 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -1225,9 +1225,12 @@ bool NPFShipCheckReverse(const Ship *v, Trackdir *best_td) AyStarUserData user = { v->owner, TRANSPORT_WATER, RAILTYPES_NONE, ROADTYPES_NONE, 0 }; if (best_td != nullptr) { - TrackdirBits rtds = DiagdirReachesTrackdirs(ReverseDiagDir(VehicleExitDir(v->direction, v->state))); + DiagDirection entry = ReverseDiagDir(VehicleExitDir(v->direction, v->state)); + TrackdirBits rtds = DiagdirReachesTrackdirs(entry) & TrackStatusToTrackdirBits(GetTileTrackStatus(v->tile, TRANSPORT_WATER, 0, entry)); Trackdir best = (Trackdir)FindFirstBit2x64(rtds); - for (rtds = KillFirstBit(rtds); rtds != TRACKDIR_BIT_NONE; rtds = KillFirstBit(rtds)) { + rtds = KillFirstBit(rtds); + if (rtds == TRACKDIR_BIT_NONE) return false; /* At most one choice. */ + for (; rtds != TRACKDIR_BIT_NONE; rtds = KillFirstBit(rtds)) { Trackdir td = (Trackdir)FindFirstBit2x64(rtds); ftd = NPFRouteToStationOrTileTwoWay(v->tile, best, false, v->tile, td, false, &fstd, &user); if (ftd.best_bird_dist == 0 && NPFGetFlag(&ftd.node, NPF_FLAG_REVERSE)) best = td; diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 25a63ec669..947de5a764 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -212,7 +212,13 @@ public: /* create pathfinder instance */ Tpf pf; /* set origin and destination nodes */ - pf.SetOrigin(tile, trackdir == nullptr ? TrackdirToTrackdirBits(td1) | TrackdirToTrackdirBits(td2) : DiagdirReachesTrackdirs(ReverseDiagDir(VehicleExitDir(v->direction, v->state)))); + if (trackdir == nullptr) { + pf.SetOrigin(tile, TrackdirToTrackdirBits(td1) | TrackdirToTrackdirBits(td2)); + } else { + DiagDirection entry = ReverseDiagDir(VehicleExitDir(v->direction, v->state)); + TrackdirBits rtds = DiagdirReachesTrackdirs(entry) & TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_WATER, 0, entry)); + pf.SetOrigin(tile, rtds); + } pf.SetDestination(v); /* find best path */ if (!pf.FindPath(v)) return false; From 95c84676701ba8e6b4ec6b84ce588b653b3a2ac9 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sat, 6 Nov 2021 18:50:28 +0100 Subject: [PATCH 04/10] Fix 65cbde4b: Writing to uninitialized string when loading a currency NewGRF. --- src/newgrf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 8a88e52032..d1352d02e7 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2679,8 +2679,8 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, By uint16 options = buf->ReadWord(); if (curidx < CURRENCY_END) { - _currency_specs[curidx].separator[0] = GB(options, 0, 8); - _currency_specs[curidx].separator[1] = '\0'; + _currency_specs[curidx].separator.clear(); + _currency_specs[curidx].separator.push_back(GB(options, 0, 8)); /* By specifying only one bit, we prevent errors, * since newgrf specs said that only 0 and 1 can be set for symbol_pos */ _currency_specs[curidx].symbol_pos = GB(options, 8, 1); From 73001ae1a9282aadb9512b93845f2fe4c1a7e5e9 Mon Sep 17 00:00:00 2001 From: translators Date: Sat, 6 Nov 2021 18:47:14 +0000 Subject: [PATCH 05/10] Update: Translations from eints english (au): 3 changes by LordAro --- src/lang/english_AU.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 7dd88a014f..8e6b8976fa 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -1338,7 +1338,7 @@ STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE :{COMMA} second{ STR_CONFIG_SETTING_HOVER_DELAY :Show tooltips: {STRING} STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Delay before tooltips are displayed when hovering the mouse over some interface element. Alternatively tooltips can be bound to the right mouse button -STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Hover for {COMMA} second{P 0 "" s} +STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Hover for {COMMA} millisecond{P 0 "" s} ###setting-zero-is-special STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Right click @@ -2255,6 +2255,7 @@ STR_NETWORK_MESSAGE_CLIENT_COMPANY_SPECTATE :*** {STRING} ha STR_NETWORK_MESSAGE_CLIENT_COMPANY_NEW :*** {STRING} has started a new company (#{2:NUM}) STR_NETWORK_MESSAGE_CLIENT_LEFT :*** {STRING} has left the game ({2:STRING}) STR_NETWORK_MESSAGE_NAME_CHANGE :*** {STRING} has changed his/her name to {STRING} +STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} gave {2:CURRENCY_LONG} to {1:STRING} STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}The server closed the session STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}The server is restarting...{}Please wait... @@ -3641,6 +3642,7 @@ STR_REPLACE_MONORAIL_VEHICLES :Monorail Vehicl STR_REPLACE_MAGLEV_VEHICLES :Maglev Vehicles +STR_REPLACE_REMOVE_WAGON :{BLACK}Wagon removal ({STRING}): {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Make autoreplace keep the length of a train the same by removing wagons (starting at the front), if replacing the engine would make the train longer # Vehicle view From 8c558d74a59fe10061bb16b83d708ad8e65eb020 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sat, 6 Nov 2021 18:59:52 +0100 Subject: [PATCH 06/10] Fix 55a11710: Curly braces need to be double-escaped for (std::)fmt. --- src/network/network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/network.cpp b/src/network/network.cpp index 109a2cce70..dd0a915949 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1073,7 +1073,7 @@ void NetworkGameLoop() if (sync_state[0] == _random.state[0] && sync_state[1] == _random.state[1]) { Debug(desync, 0, "Sync check: {:08x}; {:02x}; match", _date, _date_fract); } else { - Debug(desync, 0, "Sync check: {:08x}; {:02x}; mismatch expected {{:08x}, {:08x}}, got {{:08x}, {:08x}}", + Debug(desync, 0, "Sync check: {:08x}; {:02x}; mismatch expected {{{:08x}, {:08x}}}, got {{{:08x}, {:08x}}}", _date, _date_fract, sync_state[0], sync_state[1], _random.state[0], _random.state[1]); NOT_REACHED(); } From d0655a48bab31903068d6e0f94323da8a8bda94d Mon Sep 17 00:00:00 2001 From: J0anJosep Date: Sat, 6 Nov 2021 23:04:33 +0100 Subject: [PATCH 07/10] Fix: Do not redraw vehicle lists when skip order command is tested. --- src/order_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index f6e7f77a48..f282ca12bd 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1136,11 +1136,11 @@ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 v->UpdateRealOrderIndex(); InvalidateVehicleOrder(v, VIWD_MODIFY_ORDERS); - } - /* We have an aircraft/ship, they have a mini-schedule, so update them all */ - if (v->type == VEH_AIRCRAFT) SetWindowClassesDirty(WC_AIRCRAFT_LIST); - if (v->type == VEH_SHIP) SetWindowClassesDirty(WC_SHIPS_LIST); + /* We have an aircraft/ship, they have a mini-schedule, so update them all */ + if (v->type == VEH_AIRCRAFT) SetWindowClassesDirty(WC_AIRCRAFT_LIST); + if (v->type == VEH_SHIP) SetWindowClassesDirty(WC_SHIPS_LIST); + } return CommandCost(); } From 08cb5ba2cd69406e34cb4a439d477142e80cef57 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Sun, 7 Nov 2021 11:41:24 -0500 Subject: [PATCH 08/10] Fix: Don't show screenshot GUI in screenshots (#9674) --- src/screenshot.cpp | 3 +++ src/screenshot_gui.cpp | 22 ++++++++++++++++++++++ src/screenshot_gui.h | 1 + 3 files changed, 26 insertions(+) diff --git a/src/screenshot.cpp b/src/screenshot.cpp index f91648cf47..ddb22f13e1 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -12,6 +12,7 @@ #include "viewport_func.h" #include "gfx_func.h" #include "screenshot.h" +#include "screenshot_gui.h" #include "blitter/factory.hpp" #include "zoom_func.h" #include "core/endian_func.hpp" @@ -909,8 +910,10 @@ static bool RealMakeScreenshot(ScreenshotType t, std::string name, uint32 width, * of the screenshot. This way the screenshot will always show the name * of the previous screenshot in the 'successful' message instead of the * name of the new screenshot (or an empty name). */ + SetScreenshotWindowVisibility(true); UndrawMouseCursor(); DrawDirtyBlocks(); + SetScreenshotWindowVisibility(false); } _screenshot_name[0] = '\0'; diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp index e9b989e517..b6d68d0919 100644 --- a/src/screenshot_gui.cpp +++ b/src/screenshot_gui.cpp @@ -13,6 +13,7 @@ #include "screenshot.h" #include "widgets/screenshot_widget.h" #include "table/strings.h" +#include "gfx_func.h" struct ScreenshotWindow : Window { ScreenshotWindow(WindowDesc *desc) : Window(desc) @@ -72,3 +73,24 @@ void ShowScreenshotWindow() CloseWindowById(WC_SCREENSHOT, 0); new ScreenshotWindow(&_screenshot_window_desc); } + +/** + * Set the visibility of the screenshot window when taking a screenshot. + * @param hide Are we hiding the window or showing it again after the screenshot is taken? + */ +void SetScreenshotWindowVisibility(bool hide) +{ + ScreenshotWindow *scw = (ScreenshotWindow *)FindWindowById(WC_SCREENSHOT, 0); + + if (scw == nullptr) return; + + if (hide) { + /* Set dirty the screen area where the window is covering (not the window itself), then move window off screen. */ + scw->SetDirty(); + scw->left += 2 * _screen.width; + } else { + /* Return window to original position. */ + scw->left -= 2 * _screen.width; + scw->SetDirty(); + } +} diff --git a/src/screenshot_gui.h b/src/screenshot_gui.h index 44a395edb1..493bcc80f7 100644 --- a/src/screenshot_gui.h +++ b/src/screenshot_gui.h @@ -11,5 +11,6 @@ #define SCREENSHOT_GUI_H void ShowScreenshotWindow(); +void SetScreenshotWindowVisibility(bool hide); #endif /* SCREENSHOT_GUI_H */ From b4bd7b367e3b2ab0e82319e04adb9f302a9f222f Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Sun, 7 Nov 2021 13:53:54 -0500 Subject: [PATCH 09/10] Feature: Ctrl-click to remove fully autoreplaced vehicles from list (#9639) --- src/autoreplace_gui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 9f2deaf10a..898b4e7503 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -578,6 +578,16 @@ public: size_t engine_count = this->engines[click_side].size(); EngineID e = engine_count > i ? this->engines[click_side][i] : INVALID_ENGINE; + + /* If Ctrl is pressed on the left side and we don't have any engines of the selected type, stop autoreplacing. + * This is most common when we have finished autoreplacing the engine and want to remove it from the list. */ + if (click_side == 0 && _ctrl_pressed && e != INVALID_ENGINE && + (GetGroupNumEngines(_local_company, sel_group, e) == 0 || GetGroupNumEngines(_local_company, ALL_GROUP, e) == 0)) { + EngineID veh_from = e; + DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE); + break; + } + if (e == this->sel_engine[click_side]) break; // we clicked the one we already selected this->sel_engine[click_side] = e; if (click_side == 0) { From c38af729787f25e56cb19fce90d89eebf3067c66 Mon Sep 17 00:00:00 2001 From: Guillaume Renoult Date: Mon, 8 Nov 2021 05:54:50 +1100 Subject: [PATCH 10/10] Update: add setting to hide news about competitors vehicle crash (#9653) --- src/aircraft_cmd.cpp | 7 ++++++- src/lang/english.txt | 3 +++ src/news_gui.cpp | 1 + src/news_type.h | 1 + src/roadveh_cmd.cpp | 8 +++++++- src/settings_gui.cpp | 1 + src/settings_type.h | 1 + src/table/settings/news_display_settings.ini | 11 +++++++++++ 8 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 52c966e81e..4c4ed5a46a 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1341,7 +1341,12 @@ static void CrashAirplane(Aircraft *v) AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING)); Game::NewEvent(new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING)); - AddTileNewsItem(newsitem, NT_ACCIDENT, vt, nullptr, st != nullptr ? st->index : INVALID_STATION); + NewsType newstype = NT_ACCIDENT; + if (v->owner != _local_company) { + newstype = NT_ACCIDENT_OTHER; + } + + AddTileNewsItem(newsitem, newstype, vt, nullptr, st != nullptr ? st->index : INVALID_STATION); ModifyStationRatingAround(vt, v->owner, -160, 30); if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v); diff --git a/src/lang/english.txt b/src/lang/english.txt index 49497a00c4..becf8d35c2 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1743,6 +1743,9 @@ STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER_HELPTEXT :Display a newsp STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS :Accidents / disasters: {STRING2} STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS_HELPTEXT :Display a newspaper when accidents or disasters occur +STR_CONFIG_SETTING_NEWS_ACCIDENT_OTHER :Accidents of competitor's vehicles: {STRING2} +STR_CONFIG_SETTING_NEWS_ACCIDENT_OTHER_HELPTEXT :Display a newspaper about crashed vehicles for competitors + STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION :Company information: {STRING2} STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION_HELPTEXT :Display a newspaper when a new company starts, or when companies are risking to bankrupt diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 4bd4bcecbb..10a49b62e8 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -231,6 +231,7 @@ static NewsTypeData _news_type_data[] = { NewsTypeData("news_display.arrival_player", 60, SND_1D_APPLAUSE ), ///< NT_ARRIVAL_COMPANY NewsTypeData("news_display.arrival_other", 60, SND_1D_APPLAUSE ), ///< NT_ARRIVAL_OTHER NewsTypeData("news_display.accident", 90, SND_BEGIN ), ///< NT_ACCIDENT + NewsTypeData("news_display.accident_other", 90, SND_BEGIN ), ///< NT_ACCIDENT_OTHER NewsTypeData("news_display.company_info", 60, SND_BEGIN ), ///< NT_COMPANY_INFO NewsTypeData("news_display.open", 90, SND_BEGIN ), ///< NT_INDUSTRY_OPEN NewsTypeData("news_display.close", 90, SND_BEGIN ), ///< NT_INDUSTRY_CLOSE diff --git a/src/news_type.h b/src/news_type.h index 4dea8c46f5..188305b52f 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -22,6 +22,7 @@ enum NewsType { NT_ARRIVAL_COMPANY, ///< First vehicle arrived for company NT_ARRIVAL_OTHER, ///< First vehicle arrived for competitor NT_ACCIDENT, ///< An accident or disaster has occurred + NT_ACCIDENT_OTHER, ///< An accident or disaster has occurred NT_COMPANY_INFO, ///< Company info (new companies, bankruptcy messages) NT_INDUSTRY_OPEN, ///< Opening of industries NT_INDUSTRY_CLOSE, ///< Closing of industries diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 86c2de78eb..9c444d1d37 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -553,7 +553,13 @@ static void RoadVehCrash(RoadVehicle *v) SetDParam(0, pass); StringID newsitem = (pass == 1) ? STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER : STR_NEWS_ROAD_VEHICLE_CRASH; - AddTileNewsItem(newsitem, NT_ACCIDENT, v->tile); + NewsType newstype = NT_ACCIDENT; + + if (v->owner != _local_company) { + newstype = NT_ACCIDENT_OTHER; + } + + AddTileNewsItem(newsitem, newstype, v->tile); ModifyStationRatingAround(v->tile, v->owner, -160, 22); if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 3e7a0fbb12..f99ef8f3e2 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1648,6 +1648,7 @@ static SettingsContainer &GetSettingsTree() advisors->Add(new SettingEntry("news_display.general")); advisors->Add(new SettingEntry("news_display.new_vehicles")); advisors->Add(new SettingEntry("news_display.accident")); + advisors->Add(new SettingEntry("news_display.accident_other")); advisors->Add(new SettingEntry("news_display.company_info")); advisors->Add(new SettingEntry("news_display.acceptance")); advisors->Add(new SettingEntry("news_display.arrival_player")); diff --git a/src/settings_type.h b/src/settings_type.h index 3c2f2be7b0..9da2655d6b 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -242,6 +242,7 @@ struct NewsSettings { uint8 arrival_player; ///< NewsDisplay of vehicles arriving at new stations of current player uint8 arrival_other; ///< NewsDisplay of vehicles arriving at new stations of other players uint8 accident; ///< NewsDisplay of accidents that occur + uint8 accident_other; ///< NewsDisplay if a vehicle from another company is involved in an accident uint8 company_info; ///< NewsDisplay of general company information uint8 open; ///< NewsDisplay on new industry constructions uint8 close; ///< NewsDisplay about closing industries diff --git a/src/table/settings/news_display_settings.ini b/src/table/settings/news_display_settings.ini index 81a739fbaf..edbb8783ba 100644 --- a/src/table/settings/news_display_settings.ini +++ b/src/table/settings/news_display_settings.ini @@ -67,6 +67,17 @@ str = STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS strhelp = STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS_HELPTEXT strval = STR_CONFIG_SETTING_NEWS_MESSAGES_OFF +[SDTC_OMANY] +var = news_display.accident_other +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN +def = 2 +max = 2 +full = _news_display +str = STR_CONFIG_SETTING_NEWS_ACCIDENT_OTHER +strhelp = STR_CONFIG_SETTING_NEWS_ACCIDENT_OTHER_HELPTEXT +strval = STR_CONFIG_SETTING_NEWS_MESSAGES_OFF + [SDTC_OMANY] var = news_display.company_info type = SLE_UINT8