Add dev console command to trigger disaster
This commit is contained in:
@@ -2010,6 +2010,19 @@ DEF_CONSOLE_CMD(ConCheckCaches)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEF_CONSOLE_CMD(ConDoDisaster)
|
||||||
|
{
|
||||||
|
if (argc == 0) {
|
||||||
|
IConsoleHelp("Debug: Do disaster");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void DoDisaster();
|
||||||
|
DoDisaster();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
/******************
|
/******************
|
||||||
* debug commands
|
* debug commands
|
||||||
@@ -2161,6 +2174,7 @@ void IConsoleStdLibRegister()
|
|||||||
|
|
||||||
/* NewGRF development stuff */
|
/* NewGRF development stuff */
|
||||||
IConsoleCmdRegister("reload_newgrfs", ConNewGRFReload, ConHookNewGRFDeveloperTool);
|
IConsoleCmdRegister("reload_newgrfs", ConNewGRFReload, ConHookNewGRFDeveloperTool);
|
||||||
|
IConsoleCmdRegister("do_disaster", ConDoDisaster, ConHookNewGRFDeveloperTool, true);
|
||||||
|
|
||||||
/* Bug workarounds */
|
/* Bug workarounds */
|
||||||
IConsoleCmdRegister("jgrpp_bug_workaround_unblock_heliports", ConResetBlockedHeliports, ConHookNoNetwork, true);
|
IConsoleCmdRegister("jgrpp_bug_workaround_unblock_heliports", ConResetBlockedHeliports, ConHookNoNetwork, true);
|
||||||
|
@@ -905,7 +905,7 @@ static const Disaster _disasters[] = {
|
|||||||
{Disaster_CoalMine_Init, 1950, 1985}, // coalmine
|
{Disaster_CoalMine_Init, 1950, 1985}, // coalmine
|
||||||
};
|
};
|
||||||
|
|
||||||
static void DoDisaster()
|
void DoDisaster()
|
||||||
{
|
{
|
||||||
byte buf[lengthof(_disasters)];
|
byte buf[lengthof(_disasters)];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user