diff options
author | glx <glx@openttd.org> | 2019-02-04 18:06:19 +0100 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2019-02-04 21:08:36 +0100 |
commit | 8e7fe3973fc03561c828594ce3293c1ab3c15481 (patch) | |
tree | 14aece330e30ec3188f1f77f0ba0b138a8a86117 /src/console_cmds.cpp | |
parent | 33e3f4916173b4129cbbe60f94dae659a70edb83 (diff) | |
download | openttd-8e7fe3973fc03561c828594ce3293c1ab3c15481.tar.xz |
Add: CompanyCtrlAction enum for CMD_COMPANY_CTRL actions
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index d9155a97d..732ace6a2 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -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; |