(svn r25013) -Feature: show the amount of cargo that has already been reserved by full loading vehicles in the station (fonsinchen)

This commit is contained in:
rubidium
2013-02-17 14:59:27 +00:00
parent cdb0a76958
commit 4367224b35
3 changed files with 31 additions and 1 deletions

View File

@@ -445,6 +445,25 @@ public:
friend class CargoReservation;
friend class CargoReturn;
/**
* Returns sum of cargo reserved for loading onto vehicles.
* @return Cargo reserved for loading.
*/
inline uint ReservedCount() const
{
return this->reserved_count;
}
/**
* Returns total count of cargo, including reserved cargo that's not
* actually in the list.
* @return Total cargo count.
*/
inline uint TotalCount() const
{
return this->count + this->reserved_count;
}
void Append(CargoPacket *cp);
/* Methods for moving cargo around. First parameter is always maximum