Add setting to pause game after load

This commit is contained in:
dP
2020-06-05 18:34:58 +03:00
parent e9b188fc28
commit f2b6576d8f
6 changed files with 18 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ This is usable for any OpenTTD servers
== CHANGELOG ==
*** next () ***
- Add a setting to pause games after loading
*** 1.10.2 (5 Jun 2020) ***
- Add new minimap mode showing industries, height and farms at the same time.
- Rename "CB town border" zone to "CB cargo acceptance", switch it to a new colored highlight and fix for new CB mode.

View File

@@ -5517,3 +5517,5 @@ STR_CM_CONFIG_SETTING_OPEN_ORDERS_FOR_NEW_VEHICLES :Open orders window for new v
STR_CM_CONFIG_SETTING_OPEN_ORDERS_FOR_NEW_VEHICLES_HELPTEXT :Automatically open oreders windown along with a vehicle window for a new vehicles
STR_CM_PURCHASE_ENGINE_ID :{BLACK}Engine ID: {GOLD}{NUM}
STR_CM_SMALLMAP_TOOLTIP_SHOW_IMBA_ON_MAP :{BLACK}Show industries on map combined with land contours and vegetation
STR_CM_CONFIG_SETTING_PAUSE_AFTER_LOAD :Pause the game after loading: {STRING2}
STR_CM_CONFIG_SETTING_PAUSE_AFTER_LOAD_HELPTEXT :Control whether the game should be paused after load (if it's not already paused). Useful for desync debugging.

View File

@@ -3205,6 +3205,9 @@ bool AfterLoadGame()
AfterLoadLinkGraphs();
AfterLoadFindBTProCBInfo();
citymania::InitializeZoningMap();
if ((!_networking || _network_server ) && _settings_client.gui.pause_after_load) _pause_mode = PM_PAUSED_NORMAL;
return true;
}

View File

@@ -1542,6 +1542,7 @@ static SettingsContainer &GetSettingsTree()
general->Add(new SettingEntry("gui.window_snap_radius"));
general->Add(new SettingEntry("gui.window_soft_limit"));
general->Add(new SettingEntry("gui.right_mouse_wnd_close"));
general->Add(new SettingEntry("gui.pause_after_load"));
}
SettingsPage *viewports = interface->Add(new SettingsPage(STR_CONFIG_SETTING_INTERFACE_VIEWPORTS));

View File

@@ -126,6 +126,7 @@ struct GUISettings {
byte max_num_autosaves; ///< controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1)
bool population_in_label; ///< show the population of a town in his label?
uint8 right_mouse_btn_emulation; ///< should we emulate right mouse clicking?
bool pause_after_load; ///< CM should we pause the game after loading save?
uint8 scrollwheel_scrolling; ///< scrolling using the scroll wheel?
uint8 scrollwheel_multiplier; ///< how much 'wheel' per incoming event from the OS?
bool timetable_arrival_departure; ///< show arrivals and departures in vehicle timetables

View File

@@ -2672,6 +2672,14 @@ str = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE
strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT
cat = SC_BASIC
[SDTC_BOOL]
var = gui.pause_after_load
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def = false
str = STR_CM_CONFIG_SETTING_PAUSE_AFTER_LOAD
strhelp = STR_CM_CONFIG_SETTING_PAUSE_AFTER_LOAD_HELPTEXT
cat = SC_BASIC
[SDTC_BOOL]
var = gui.measure_tooltip
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC