--- a/src/cargopacket.h Fri Apr 25 02:15:34 2008 +0000
+++ b/src/cargopacket.h Mon May 26 20:45:25 2008 +0000
@@ -1,6 +1,6 @@
/* $Id$ */
-/** @file cargopacket.h */
+/** @file cargopacket.h Base class for cargo packets. */
#ifndef CARGOPACKET_H
#define CARGOPACKET_H
@@ -11,6 +11,8 @@
#include "station_type.h"
#include <list>
+struct BackuppedVehicle;
+
typedef uint32 CargoPacketID;
struct CargoPacket;
@@ -22,13 +24,13 @@
* Container for cargo from the same location and time
*/
struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> {
- StationID source; ///< The station where the cargo came from first
+ Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo
TileIndex source_xy; ///< The origin of the cargo (first station in feeder chain)
TileIndex loaded_at_xy; ///< Location where this cargo has been loaded into the vehicle
+ StationID source; ///< The station where the cargo came from first
uint16 count; ///< The amount of cargo in this packet
byte days_in_transit; ///< Amount of days this packet has been in transit
- Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo
bool paid_for; ///< Have we been paid for this cargo packet?
/**
@@ -56,6 +58,8 @@
* @return true if and only if days_in_transit and source_xy are equal
*/
bool SameSource(const CargoPacket *cp) const;
+
+ void RestoreBackup() const;
};
/**
@@ -99,6 +103,7 @@
uint days_in_transit; ///< Cache for the number of days in transit
public:
+ friend struct BackuppedVehicle;
friend void SaveLoad_STNS(Station *st);
/** Create the cargo list */