40 friend class SlOrders;
44 GroupID
group = GroupID::Invalid();
48 uint32_t old_order_index = 0;
Properties for front vehicles/consists.
Pool< OrderBackup, OrderBackupID, 1 > OrderBackupPool
The pool type for order backups.
OrderBackupPool::PoolItem<&_order_backup_pool > OrderBackupPoolItem
An item in the OrderBackupPool.
PoolID< uint8_t, struct OrderBackupIDTag, 255, 0xFF > OrderBackupID
Unique identifier for an order backup.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Functions/types related to saving and loading games.
std::span< const struct SaveLoad > SaveLoadTable
A table of SaveLoad entries.
Various front vehicle properties that are preserved when autoreplacing, using order-backup or switchi...
Data for backing up an order of a vehicle so it can be restored after a vehicle is rebuilt in the sam...
static void Reset(TileIndex tile=INVALID_TILE, bool from_gui=true)
Reset the OrderBackups from GUI/game logic.
static void Restore(Vehicle *v, uint32_t user)
Restore the data of this order to the given vehicle.
void DoRestore(Vehicle *v)
Restore the data of this order to the given vehicle.
static void Backup(const Vehicle *v, uint32_t user)
Create an order backup for the given vehicle.
static void ClearVehicle(const Vehicle *v)
Clear/update the (clone) vehicle from an order backup.
OrderBackup(OrderBackupID index)
Create an order backup for savegame loading.
const Vehicle * clone
Vehicle this vehicle was a clone of.
friend SaveLoadTable GetOrderBackupDescription()
Saving and loading of order backups.
TileIndex tile
Tile of the depot where the order was changed.
uint32_t user
The user that requested the backup.
static void ClearGroup(GroupID group)
Clear the group of all backups having this group ID.
GroupID group
The group the vehicle was part of.
friend struct BKORChunkHandler
Creating empty orders upon savegame loading.
static void ResetOfUser(TileIndex tile, uint32_t user)
Reset an OrderBackup given a tile and user.
friend OrderBackupPoolItem
Loading of order backups.
static void ResetUser(uint32_t user)
Reset an user's OrderBackup if needed.
std::vector< Order > orders
The actual orders if the vehicle was not a clone.
static void RemoveOrder(OrderType type, DestinationID destination, bool hangar)
Removes an order from all vehicles.
Templated helper to make a PoolID a single POD value.
const OrderBackupID index
Base class for all pools.
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.
constexpr TileIndex INVALID_TILE
The very nice invalid tile marker.
Types related to vehicles.