Codechange: Un-bitstuff town-related commands.

This commit is contained in:
Michael Lutz
2021-11-17 23:54:46 +01:00
parent e08b3abe7f
commit 1a42a8a5d5
6 changed files with 86 additions and 106 deletions

View File

@@ -288,7 +288,7 @@ public:
}
case WID_TA_EXECUTE:
Command<CMD_DO_TOWN_ACTION>::Post(STR_ERROR_CAN_T_DO_THIS, this->town->xy, this->window_number, this->sel_index, {});
Command<CMD_DO_TOWN_ACTION>::Post(STR_ERROR_CAN_T_DO_THIS, this->town->xy, this->window_number, this->sel_index);
break;
}
}
@@ -475,12 +475,12 @@ public:
_warn_town_no_roads = true;
}
Command<CMD_EXPAND_TOWN>::Post(STR_ERROR_CAN_T_EXPAND_TOWN, 0, this->window_number, 0, {});
Command<CMD_EXPAND_TOWN>::Post(STR_ERROR_CAN_T_EXPAND_TOWN, this->window_number, 0);
break;
}
case WID_TV_DELETE: // delete town - only available on Scenario editor
Command<CMD_DELETE_TOWN>::Post(STR_ERROR_TOWN_CAN_T_DELETE, 0, this->window_number, 0, {});
Command<CMD_DELETE_TOWN>::Post(STR_ERROR_TOWN_CAN_T_DELETE, this->window_number);
break;
}
}
@@ -562,7 +562,7 @@ public:
{
if (str == nullptr) return;
Command<CMD_RENAME_TOWN>::Post(STR_ERROR_CAN_T_RENAME_TOWN, 0, this->window_number, 0, str);
Command<CMD_RENAME_TOWN>::Post(STR_ERROR_CAN_T_RENAME_TOWN, this->window_number, str);
}
};
@@ -1164,7 +1164,7 @@ public:
}
bool success = Command<CMD_FOUND_TOWN>::Post(errstr, cc,
tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6, townnameparts, name);
tile, this->town_size, this->city, this->town_layout, random, townnameparts, name);
/* Rerandomise name, if success and no cost-estimation. */
if (success && !_shift_pressed) this->RandomTownName();