@ -18,6 +18,7 @@
# include "tile_map.h"
# include "water_map.h"
# include "core/pool_func.hpp"
# include "vehicle_gui.h"
DepotPool _depot_pool ( " Depot " ) ;
INSTANTIATE_POOL_METHODS ( Depot )
@ -57,6 +58,15 @@ Depot::~Depot()
/* Delete the depot-window */
DeleteWindowById ( WC_VEHICLE_DEPOT , this - > xy ) ;
/* Delete the depot list */
WindowNumber wno = ( this - > index < < 16 ) | VLW_DEPOT_LIST | GetTileOwner ( this - > xy ) ;
switch ( GetTileType ( this - > xy ) ) {
default : NOT_REACHED ( ) ;
case MP_RAILWAY : DeleteWindowById ( WC_TRAINS_LIST , wno | ( VEH_TRAIN < < 11 ) ) ; break ;
case MP_ROAD : DeleteWindowById ( WC_ROADVEH_LIST , wno | ( VEH_ROAD < < 11 ) ) ; break ;
case MP_WATER : DeleteWindowById ( WC_SHIPS_LIST , wno | ( VEH_SHIP < < 11 ) ) ; break ;
}
}
void InitializeDepots ( )