Change: by default, make "unload all" leave stations empty (#9301)

(cherry picked from commit 7648483364)
This commit is contained in:
Patric Stout
2021-05-27 17:56:39 +01:00
committed by Jonathan G Rennison
parent 3411203e5d
commit 563884105f
3 changed files with 33 additions and 8 deletions

View File

@@ -249,6 +249,7 @@ static void ShowHelp()
" -M music_set = Force the music set (see below)\n"
" -c config_file = Use 'config_file' instead of 'openttd.cfg'\n"
" -x = Never save configuration changes to disk\n"
" -X = Don't use global folders to search for files\n"
" -q savegame = Write some information about the savegame and exit\n"
" -Z = Write detailed version information and exit\n"
"\n",
@@ -681,6 +682,7 @@ static const OptionData _options[] = {
GETOPT_SHORT_VALUE('G'),
GETOPT_SHORT_VALUE('c'),
GETOPT_SHORT_NOVAL('x'),
GETOPT_SHORT_NOVAL('X'),
GETOPT_SHORT_VALUE('q'),
GETOPT_SHORT_VALUE('K'),
GETOPT_SHORT_NOVAL('h'),
@@ -710,6 +712,7 @@ int openttd_main(int argc, char *argv[])
std::unique_ptr<AfterNewGRFScan> scanner(new AfterNewGRFScan());
bool dedicated = false;
char *debuglog_conn = nullptr;
bool only_local_path = false;
extern bool _dedicated_forks;
_dedicated_forks = false;
@@ -792,7 +795,7 @@ int openttd_main(int argc, char *argv[])
break;
case 'q':
case 'K': {
DeterminePaths(argv[0]);
DeterminePaths(argv[0], only_local_path);
if (StrEmpty(mgo.opt)) {
ret = 1;
return ret;
@@ -833,6 +836,7 @@ int openttd_main(int argc, char *argv[])
CrashLog::VersionInfoLog();
return ret;
}
case 'X': only_local_path = true; break;
case 'h':
i = -2; // Force printing of help.
break;
@@ -846,7 +850,7 @@ int openttd_main(int argc, char *argv[])
*
* The next two functions are needed to list the graphics sets. We can't do them earlier
* because then we cannot show it on the debug console as that hasn't been configured yet. */
DeterminePaths(argv[0]);
DeterminePaths(argv[0], only_local_path);
TarScanner::DoScan(TarScanner::BASESET);
BaseGraphics::FindSets();
BaseSounds::FindSets();
@@ -855,7 +859,7 @@ int openttd_main(int argc, char *argv[])
return ret;
}
DeterminePaths(argv[0]);
DeterminePaths(argv[0], only_local_path);
TarScanner::DoScan(TarScanner::BASESET);
if (dedicated) DEBUG(net, 0, "Starting dedicated version %s", _openttd_revision);