1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 03:29:09 +00:00

Add: CompanyCtrlAction enum for CMD_COMPANY_CTRL actions

This commit is contained in:
glx
2019-02-04 18:06:19 +01:00
committed by glx22
parent 33e3f49161
commit 8e7fe3973f
8 changed files with 28 additions and 22 deletions

View File

@@ -836,7 +836,7 @@ DEF_CONSOLE_CMD(ConResetCompany)
}
/* It is safe to remove this company */
DoCommandP(0, 2 | index << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
DoCommandP(0, CCA_DELETE | index << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "Company deleted.");
return true;
@@ -1178,7 +1178,7 @@ DEF_CONSOLE_CMD(ConStartAI)
}
/* Start a new AI company */
DoCommandP(0, 1 | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL);
DoCommandP(0, CCA_NEW_AI | INVALID_COMPANY << 16, 0, CMD_COMPANY_CTRL);
return true;
}
@@ -1213,8 +1213,8 @@ DEF_CONSOLE_CMD(ConReloadAI)
}
/* First kill the company of the AI, then start a new one. This should start the current AI again */
DoCommandP(0, 2 | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
DoCommandP(0, 1 | company_id << 16, 0, CMD_COMPANY_CTRL);
DoCommandP(0, CCA_DELETE | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
DoCommandP(0, CCA_NEW_AI | company_id << 16, 0, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "AI reloaded.");
return true;
@@ -1250,7 +1250,7 @@ DEF_CONSOLE_CMD(ConStopAI)
}
/* Now kill the company of the AI. */
DoCommandP(0, 2 | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
DoCommandP(0, CCA_DELETE | company_id << 16, CRR_MANUAL, CMD_COMPANY_CTRL);
IConsolePrint(CC_DEFAULT, "AI stopped, company deleted.");
return true;