src/ai/api/ai_accounting.cpp
author rubidium
Tue, 15 Apr 2008 15:32:47 +0000
branchnoai
changeset 10189 b18d1d5b047d
parent 9833 89a64246458f
child 10196 aecabd927420
permissions -rw-r--r--
(svn r12720) [NoAI] -Add: functions to get the capacity/current load of a vehicle given a cargo type.
/* $Id$ */

/** @file ai_accounting.cpp Implementation of AIAccounting. */

#include "ai_accounting.hpp"

int32 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);
}