(svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick

This commit is contained in:
rubidium
2011-11-04 23:20:14 +00:00
parent 8a5c74e1d0
commit 2de0383538
10 changed files with 52 additions and 6 deletions

View File

@@ -172,6 +172,13 @@ public:
* call from within a function called by the AI.
*/
void Suspend();
/**
* Get the number of operations the AI can execute before being suspended.
* This function is safe to call from within a function called by the AI.
* @return The number of operations to execute.
*/
SQInteger GetOpsTillSuspend();
private:
class AIController *controller; ///< The AI main class.
class AIStorage *storage; ///< Some global information for each running AI.