Codechange: Template DoCommand to automagically reflect the parameters of the command proc.

When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
This commit is contained in:
Michael Lutz
2021-10-30 01:31:46 +02:00
parent c88b104ec6
commit e740c24eb7
39 changed files with 320 additions and 229 deletions

View File

@@ -1128,7 +1128,7 @@ CommandCost CmdRenamePresident(DoCommandFlag flags, TileIndex tile, uint32 p1, u
c->president_name = text;
if (c->name_1 == STR_SV_UNNAMED && c->name.empty()) {
DoCommand(DC_EXEC, CMD_RENAME_COMPANY, 0, 0, 0, text + " Transport");
Command<CMD_RENAME_COMPANY>::Do(DC_EXEC, 0, 0, 0, text + " Transport");
}
}