diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 23:20:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 23:20:14 +0000 |
commit | 65d0d19b1616e5867afdf9d9f1c68972d2c3f2b0 (patch) | |
tree | 75d5607cc3393395003137b92c580a4bf8dae3f2 /src/ai/api/ai_controller.cpp | |
parent | 02913f40b0ab1a7771e96e4c6af4ef15b6953cc7 (diff) | |
download | openttd-65d0d19b1616e5867afdf9d9f1c68972d2c3f2b0.tar.xz |
(svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick
Diffstat (limited to 'src/ai/api/ai_controller.cpp')
-rw-r--r-- | src/ai/api/ai_controller.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp index 9a2c552c0..c6130303d 100644 --- a/src/ai/api/ai_controller.cpp +++ b/src/ai/api/ai_controller.cpp @@ -66,6 +66,11 @@ AIController::~AIController() return ::Company::Get(_current_company)->ai_instance->GetController()->ticks; } +/* static */ int AIController::GetOpsTillSuspend() +{ + return ::Company::Get(_current_company)->ai_instance->GetOpsTillSuspend(); +} + /* static */ int AIController::GetSetting(const char *name) { return AIConfig::GetConfig(_current_company)->GetSetting(name); |