Fix: only count distance traveled in vehicles for cargo payment (#11283)
No longer you can utilize the free (and instant) labour of station workers, transporting your cargo from one part of the station to the other. No more! Based on patch by dP.
This commit is contained in:
@@ -70,9 +70,11 @@ public:
|
||||
|
||||
/** Action of transferring cargo from a vehicle to a station. */
|
||||
class CargoTransfer : public CargoMovement<VehicleCargoList, StationCargoList> {
|
||||
protected:
|
||||
TileIndex current_tile; ///< Current tile cargo unloading is happening.
|
||||
public:
|
||||
CargoTransfer(VehicleCargoList *source, StationCargoList *destination, uint max_move) :
|
||||
CargoMovement<VehicleCargoList, StationCargoList>(source, destination, max_move) {}
|
||||
CargoTransfer(VehicleCargoList *source, StationCargoList *destination, uint max_move, TileIndex current_tile) :
|
||||
CargoMovement<VehicleCargoList, StationCargoList>(source, destination, max_move), current_tile(current_tile) {}
|
||||
bool operator()(CargoPacket *cp);
|
||||
};
|
||||
|
||||
@@ -96,10 +98,12 @@ public:
|
||||
|
||||
/** Action of returning previously reserved cargo from the vehicle to the station. */
|
||||
class CargoReturn : public CargoMovement<VehicleCargoList, StationCargoList> {
|
||||
protected:
|
||||
TileIndex current_tile; ///< Current tile cargo unloading is happening.
|
||||
StationID next;
|
||||
public:
|
||||
CargoReturn(VehicleCargoList *source, StationCargoList *destination, uint max_move, StationID next) :
|
||||
CargoMovement<VehicleCargoList, StationCargoList>(source, destination, max_move), next(next) {}
|
||||
CargoReturn(VehicleCargoList *source, StationCargoList *destination, uint max_move, StationID next, TileIndex current_tile) :
|
||||
CargoMovement<VehicleCargoList, StationCargoList>(source, destination, max_move), current_tile(current_tile), next(next) {}
|
||||
bool operator()(CargoPacket *cp);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user