author | rubidium |
Sun, 06 Apr 2008 12:26:40 +0000 | |
branch | noai |
changeset 9867 | b7d9ffe24f81 |
parent 9842 | ef007135fa47 |
child 10187 | d5a6eba5af45 |
permissions | -rw-r--r-- |
9711
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
1 |
/* $Id$ */ |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
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:
9809
diff
changeset
|
3 |
/** @file ai_engine.hpp Everything to query and build engines. */ |
9711
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
4 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
5 |
#ifndef AI_ENGINE_HPP |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
6 |
#define AI_ENGINE_HPP |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
7 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
8 |
#include "ai_object.hpp" |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
9 |
#include "ai_vehicle.hpp" |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
10 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
11 |
/** |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
12 |
* Class that handles all engine related functions. |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
13 |
*/ |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
14 |
class AIEngine : public AIObject { |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
15 |
public: |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
16 |
static const char *GetClassName() { return "AIEngine"; } |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
17 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
18 |
/** |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
19 |
* Checks whether the given engine type is valid and buildable by you. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
20 |
* @param engine_id The engine to check. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
21 |
* @return True if and only if the engine type is valid. |
9711
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
22 |
*/ |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
23 |
static bool IsValidEngine(EngineID engine_id); |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
24 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
25 |
/** |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
26 |
* Get the name of an engine. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
27 |
* @param engine_id The engine to get the name of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
28 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
29 |
* @return The name the engine has. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
30 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
31 |
static char *GetName(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
32 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
33 |
/** |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
34 |
* Get the cargo-type of an engine. In case it can transport 2 cargos, it |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
35 |
* returns the first. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
36 |
* @param engine_id The engine to get the cargo-type of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
37 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
38 |
* @return The cargo-type of the engine. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
39 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
40 |
static CargoID GetCargoType(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
41 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
42 |
/** |
9809
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
43 |
* Check if the cargo of an engine can be refitted to your requested. If |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
44 |
* the engine already allows this cargo, the function also returns true. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
45 |
* @param engine_id The engine to check for refitting. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
46 |
* @param cargo_id The cargo to check for refitting. |
9809
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
47 |
* @pre IsValidEngine(engine_id). |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
48 |
* @pre AICargo::IsValidCargo(cargo_id). |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
49 |
* @return True if the engine can carry this cargo, either via refit, or |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
50 |
* by default. |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
51 |
*/ |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
52 |
static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id); |
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
53 |
|
9b21c21052fa
(svn r12325) [NoAI] -Add: added AIEngine:CanRefitCargo()
truebrain
parents:
9733
diff
changeset
|
54 |
/** |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
55 |
* Get the capacity of an engine. In case it can transport 2 cargos, it |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
56 |
* returns the first. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
57 |
* @param engine_id The engine to get the capacity of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
58 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
59 |
* @return The capacity of the engine. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
60 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
61 |
static uint32 GetCapacity(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
62 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
63 |
/** |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
64 |
* Get the reliability of an engine. The value is between 0 and 100, where |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
65 |
* 100 means 100% reliability (never breaks down) and 0 means 0% |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
66 |
* reliability (you most likely don't want to buy it). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
67 |
* @param engine_id The engine to get the reliability of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
68 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
69 |
* @return The reliability the engine has. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
70 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
71 |
static uint32 GetReliability(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
72 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
73 |
/** |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
74 |
* Get the maximum speed of an engine (in km/h). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
75 |
* @param engine_id The engine to get the maximum speed of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
76 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
77 |
* @return The maximum speed the engine has. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
78 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
79 |
static uint32 GetMaxSpeed(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
80 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
81 |
/** |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
82 |
* Get the new cost of an engine. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
83 |
* @param engine_id The engine to get the new cost of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
84 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
85 |
* @return The new cost the engine has. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
86 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
87 |
static uint32 GetPrice(EngineID engine_id); |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
88 |
|
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
89 |
/** |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
90 |
* Get the maximum age of a brand new engine. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
91 |
* @param engine_id The engine to get the maximum age of. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
92 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
93 |
* @returns The maximum age of a new engine in days. |
9842
ef007135fa47
(svn r12508) [NoAI] -Fix: @note that refer to @return should come after @return, not before @param
truebrain
parents:
9836
diff
changeset
|
94 |
* @note Age is in days; divide by 366 to get per year. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
95 |
*/ |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
96 |
static uint32 GetMaxAge(EngineID engine_id); |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
97 |
|
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
98 |
/** |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
99 |
* Get the running cost of an engine. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
100 |
* @param engine_id The engine to get the running cost of. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
101 |
* @pre IsValidEngine(engine_id). |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
102 |
* @return The running cost of a vehicle per year. |
9842
ef007135fa47
(svn r12508) [NoAI] -Fix: @note that refer to @return should come after @return, not before @param
truebrain
parents:
9836
diff
changeset
|
103 |
* @note Cost is per year; divide by 364 to get per day. |
9733
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
104 |
*/ |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
105 |
static Money GetRunningCost(EngineID engine_id); |
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
106 |
|
49e424cd4edd
(svn r12212) [NoAI] -Add: added AIEngine::GetMaxAge, AIEngine::GetRunningCost and AIVehicle::GetRunningCost (Morloth)
truebrain
parents:
9715
diff
changeset
|
107 |
/** |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
108 |
* Get the type of an engine. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
109 |
* @param engine_id The engine to get the type of. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
110 |
* @pre IsValidEngine(engine_id). |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
111 |
* @return The type the engine has. |
9713
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
112 |
*/ |
7cd214115969
(svn r11297) [NoAI] -Add: in AIEngine, added: GetName, GetCargoType, GetCapacity, GetReliability, GetMaxSpeed, GetVehicleType, and GetPrice (on request by Kilinich)
truelight
parents:
9711
diff
changeset
|
113 |
static AIVehicle::VehicleType GetVehicleType(EngineID engine_id); |
9711
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
114 |
}; |
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
115 |
|
c8b427215c9d
(svn r11295) [NoAI] -Change [API CHANGE]: put Engine things in AIEngine, and rename functions as such. Most noticable: FindBestXXXVehicle -> FineBestXXXEngine
truelight
parents:
diff
changeset
|
116 |
#endif /* AI_ENGINE_HPP */ |