src/ai/api/ai_station.cpp
branchnoai
changeset 9814 be51ea0adc29
parent 9736 183b38e0a480
child 9833 89a64246458f
equal deleted inserted replaced
9813:9646f7e37c31 9814:be51ea0adc29
     2 
     2 
     3 /** @file ai_station.cpp handles the functions of the AIStation class */
     3 /** @file ai_station.cpp handles the functions of the AIStation class */
     4 
     4 
     5 #include "ai_station.hpp"
     5 #include "ai_station.hpp"
     6 #include "ai_cargo.hpp"
     6 #include "ai_cargo.hpp"
       
     7 #include "ai_map.hpp"
     7 #include "../../debug.h"
     8 #include "../../debug.h"
     8 #include "../../station.h"
     9 #include "../../station.h"
     9 #include "../../station_map.h"
    10 #include "../../station_map.h"
    10 #include "../../variables.h"
    11 #include "../../variables.h"
    11 #include "../../strings_func.h"
    12 #include "../../strings_func.h"
    74 		case STATION_BUS_STOP:   return CA_BUS;
    75 		case STATION_BUS_STOP:   return CA_BUS;
    75 		case STATION_DOCK:       return CA_DOCK;
    76 		case STATION_DOCK:       return CA_DOCK;
    76 		default:                 return CA_NONE;
    77 		default:                 return CA_NONE;
    77 	}
    78 	}
    78 }
    79 }
       
    80 
       
    81 /* static */ int32 AIStation::GetDistanceManhattanToTile(StationID station_id, TileIndex tile)
       
    82 {
       
    83 	return AIMap::DistanceManhattan(tile, GetLocation(station_id));
       
    84 }
       
    85 
       
    86 /* static */ int32 AIStation::GetDistanceSquareToTile(StationID station_id, TileIndex tile)
       
    87 {
       
    88 	return AIMap::DistanceSquare(tile, GetLocation(station_id));
       
    89 }