equal
deleted
inserted
replaced
7 |
7 |
8 #include "../../stdafx.h" |
8 #include "../../stdafx.h" |
9 #include "../../openttd.h" |
9 #include "../../openttd.h" |
10 #include "../../misc/countedptr.hpp" |
10 #include "../../misc/countedptr.hpp" |
11 #include "../../signs_type.h" |
11 #include "../../signs_type.h" |
|
12 #include "../../strings_type.h" |
12 #include "../../command_type.h" |
13 #include "../../command_type.h" |
13 #include "../../vehicle_type.h" |
14 #include "../../vehicle_type.h" |
14 #include "../../tile_type.h" |
15 #include "../../tile_type.h" |
15 #include "../../player_type.h" |
16 #include "../../player_type.h" |
16 |
17 |
37 struct AIDoCommandStruct { |
38 struct AIDoCommandStruct { |
38 AIModeProc *mode; |
39 AIModeProc *mode; |
39 AIObject *mode_instance; |
40 AIObject *mode_instance; |
40 uint delay; |
41 uint delay; |
41 CommandCost costs; |
42 CommandCost costs; |
|
43 StringID last_error; |
42 bool last_command_res; |
44 bool last_command_res; |
43 VehicleID new_vehicle_id; |
45 VehicleID new_vehicle_id; |
44 SignID new_sign_id; |
46 SignID new_sign_id; |
45 void *event_data; |
47 void *event_data; |
46 }; |
48 }; |
68 |
70 |
69 /** |
71 /** |
70 * Get the current DoCommand costs counter. |
72 * Get the current DoCommand costs counter. |
71 */ |
73 */ |
72 static Money GetDoCommandCosts(); |
74 static Money GetDoCommandCosts(); |
|
75 |
|
76 /** |
|
77 * Set the DoCommand last error. |
|
78 */ |
|
79 static void SetLastError(const StringID last_error); |
|
80 |
|
81 /** |
|
82 * Get the DoCommand last error. |
|
83 */ |
|
84 static const StringID GetLastError(); |
73 |
85 |
74 /** |
86 /** |
75 * Set the current mode of your AI to this proc. |
87 * Set the current mode of your AI to this proc. |
76 */ |
88 */ |
77 static void SetDoCommandMode(AIModeProc *proc, AIObject *instance); |
89 static void SetDoCommandMode(AIModeProc *proc, AIObject *instance); |