author | truelight |
Fri, 13 Jul 2007 13:49:39 +0000 | |
branch | noai |
changeset 9648 | 760b7b504e37 |
parent 9638 | f6d169a5a45a |
child 9666 | 5765eb70736d |
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 |
|
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
|
3 |
/** @file ai_station.hpp Everything to query and build stations */ |
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" |
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
|
9 |
|
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 |
* 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
|
12 |
*/ |
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 |
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
|
14 |
public: |
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 |
/** |
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
|
16 |
* The name of the class, needed by several sub-processes. |
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
|
17 |
*/ |
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 |
static const char *GetClassName() { return "AIStation"; } |
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
|
19 |
|
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
|
20 |
/** |
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
|
21 |
* Checks whether the given station is valid and owned by you. |
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
|
22 |
* @param station_id the station to check. |
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
|
23 |
* @return true if and only if the station is valid. |
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
|
24 |
*/ |
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
|
25 |
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
|
26 |
|
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
|
27 |
/** |
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
|
28 |
* Get the current location of a station. |
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
|
29 |
* @param station_id the station to get the location of. |
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
|
30 |
* @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
|
31 |
* @return the tile the station is currently on. |
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
|
32 |
*/ |
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
|
33 |
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
|
34 |
|
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
|
35 |
/** |
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
|
36 |
* See how much cargo there is waiting on a station. |
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
|
37 |
* @param station_id the station to get the cargo-waiting of. |
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
|
38 |
* @param cargo_id the cargo to get the cargo-waiting of. |
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
|
39 |
* @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
|
40 |
* @pre IsValidCargo(cargo_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
|
41 |
* @return the amount of units waiting at the station. |
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
|
42 |
*/ |
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
|
43 |
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
|
44 |
|
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
45 |
/** |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
46 |
* See how high the rating is of a cargo on a station. |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
47 |
* @param station_id the station to get the cargo-rating of. |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
48 |
* @param cargo_id the cargo to get the cargo-rating of. |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
49 |
* @pre IsValidStation(station_id). |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
50 |
* @pre IsValidCargo(cargo_id). |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
51 |
* @return the rating in percent of the cargo on the station. |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
52 |
*/ |
760b7b504e37
(svn r10543) [NoAI] -Add: added AIStationListCargoRating as valuator for a station list
truelight
parents:
9638
diff
changeset
|
53 |
static int32 GetCargoRating(StationID station_id, CargoID cargo_id); |
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 |
|
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 |
#endif /* AI_STATION_HPP */ |