summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_accounting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_accounting.cpp')
-rw-r--r--src/ai/api/ai_accounting.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ai/api/ai_accounting.cpp b/src/ai/api/ai_accounting.cpp
new file mode 100644
index 000000000..2134d39b0
--- /dev/null
+++ b/src/ai/api/ai_accounting.cpp
@@ -0,0 +1,26 @@
+/* $Id$ */
+
+/** @file ai_accounting.cpp Implementation of AIAccounting. */
+
+#include "ai_accounting.hpp"
+
+Money AIAccounting::GetCosts()
+{
+ return this->GetDoCommandCosts();
+}
+
+void AIAccounting::ResetCosts()
+{
+ this->SetDoCommandCosts(0);
+}
+
+AIAccounting::AIAccounting()
+{
+ this->last_costs = this->GetDoCommandCosts();
+ this->SetDoCommandCosts(0);
+}
+
+AIAccounting::~AIAccounting()
+{
+ this->SetDoCommandCosts(this->last_costs);
+}