Codechange: add helpers to VehicleListIdentifier for ConvertibleThroughBase

This commit is contained in:
Rubidium
2025-02-09 15:13:43 +01:00
committed by rubidium42
parent f60b3d7f79
commit 6535fc1f80
2 changed files with 5 additions and 1 deletions

View File

@@ -299,7 +299,7 @@ struct DepotWindow : Window {
void Close([[maybe_unused]] int data = 0) override
{
CloseWindowById(WC_BUILD_VEHICLE, this->window_number);
CloseWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, this->GetDestinationIndex().base()).ToWindowNumber(), false);
CloseWindowById(GetWindowClassForVehicleType(this->type), VehicleListIdentifier(VL_DEPOT_LIST, this->type, this->owner, this->GetDestinationIndex()).ToWindowNumber(), false);
OrderBackup::Reset(TileIndex(this->window_number));
this->Window::Close();
}