author | truebrain |
Thu, 24 Apr 2008 23:39:18 +0000 | |
branch | noai |
changeset 10339 | ce6cd68d9eb8 |
parent 10300 | f947a1d7e544 |
child 10383 | bda80b3e9c25 |
permissions | -rw-r--r-- |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
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:
9814
diff
changeset
|
3 |
/** @file ai_industry.hpp Everything to query and build industries. */ |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
4 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
5 |
#ifndef AI_INDUSTRY_HPP |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
6 |
#define AI_INDUSTRY_HPP |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
7 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
8 |
#include "ai_object.hpp" |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
9 |
|
9448
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
10 |
/** |
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
11 |
* Class that handles all industry related functions. |
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
12 |
*/ |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
13 |
class AIIndustry : public AIObject { |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
14 |
public: |
9529
5f26f4bc574b
(svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents:
9526
diff
changeset
|
15 |
static const char *GetClassName() { return "AIIndustry"; } |
5f26f4bc574b
(svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents:
9526
diff
changeset
|
16 |
|
5f26f4bc574b
(svn r9450) [NoAI] -Fix: don't allow static-method calls from SQ to non-static functions
truelight
parents:
9526
diff
changeset
|
17 |
/** |
9448
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
18 |
* Gets the maximum industry index; there are no valid industries with a |
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
19 |
* higher index. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
20 |
* @return The maximum industry index. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
21 |
* @post Return value is always non-negative. |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
22 |
*/ |
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:
9723
diff
changeset
|
23 |
static IndustryID GetMaxIndustryID(); |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
24 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
25 |
/** |
9448
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
26 |
* Gets the number of industries. This is different than GetMaxIndustryID() |
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
27 |
* because of the way OpenTTD works internally. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
28 |
* @return The number of industries. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
29 |
* @post Return value is always non-negative. |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
30 |
*/ |
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:
9723
diff
changeset
|
31 |
static int32 GetIndustryCount(); |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
32 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
33 |
/** |
9448
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
34 |
* Checks whether the given industry index is valid. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
35 |
* @param industry_id The index to check. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
36 |
* @return True if and only if the industry is valid. |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
37 |
*/ |
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:
9448
diff
changeset
|
38 |
static bool IsValidIndustry(IndustryID industry_id); |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
39 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
40 |
/** |
9448
2a4c4340233d
(svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents:
9427
diff
changeset
|
41 |
* Get the name of the industry. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
42 |
* @param industry_id The industry to get the name of. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
43 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
44 |
* @return The name of the industry. |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
45 |
*/ |
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:
9723
diff
changeset
|
46 |
static char *GetName(IndustryID industry_id); |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
47 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
48 |
/** |
9649
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
9596
diff
changeset
|
49 |
* Gets the production of a cargo of the industry. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
50 |
* @param industry_id The index of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
51 |
* @param cargo_id The index of the cargo. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
52 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
53 |
* @pre AICargo::IsValidCargo(cargo_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
54 |
* @return The production of the cargo for this industry, or -1 if |
9787
959f15f96a1c
(svn r12283) [NoAI] -Fix: document that GetProduction can return -1 if the Industry doesn't produce the Cargo (tnx Progman)
truebrain
parents:
9737
diff
changeset
|
55 |
* this industry doesn't produce this cargo. |
9649
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
9596
diff
changeset
|
56 |
*/ |
9650
7e5e1a7ecbff
(svn r10545) [NoAI] -Fix: GetProduction doesn't return a tile, but a value (tnx glx)
truelight
parents:
9649
diff
changeset
|
57 |
static int32 GetProduction(IndustryID industry_id, CargoID cargo_id); |
9649
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
9596
diff
changeset
|
58 |
|
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
9596
diff
changeset
|
59 |
/** |
9710
ba44f8c1fd52
(svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents:
9650
diff
changeset
|
60 |
* See if an industry accepts a certain cargo. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
61 |
* @param industry_id The index of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
62 |
* @param cargo_id The index of the cargo. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
63 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
64 |
* @pre AICargo::IsValidCargo(cargo_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
65 |
* @return The production of the cargo for this industry. |
9710
ba44f8c1fd52
(svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents:
9650
diff
changeset
|
66 |
*/ |
ba44f8c1fd52
(svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents:
9650
diff
changeset
|
67 |
static bool IsCargoAccepted(IndustryID industry_id, CargoID cargo_id); |
ba44f8c1fd52
(svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents:
9650
diff
changeset
|
68 |
|
ba44f8c1fd52
(svn r11294) [NoAI] -Add: added AIIndustry::IsCargoAccepted + Valuator (on request by Kilinich)
truelight
parents:
9650
diff
changeset
|
69 |
/** |
9810
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
70 |
* Get the total last month's production of the given cargo at an industry. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
71 |
* @param industry_id The index of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
72 |
* @param cargo_id The index of the cargo. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
73 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
74 |
* @pre AICargo::IsValidCargo(cargo_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
75 |
* @return The last month's production of the given cargo for this industry. |
9810
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
76 |
*/ |
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
77 |
static uint16 GetLastMonthProduction(IndustryID industry_id, CargoID cargo_id); |
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
78 |
|
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
79 |
/** |
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
80 |
* Get the total amount of cargo transported from an industry last month. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
81 |
* @param industry_id The index of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
82 |
* @param cargo_id The index of the cargo. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
83 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
84 |
* @pre AICargo::IsValidCargo(cargo_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
85 |
* @return The amount of given cargo transported from this industry last month. |
9810
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
86 |
*/ |
a84fc1be9e3b
(svn r12327) [NoAI] -Add: GetLastMonth(Production|Transported) (Morloth)
truebrain
parents:
9801
diff
changeset
|
87 |
static uint16 GetLastMonthTransported(IndustryID industry_id, CargoID cargo_id); |
9814
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
88 |
|
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
89 |
/** |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
90 |
* Gets the location of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
91 |
* @param industry_id The index of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
92 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
93 |
* @return The location of the industry. |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
94 |
*/ |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
95 |
static TileIndex GetLocation(IndustryID industry_id); |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
96 |
|
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
97 |
/** |
9814
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
98 |
* Get the manhattan distance from the tile to the AIIndustry::GetLocation() |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
99 |
* of the industry. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
100 |
* @param industry_id The industry to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
101 |
* @param tile The tile to get the distance to. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
102 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
103 |
* @pre AIMap::IsValidTile(tile). |
9814
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
104 |
* @return The distance between industry and tile. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
105 |
*/ |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
106 |
static int32 GetDistanceManhattanToTile(IndustryID industry_id, TileIndex tile); |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
107 |
|
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
108 |
/** |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
109 |
* Get the square distance from the tile to the AIIndustry::GetLocation() |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
110 |
* of the industry. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
111 |
* @param industry_id The industry to get the distance to. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
112 |
* @param tile The tile to get the distance to. |
9836
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
113 |
* @pre IsValidIndustry(industry_id). |
54afebfded49
(svn r12502) [NoAI] -Documentation: even more comment consistancy
truebrain
parents:
9829
diff
changeset
|
114 |
* @pre AIMap::IsValidTile(tile). |
9814
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
115 |
* @return The distance between industry and tile. |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
116 |
*/ |
be51ea0adc29
(svn r12411) [NoAI] -Change [API CHANGE]: order of params of CargoIncome is changed
truebrain
parents:
9810
diff
changeset
|
117 |
static int32 GetDistanceSquareToTile(IndustryID industry_id, TileIndex tile); |
10300
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
118 |
|
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
119 |
/** |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
120 |
* Is this industry built on water. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
121 |
* @param industry_id The index of the industry. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
122 |
* @pre IsValidIndustry(industry_id). |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
123 |
* @return True when the industry is built on water. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
124 |
*/ |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
125 |
static bool IsBuiltOnWater(IndustryID industry_id); |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
126 |
|
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
127 |
/** |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
128 |
* Does this industry have a heliport and dock? |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
129 |
* @param industry_id The index of the industry. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
130 |
* @pre IsValidIndustry(industry_id). |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
131 |
* @return True when the industry has a heliport and dock. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
132 |
*/ |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
133 |
static bool HasHeliportAndDock(IndustryID industry_id); |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
134 |
|
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
135 |
/** |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
136 |
* Gets the location of the industry's heliport/dock. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
137 |
* @param industry_id The index of the industry. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
138 |
* @pre IsValidIndustry(industry_id). |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
139 |
* @pre HasHeliportAndDock(industry_id). |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
140 |
* @return The location of the industry's heliport/dock. |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
141 |
*/ |
f947a1d7e544
(svn r12841) [NoAI] -Add: function to test whether an industry is built on water/has a heliport/dock.
rubidium
parents:
9836
diff
changeset
|
142 |
static TileIndex GetHeliportAndDockLocation(IndustryID industry_id); |
9405
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
143 |
}; |
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
144 |
|
df6f3b4b0038
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents:
diff
changeset
|
145 |
#endif /* AI_INDUSTRY_HPP */ |