--- a/src/ai/api/ai_object.hpp Sun Mar 18 16:02:41 2007 +0000
+++ b/src/ai/api/ai_object.hpp Sun Mar 18 18:02:27 2007 +0000
@@ -21,6 +21,7 @@
struct AIDoCommandStruct {
AIModeProc *mode;
uint delay;
+ int32 costs;
};
/**
@@ -32,17 +33,22 @@
/**
* Executes a raw DoCommand for the AI.
*/
- int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
+ bool DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
/**
- * Checks if the result of a DoCommand went wrong.
+ * Sets the DoCommand costs counter to a value.
*/
- bool CmdFailed(int32 res);
+ void SetDoCommandCosts(int32 value);
/**
- * Checks if the result of a DoCommand went okay.
+ * Increase the current value of the DoCommand costs counter.
*/
- bool CmdSucceeded(int32 res);
+ void IncreaseDoCommandCosts(int32 value);
+
+ /**
+ * Get the current DoCommand costs counter.
+ */
+ int32 GetDoCommandCosts();
/**
* Set the current mode of your AI to this proc.