forked from mirror/OpenTTD
(svn r25865) -Codechange: Refactor detecting of depot vehicle type of a tile to a new function, GetDepotVehicleType (cirdan, LordAro)
This commit is contained in:
@@ -44,12 +44,6 @@ Depot::~Depot()
|
||||
DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
|
||||
|
||||
/* Delete the depot list */
|
||||
VehicleType vt;
|
||||
switch (GetTileType(this->xy)) {
|
||||
default: NOT_REACHED();
|
||||
case MP_RAILWAY: vt = VEH_TRAIN; break;
|
||||
case MP_ROAD: vt = VEH_ROAD; break;
|
||||
case MP_WATER: vt = VEH_SHIP; break;
|
||||
}
|
||||
VehicleType vt = GetDepotVehicleType(this->xy);
|
||||
DeleteWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_DEPOT_LIST, vt, GetTileOwner(this->xy), this->index).Pack());
|
||||
}
|
||||
|
Reference in New Issue
Block a user