summaryrefslogtreecommitdiff
path: root/src/cargopacket.h
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-06-23 08:28:53 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-06-23 08:28:53 +0000
commit3dd811e1794bc9247d5ace0bad7ade5998a7b54f (patch)
tree61c77b60ec755ead4784c34bc8dcc0310e9b786e /src/cargopacket.h
parent57e5a95b6fc9cc0882c08dea75d4d5d35c96d45a (diff)
downloadopenttd-3dd811e1794bc9247d5ace0bad7ade5998a7b54f.tar.xz
(svn r25434) -Fix: reroute cargo staged for unloading if a link breaks
Diffstat (limited to 'src/cargopacket.h')
-rw-r--r--src/cargopacket.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cargopacket.h b/src/cargopacket.h
index dc1e66ba2..c4ea9e144 100644
--- a/src/cargopacket.h
+++ b/src/cargopacket.h
@@ -83,6 +83,12 @@ public:
void SetLoadPlace(TileIndex load_place) { this->loaded_at_xy = load_place; }
/**
+ * Sets the station where the packet is supposed to go next.
+ * @param next_station Next station the packet should go to.
+ */
+ void SetNextStation(StationID next_station) { this->next_station = next_station; }
+
+ /**
* Adds some feeder share to the packet.
* @param new_share Feeder share to be added.
*/
@@ -319,6 +325,7 @@ public:
template<class Tsource>
friend class CargoRemoval;
friend class CargoReturn;
+ friend class VehicleCargoReroute;
/**
* Returns source of the first cargo packet in this list.
@@ -424,6 +431,7 @@ public:
uint Unload(uint max_move, StationCargoList *dest, CargoPayment *payment);
uint Shift(uint max_move, VehicleCargoList *dest);
uint Truncate(uint max_move = UINT_MAX);
+ uint Reroute(uint max_move, VehicleCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge);
/**
* Are two the two CargoPackets mergeable in the context of
@@ -467,7 +475,7 @@ public:
friend class CargoRemoval;
friend class CargoReservation;
friend class CargoReturn;
- friend class CargoReroute;
+ friend class StationCargoReroute;
static void InvalidateAllFrom(SourceType src_type, SourceID src);