summaryrefslogtreecommitdiff
path: root/src/cargopacket.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-06 23:01:35 +0000
committerrubidium <rubidium@openttd.org>2009-10-06 23:01:35 +0000
commit446363aac4c791cf39254c3da7f1bc34e2aebf57 (patch)
treeb3dda29c6e4ef0474fe3754ca641d7dccc37f11f /src/cargopacket.h
parent9b045ac7b2dc4749b3eb511f4a8ec2dc53ba324a (diff)
downloadopenttd-446363aac4c791cf39254c3da7f1bc34e2aebf57.tar.xz
(svn r17734) -Fix (r17732): broke the assumption that 'this->packets == this', which broke loading old savegames. Now remove the (need for the) hack that needed that assumption.
Diffstat (limited to 'src/cargopacket.h')
-rw-r--r--src/cargopacket.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cargopacket.h b/src/cargopacket.h
index b911e8d7c..bbad42bff 100644
--- a/src/cargopacket.h
+++ b/src/cargopacket.h
@@ -17,6 +17,7 @@
#include "tile_type.h"
#include "station_type.h"
#include "cargo_type.h"
+#include "vehicle_type.h"
#include <list>
/** Unique identifier for a single cargo packet. */
@@ -143,6 +144,7 @@ public:
#define FOR_ALL_CARGOPACKETS(var) FOR_ALL_CARGOPACKETS_FROM(var, 0)
extern const struct SaveLoad *GetGoodsDesc();
+extern const SaveLoad *GetVehicleDescription(VehicleType vt);
/**
* Simple collection class for a list of cargo packets
@@ -168,8 +170,10 @@ private:
List packets; ///< The cargo packets in this list
public:
- /** The GoodsEntry has a CargoList. */
+ /** The stations, via GoodsEntry, have a CargoList. */
friend const struct SaveLoad *GetGoodsDesc();
+ /** The vehicles have a cargo list too. */
+ friend const SaveLoad *GetVehicleDescription(VehicleType vt);
/** Create the cargo list */
FORCEINLINE CargoList() { this->InvalidateCache(); }