Codechange: Untangle command code, flags and error string for DoCommand*.

This commit is contained in:
Michael Lutz
2021-10-03 21:13:32 +02:00
parent 549caca39c
commit a38bbefe1b
47 changed files with 354 additions and 345 deletions

View File

@@ -240,7 +240,7 @@ public:
void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
{
if (_game_mode != GM_EDITOR && this->mode == PM_NORMAL && pt.x != -1 && select_proc == DDSP_PLANT_TREES) {
DoCommandP(CMD_PLANT_TREE | CMD_MSG(STR_ERROR_CAN_T_PLANT_TREE_HERE), end_tile, this->tree_to_plant, start_tile);
DoCommandP(CMD_PLANT_TREE, STR_ERROR_CAN_T_PLANT_TREE_HERE, end_tile, this->tree_to_plant, start_tile);
}
}