Merge branch 'master' into jgrpp

# Conflicts:
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/saveload.h
#	src/strings.cpp
#	src/vehicle.cpp
This commit is contained in:
Jonathan G Rennison
2023-04-12 20:02:57 +01:00
26 changed files with 659 additions and 117 deletions

View File

@@ -54,7 +54,7 @@ struct CargoPacket : CargoPacketPool::PoolItem<&_cargopacket_pool> {
private:
Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo.
uint16 count; ///< The amount of cargo in this packet.
byte days_in_transit; ///< Amount of days this packet has been in transit.
uint16 days_in_transit; ///< Amount of days this packet has been in transit.
SourceType source_type; ///< Type of \c source_id.
SourceID source_id; ///< Index of source, INVALID_SOURCE if unknown/invalid.
StationID source; ///< The station where the cargo came from first.
@@ -145,10 +145,10 @@ public:
/**
* Gets the number of days this cargo has been in transit.
* This number isn't really in days, but in 2.5 days (CARGO_AGING_TICKS = 185 ticks) and
* it is capped at 255.
* it is capped at UINT16_MAX.
* @return Length this cargo has been in transit.
*/
inline byte DaysInTransit() const
inline uint16 DaysInTransit() const
{
return this->days_in_transit;
}
@@ -242,8 +242,8 @@ public:
};
protected:
uint count; ///< Cache for the number of cargo entities.
uint cargo_days_in_transit; ///< Cache for the sum of number of days in transit of each entity; comparable to man-hours.
uint count; ///< Cache for the number of cargo entities.
uint64 cargo_days_in_transit; ///< Cache for the sum of number of days in transit of each entity; comparable to man-hours.
Tcont packets; ///< The cargo packets in this list.