src/ai/api/ai_accounting.cpp
author rubidium
Sat, 14 Apr 2007 20:38:10 +0000
branchnoai
changeset 9594 5009a30f320a
parent 9452 4c5eedbc3ba9
child 9833 89a64246458f
permissions -rw-r--r--
(svn r9627) [NoAI] -Fix: let the squirrel export script export all needed (and a few more) types of references to structs and classes.
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     1
/* $Id$ */
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     2
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     3
/** @file ai_accounting.cpp everything to handle AI accounting things */
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     4
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     5
#include "ai_accounting.hpp"
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     6
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     7
int32 AIAccounting::GetCosts()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     8
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     9
	return this->GetDoCommandCosts();
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    10
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    11
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    12
void AIAccounting::ResetCosts()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    13
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    14
	this->SetDoCommandCosts(0);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    15
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    16
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    17
AIAccounting::AIAccounting()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    18
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    19
	this->last_costs = this->GetDoCommandCosts();
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    20
	this->SetDoCommandCosts(0);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    21
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    22
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    23
AIAccounting::~AIAccounting()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    24
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    25
	this->SetDoCommandCosts(this->last_costs);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    26
}