author | rubidium |
Thu, 03 Apr 2008 23:01:54 +0000 | |
branch | noai |
changeset 9865 | f241472f09dc |
parent 9838 | 0839682a601b |
child 9874 | 4ecef0dadf01 |
permissions | -rw-r--r-- |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
2 |
|
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
3 |
/** @file ai_vehicle.hpp Everything to query and build vehicles. */ |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
4 |
|
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
5 |
#ifndef AI_VEHICLE_HPP |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
6 |
#define AI_VEHICLE_HPP |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
7 |
|
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
8 |
#include "ai_object.hpp" |
9837
c9ec4f82e0d0
(svn r12503) [NoAI] -Sync: with trunk r12461:12501.
rubidium
parents:
9829
diff
changeset
|
9 |
#include "../../engine_type.h" |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
10 |
|
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
11 |
/** |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
12 |
* Class that handles all vehicle related functions. |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
13 |
*/ |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
14 |
class AIVehicle : public AIObject { |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
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:
9737
diff
changeset
|
16 |
static const char *GetClassName() { return "AIVehicle"; } |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
17 |
|
9685
d988aad9fc52
(svn r10634) [NoAI] -Documentation: of course I forgot to document the VehicleType enum
truelight
parents:
9684
diff
changeset
|
18 |
/** |
d988aad9fc52
(svn r10634) [NoAI] -Documentation: of course I forgot to document the VehicleType enum
truelight
parents:
9684
diff
changeset
|
19 |
* The type of a vehicle available in the game. Trams for example are |
d988aad9fc52
(svn r10634) [NoAI] -Documentation: of course I forgot to document the VehicleType enum
truelight
parents:
9684
diff
changeset
|
20 |
* road vehicles, as maglev is a rail vehicle. |
d988aad9fc52
(svn r10634) [NoAI] -Documentation: of course I forgot to document the VehicleType enum
truelight
parents:
9684
diff
changeset
|
21 |
*/ |
9684
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
22 |
enum VehicleType { |
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
23 |
/* Order IS important, as it now matches the internal state of the game for vehicle type */ |
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
|
24 |
VEHICLE_RAIL, //!< Rail type vehicle. |
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
|
25 |
VEHICLE_ROAD, //!< Road type vehicle (bus / truck). |
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
|
26 |
VEHICLE_WATER, //!< Water type vehicle. |
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
|
27 |
VEHICLE_AIR, //!< Air type vehicle. |
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
|
28 |
VEHICLE_INVALID = 0xFF, //!< Invalid vehicle type. |
9684
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
29 |
}; |
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
30 |
|
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
31 |
/** |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
32 |
* Checks whether the given vehicle 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
|
33 |
* @param vehicle_id The vehicle 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
|
34 |
* @return True if and only if the vehicle is valid. |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
35 |
*/ |
9497
f6678533ccba
(svn r9369) [NoAI] -Codechange: make some IsValidXXX() function static, so they can be used by the other classes without the need for an instance.
rubidium
parents:
9491
diff
changeset
|
36 |
static bool IsValidVehicle(VehicleID vehicle_id); |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
37 |
|
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
38 |
/** |
9699
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
39 |
* Set the name of a vehicle. |
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
|
40 |
* @param vehicle_id The vehicle to set the name for. |
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
|
41 |
* @param name The name for the vehicle. |
9699
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
42 |
* @pre IsValidVehicle(vehicle_id). |
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
43 |
* @pre Name has to be unique. |
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
44 |
* @pre You have to own the vehicle. |
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
|
45 |
* @return True if and only if the name was changed. |
9699
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
46 |
*/ |
9737
ee408edf3851
(svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents:
9733
diff
changeset
|
47 |
static bool SetName(VehicleID vehicle_id, const char *name); |
9699
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
48 |
|
e1b5f29cc6f9
(svn r10940) [NoAI] -Add: added AIVehicle::GetName and AIVehicle::SetName to set vehicle names
truelight
parents:
9691
diff
changeset
|
49 |
/** |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
50 |
* Get the name of a vehicle. |
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
|
51 |
* @param vehicle_id The vehicle to get the name of. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
52 |
* @pre IsValidVehicle(vehicle_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
|
53 |
* @return The name the vehicle has. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
54 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
55 |
static char *GetName(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
56 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
57 |
/** |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
58 |
* Get the current location of a vehicle. |
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
|
59 |
* @param vehicle_id The vehicle to get the location of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
60 |
* @pre IsValidVehicle(vehicle_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
|
61 |
* @return The tile the vehicle is currently on. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
62 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
63 |
static TileIndex GetLocation(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
64 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
65 |
/** |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
66 |
* Get the engine-type of a vehicle. |
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 vehicle_id The vehicle to get the engine-type of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
68 |
* @pre IsValidVehicle(vehicle_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 engine type the vehicle has. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
70 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
71 |
static EngineID GetEngineType(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
72 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
73 |
/** |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
74 |
* Get the unitnumber of a vehicle. |
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 vehicle_id The vehicle to get the unitnumber of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
76 |
* @pre IsValidVehicle(vehicle_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 unitnumber the vehicle has. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
78 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
79 |
static int32 GetUnitNumber(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
80 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
81 |
/** |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
82 |
* Get the current age of a vehicle. |
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 vehicle_id The vehicle to get the age of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
84 |
* @pre IsValidVehicle(vehicle_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
|
85 |
* @return The current age the vehicle has. |
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
|
86 |
* @note The age is in days. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
87 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
88 |
static int32 GetAge(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
89 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
90 |
/** |
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
|
91 |
* Get the maximum age of a vehicle. |
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
|
92 |
* @param vehicle_id The vehicle to get the age of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
93 |
* @pre IsValidVehicle(vehicle_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
|
94 |
* @return The maximum age the vehicle has. |
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
|
95 |
* @note The age is in days. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
96 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
97 |
static int32 GetMaxAge(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
98 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
99 |
/** |
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
|
100 |
* Get the age a vehicle has left (maximum - current). |
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
|
101 |
* @param vehicle_id The vehicle to get the age of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
102 |
* @pre IsValidVehicle(vehicle_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
|
103 |
* @return The age the vehicle has left. |
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 |
* @note The age is in days. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
105 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
106 |
static int32 GetAgeLeft(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
107 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
108 |
/** |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
109 |
* Get the running cost of this vehicle. |
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
|
110 |
* @param vehicle_id The vehicle to get the age of. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
111 |
* @pre IsValidVehicle(vehicle_id). |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
112 |
* @return The running cost of the vehicle per year. |
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
|
113 |
* @note Cost is per year; divide by 364 to get per day. |
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
|
114 |
* @note This is not equal to AIEngine::GetRunningCost for Trains, because |
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
|
115 |
* wagons and second engines can add up in the calculation too. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
116 |
*/ |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
117 |
static Money GetRunningCost(VehicleID vehicle_id); |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
118 |
|
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9723
diff
changeset
|
119 |
/** |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
120 |
* Get the current profit of a vehicle. |
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
|
121 |
* @param vehicle_id The vehicle to get the profit of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
122 |
* @pre IsValidVehicle(vehicle_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
|
123 |
* @return The current profit the vehicle has. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
124 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
125 |
static int32 GetProfitThisYear(VehicleID vehicle_id); |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
126 |
|
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
127 |
/** |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
128 |
* Get the profit of last year of a vehicle. |
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
|
129 |
* @param vehicle_id The vehicle to get the profit of. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
130 |
* @pre IsValidVehicle(vehicle_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
|
131 |
* @return The profit the vehicle had last year. |
9615
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
132 |
*/ |
f809cdc8e360
(svn r9782) [NoAI] -Add: add information functions to AIVehicle, like the valuators of AIVehicleList
truelight
parents:
9596
diff
changeset
|
133 |
static int32 GetProfitLastYear(VehicleID vehicle_id); |
9654
b836eb5c521f
(svn r10556) [NoAI] -Add: added AIAirport, which can build an airport
truelight
parents:
9615
diff
changeset
|
134 |
|
9684
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
135 |
/** |
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
136 |
* Get the type of vehicle. |
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
|
137 |
* @param vehicle_id The vehicle to get the type of. |
9684
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
138 |
* @pre IsValidVehicle(vehicle_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
|
139 |
* @return The vehicle type. |
9684
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
140 |
*/ |
623970482fb2
(svn r10633) [NoAI] -Add: added GetVehicleType and AIVehicle::VehicleType
truelight
parents:
9672
diff
changeset
|
141 |
static AIVehicle::VehicleType GetVehicleType(VehicleID vehicle_id); |
9737
ee408edf3851
(svn r12216) [NoAI] -Codechange: made most functions 'static', which removes the need to create an instance to get, for example, engine information, and therefor heavily simplifying AI creation (Morloth)
truebrain
parents:
9733
diff
changeset
|
142 |
|
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
143 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
144 |
* Check if a vehicle is in a depot. |
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
|
145 |
* @param vehicle_id The vehicle 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
|
146 |
* @pre IsValidVehicle(vehicle_id). |
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
|
147 |
* @return True if and only if the vehicle is in a depot. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
148 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
149 |
static bool IsInDepot(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
150 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
151 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
152 |
* Check if a vehicle is in a depot and stopped. |
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
|
153 |
* @param vehicle_id The vehicle 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
|
154 |
* @pre IsValidVehicle(vehicle_id). |
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
|
155 |
* @return True if and only if the vehicle is in a depot and stopped. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
156 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
157 |
static bool IsStoppedInDepot(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
158 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
159 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
160 |
* Builds a vehicle with the given engine at the given depot. |
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
|
161 |
* @param depot The depot where the vehicle will be build. |
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
|
162 |
* @param engine_id The engine to use for this vehicle. |
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
|
163 |
* @pre The tile at depot has a depot that can build the engine and |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
164 |
* is owned by you. |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
165 |
* @pre IsValidEngine(engine_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
|
166 |
* @return The VehicleID of the new vehicle, or an invalid VehicleID when |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
167 |
* it failed. Check the return value using IsValidVehicle. In test-mode |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
168 |
* 0 is returned if it was successful; any other value indicates failure. |
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
|
169 |
* @note In Test Mode it means you can't assign orders yet to this vehicle, |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
170 |
* as the vehicle isn't really built yet. Build it for real first before |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
171 |
* assigning orders. |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
172 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
173 |
static VehicleID BuildVehicle(TileIndex depot, EngineID engine_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
174 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
175 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
176 |
* Clones a vehicle at the given depot, copying or cloning it's orders. |
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
|
177 |
* @param depot The depot where the vehicle will be build. |
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
|
178 |
* @param vehicle_id The vehicle to use as example for the new vehicle. |
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
|
179 |
* @param share_orders Should the orders be copied or shared? |
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
|
180 |
* @pre The tile 'depot' has a depot on it, allowing 'vehicle_id'-type vehicles. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
181 |
* @pre IsValidVehicle(vehicle_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
|
182 |
* @return The VehicleID of the new vehicle, or an invalid VehicleID when |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
183 |
* it failed. Check the return value using IsValidVehicle. In test-mode |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
184 |
* 0 is returned if it was successful; any other value indicates failure. |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
185 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
186 |
static VehicleID CloneVehicle(TileIndex depot, VehicleID vehicle_id, bool share_orders); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
187 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
188 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
189 |
* Refits a vehicle to the given cargo type |
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
|
190 |
* @param vehicle_id The vehicle to refit |
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
|
191 |
* @param cargo The cargo to refit to. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
192 |
* @pre IsValidVehicle(vehicle_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
|
193 |
* @pre AICargo::IsValidCargo(cargo). |
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
|
194 |
* @pre You must own the vehicle. |
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
|
195 |
* @pre The vehicle must be stopped in the depot. |
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
|
196 |
* @return True if and only if the refit succeeded. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
197 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
198 |
static bool RefitVehicle(VehicleID vehicle_id, CargoID cargo); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
199 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
200 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
201 |
* Sells the given vehicle. |
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
|
202 |
* @param vehicle_id The vehicle to sell. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
203 |
* @pre IsValidVehicle(vehicle_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
|
204 |
* @pre You must own the vehicle. |
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
|
205 |
* @pre The vehicle must be stopped in the depot. |
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
|
206 |
* @return True if and only if the vehicle has been sold. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
207 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
208 |
static bool SellVehicle(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
209 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
210 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
211 |
* Sends the given vehicle to a depot. |
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
|
212 |
* @param vehicle_id The vehicle to send to a depot. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
213 |
* @pre IsValidVehicle(vehicle_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
|
214 |
* @return True if and only if the vehicle has been sent to a depot. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
215 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
216 |
static bool SendVehicleToDepot(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
217 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
218 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
219 |
* Starts or stops the given vehicle depending on the current state. |
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
|
220 |
* @param vehicle_id The vehicle to start/stop. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
221 |
* @pre IsValidVehicle(vehicle_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
|
222 |
* @return True if and only if the vehicle has been started or stopped. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
223 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
224 |
static bool StartStopVehicle(VehicleID vehicle_id); |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
225 |
|
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
226 |
/** |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
227 |
* Skips the current order of the given vehicle. |
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
|
228 |
* @param vehicle_id The vehicle to skip the order for. |
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
|
229 |
* @param order_id The selected order to which we want to skip. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
230 |
* @pre IsValidVehicleOrder(vehicle_id, order_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
|
231 |
* @return True if and only if the order has been skipped. |
9829
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
232 |
*/ |
80fbe02a4184
(svn r12491) [NoAI] -Documentation: made parts of the comments more uniform (@file header and class header)
truebrain
parents:
9737
diff
changeset
|
233 |
static bool SkipToVehicleOrder(VehicleID vehicle_id, uint32 order_id); |
9491
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
234 |
}; |
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
235 |
|
351239ad524c
(svn r9361) [NoAI] -Add: some function to find, build and sell road vehicles.
rubidium
parents:
diff
changeset
|
236 |
#endif /* AI_VEHICLE_HPP */ |