diff options
author | maedhros <maedhros@openttd.org> | 2007-04-28 15:06:32 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-04-28 15:06:32 +0000 |
commit | 97e88ca4f1c23d28a09cb02e79bba4f50e07ea40 (patch) | |
tree | a1d7c41f3672e960253e07e51c7438be0bba480c | |
parent | 0ac14b39afe239c0a9166247dca15033fdc0d024 (diff) | |
download | openttd-97e88ca4f1c23d28a09cb02e79bba4f50e07ea40.tar.xz |
(svn r9734) -Feature: Add an option to automatically pause when starting a new game.
-rw-r--r-- | src/genworld.cpp | 3 | ||||
-rw-r--r-- | src/lang/english.txt | 1 | ||||
-rw-r--r-- | src/settings.cpp | 1 | ||||
-rw-r--r-- | src/settings_gui.cpp | 1 | ||||
-rw-r--r-- | src/variables.h | 2 |
5 files changed, 8 insertions, 0 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp index c2b025f31..e766df23f 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -10,6 +10,7 @@ #include "table/sprites.h" #include "variables.h" #include "thread.h" +#include "command.h" #include "genworld.h" #include "gfx.h" #include "gfxinit.h" @@ -153,6 +154,8 @@ static void *_GenerateWorld(void *arg) if (_network_dedicated) DEBUG(net, 0, "Map generated, starting game"); + if (_patches.pause_on_newgame) DoCommandP(0, 1, 0, NULL, CMD_PAUSE); + return NULL; } diff --git a/src/lang/english.txt b/src/lang/english.txt index df6b8ba49..7e0e22ec9 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1097,6 +1097,7 @@ STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom map STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll map STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Off STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Map scrollwheel speed: {ORANGE}{STRING1} +STR_CONFIG_PATCHES_PAUSE_ON_NEW_GAME :{LTBLUE}Automatically pause when starting a new game: {ORANGE}{STRING1} STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max trains per player: {ORANGE}{STRING1} STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max road vehicles per player: {ORANGE}{STRING1} diff --git a/src/settings.cpp b/src/settings.cpp index 08d3215fb..696ac64fc 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1323,6 +1323,7 @@ const SettingDesc _patch_settings[] = { SDT_BOOL(Patches, prefer_teamchat, S, 0, false, STR_CONFIG_PATCHES_PREFER_TEAMCHAT, NULL), SDT_VAR(Patches, scrollwheel_scrolling,SLE_UINT8,S,MS, 0, 0, 2, 0, STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING, NULL), SDT_VAR(Patches,scrollwheel_multiplier,SLE_UINT8,S, 0, 5, 1, 15, 1, STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER,NULL), + SDT_BOOL(Patches, pause_on_newgame, S, 0, false, STR_CONFIG_PATCHES_PAUSE_ON_NEW_GAME, NULL), /***************************************************************************/ /* Construction section of the GUI-configure patches window */ diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 09e9fe3f6..5ac040c2b 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -596,6 +596,7 @@ static const char *_patches_ui[] = { * Since it's also able to completely disable the scrollwheel will we display it on all platforms anyway */ "scrollwheel_scrolling", "scrollwheel_multiplier", + "pause_on_newgame", }; static const char *_patches_construction[] = { diff --git a/src/variables.h b/src/variables.h index b33dd646b..bebc1cc42 100644 --- a/src/variables.h +++ b/src/variables.h @@ -229,6 +229,8 @@ struct Patches { uint8 town_growth_rate; ///< Town growth rate uint8 larger_towns; ///< The number of cities to build. These start off larger and grow twice as fast uint8 initial_city_size; ///< Multiplier for the initial size of the cities compared to towns + + bool pause_on_newgame; ///< Whether to start new games paused or not. }; VARDEF Patches _patches; |