mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r9734) -Feature: Add an option to automatically pause when starting a new game.
This commit is contained in:
parent
57ad2dd0fb
commit
6ebe60fc17
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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 */
|
||||
|
@ -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[] = {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user