author | truebrain |
Thu, 24 Apr 2008 23:39:18 +0000 | |
branch | noai |
changeset 10339 | ce6cd68d9eb8 |
parent 10094 | e737405b06dd |
child 10360 | 3234cb59de55 |
permissions | -rw-r--r-- |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
1 |
/* $Id$ */ |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
2 |
|
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9814
diff
changeset
|
3 |
/** @file ai_station.hpp Everything to query and build stations. */ |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
4 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
5 |
#ifndef AI_STATION_HPP |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
6 |
#define AI_STATION_HPP |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
7 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
8 |
#include "ai_object.hpp" |
9866
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
9 |
#include "ai_error.hpp" |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
10 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
11 |
/** |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
12 |
* Class that handles all station related functions. |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
13 |
*/ |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
14 |
class AIStation : public AIObject { |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
15 |
public: |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9814
diff
changeset
|
16 |
static const char *GetClassName() { return "AIStation"; } |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9814
diff
changeset
|
17 |
|
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
18 |
/** |
9873
b1ab23560ecb
(svn r12606) [NoAI] -Fix: minor documentation inconsistancy, to make doxygen even more happy
truebrain
parents:
9866
diff
changeset
|
19 |
* All station related error messages. |
9866
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
20 |
*/ |
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
21 |
enum ErrorMessages { |
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
22 |
/** Base for station related errors */ |
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
23 |
ERR_STATION_BASE = AIError::ERR_CAT_STATION << AIError::ERR_CAT_BIT_SIZE, |
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
24 |
|
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
25 |
/** The station size exceeds the station spread */ |
10094
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
26 |
ERR_STATION_TOO_LARGE, // [STR_306C_STATION_TOO_SPREAD_OUT] |
9866
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
27 |
|
10094
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
28 |
/** The station is build too close to another station, airport or dock */ |
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
29 |
ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, // [STR_300D_TOO_CLOSE_TO_ANOTHER_AIRPORT, STR_3009_TOO_CLOSE_TO_ANOTHER_STATION, STR_304C_TOO_CLOSE_TO_ANOTHER_DOCK] |
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
30 |
|
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
31 |
/** There are too many stations, airports and docks in the game */ |
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
32 |
ERR_STATION_TOO_MANY_STATIONS, // [STR_3008_TOO_MANY_STATIONS_LOADING, STR_TOO_MANY_TRUCK_STOPS, STR_TOO_MANY_BUS_STOPS] |
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
33 |
|
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
34 |
/** There are too many stations, airports of docks in a town */ |
e737405b06dd
(svn r12625) [NoAI] -Add: support for GetLastError in AIRoad. Patch by Morloth.
rubidium
parents:
9873
diff
changeset
|
35 |
ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, // [STR_3007_TOO_MANY_STATIONS_LOADING] |
9866
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
36 |
}; |
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
37 |
|
efc38e1f559a
(svn r12559) [NoAI] -Add: SetLastError support for AIAirport.
rubidium
parents:
9838
diff
changeset
|
38 |
/** |
9670
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
39 |
* Type of stations known in the game. |
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
40 |
*/ |
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
41 |
enum StationType { |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
42 |
STATION_ANY = 0x00, //!< All station types |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
43 |
STATION_TRAIN = 0x01, //!< Train station |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
44 |
STATION_TRUCK_STOP = 0x02, //!< Truck station |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
45 |
STATION_BUS_STOP = 0x04, //!< Bus station |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
46 |
STATION_AIRPORT = 0x08, //!< Airport |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
47 |
STATION_DOCK = 0x10, //!< Dock |
9670
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
48 |
}; |
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
49 |
|
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
50 |
/** |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
51 |
* Checks whether the given station is valid and owned by you. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
52 |
* @param station_id The station to check. |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
53 |
* @return True if and only if the station is valid. |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
54 |
*/ |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
55 |
static bool IsValidStation(StationID station_id); |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
56 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
57 |
/** |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
58 |
* Get the StationID of a tile, if there is a station. |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
59 |
* @param tile The tile to find the stationID of |
9666
5765eb70736d
(svn r10580) [NoAI] -Add: added GetStationID to get the StationID based on a tile
truelight
parents:
9648
diff
changeset
|
60 |
* @return StationID of the station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
61 |
* @post Use IsValidStation() to see if the station is valid. |
9666
5765eb70736d
(svn r10580) [NoAI] -Add: added GetStationID to get the StationID based on a tile
truelight
parents:
9648
diff
changeset
|
62 |
*/ |
5765eb70736d
(svn r10580) [NoAI] -Add: added GetStationID to get the StationID based on a tile
truelight
parents:
9648
diff
changeset
|
63 |
static StationID GetStationID(TileIndex tile); |
5765eb70736d
(svn r10580) [NoAI] -Add: added GetStationID to get the StationID based on a tile
truelight
parents:
9648
diff
changeset
|
64 |
|
5765eb70736d
(svn r10580) [NoAI] -Add: added GetStationID to get the StationID based on a tile
truelight
parents:
9648
diff
changeset
|
65 |
/** |
9696
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
66 |
* Get the name of a station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
67 |
* @param station_id The station to get the name of. |
9696
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
68 |
* @pre IsValidStation(station_id). |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
69 |
* @return The name of the station. |
9696
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
70 |
*/ |
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
71 |
static char *GetName(StationID station_id); |
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
72 |
|
4384ed3de1f0
(svn r10937) [NoAI] -Add: added AIStation::GetName on request by Nickman
truelight
parents:
9670
diff
changeset
|
73 |
/** |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
74 |
* Get the current location of a station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
75 |
* @param station_id The station to get the location of. |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
76 |
* @pre IsValidStation(station_id). |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
77 |
* @return The tile the station is currently on. |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
78 |
*/ |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
79 |
static TileIndex GetLocation(StationID station_id); |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
80 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
81 |
/** |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
82 |
* See how much cargo there is waiting on a station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
83 |
* @param station_id The station to get the cargo-waiting of. |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
84 |
* @param cargo_id The cargo to get the cargo-waiting of. |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
85 |
* @pre IsValidStation(station_id). |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
86 |
* @pre IsValidCargo(cargo_id). |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
87 |
* @return The amount of units waiting at the station. |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
88 |
*/ |
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
89 |
static int32 GetCargoWaiting(StationID station_id, CargoID cargo_id); |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
90 |
|
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
91 |
/** |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
92 |
* See how high the rating is of a cargo on a station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
93 |
* @param station_id The station to get the cargo-rating of. |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
94 |
* @param cargo_id The cargo to get the cargo-rating of. |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
95 |
* @pre IsValidStation(station_id). |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
96 |
* @pre IsValidCargo(cargo_id). |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
97 |
* @return The rating in percent of the cargo on the station. |
9648
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
98 |
*/ |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
99 |
static int32 GetCargoRating(StationID station_id, CargoID cargo_id); |
9670
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
100 |
|
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
101 |
/** |
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
102 |
* Get the coverage radius of this type of station. |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
103 |
* @param type The type of station. |
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
104 |
* @return The radius in tiles. |
9670
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
105 |
*/ |
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
106 |
static int32 GetCoverageRadius(AIStation::StationType type); |
9814
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
107 |
|
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
108 |
/** |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
109 |
* Get the manhattan distance from the tile to the AIStation::GetLocation() |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
110 |
* of the station. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
111 |
* @param station_id The station to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
112 |
* @param tile The tile to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
113 |
* @return The distance between station and tile. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
114 |
*/ |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
115 |
static int32 GetDistanceManhattanToTile(StationID station_id, TileIndex tile); |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
116 |
|
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
117 |
/** |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
118 |
* Get the square distance from the tile to the AIStation::GetLocation() |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
119 |
* of the station. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
120 |
* @param station_id The station to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
121 |
* @param tile The tile to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
122 |
* @return The distance between station and tile. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
123 |
*/ |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9696
diff
changeset
|
124 |
static int32 GetDistanceSquareToTile(StationID station_id, TileIndex tile); |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
125 |
}; |
9838
0839682a601b
(svn r12504) [NoAI] -Documentation: the last few files which now are consistent in their comments (anyway, so I hope :))
truebrain
parents:
9837
diff
changeset
|
126 |
|
9670
820b77e19bb3
(svn r10609) [NoAI] -Add: added GetAirportWidth / GetAirportHeight
truelight
parents:
9666
diff
changeset
|
127 |
DECLARE_ENUM_AS_BIT_SET(AIStation::StationType); |
9638
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
128 |
|
f6d169a5a45a
(svn r10529) [NoAI] -Add: added AIStation to gather information about stations directly by Id, which is used now by AIStationList
truelight
parents:
diff
changeset
|
129 |
#endif /* AI_STATION_HPP */ |