12 #ifndef ORDER_BACKUP_H 13 #define ORDER_BACKUP_H 74 #define FOR_ALL_ORDER_BACKUPS_FROM(var, start) FOR_ALL_ITEMS_FROM(OrderBackup, order_backup_index, var, start) 80 #define FOR_ALL_ORDER_BACKUPS(var) FOR_ALL_ORDER_BACKUPS_FROM(var, 0) Order * orders
The actual orders if the vehicle was not a clone.
static void ResetUser(uint32 user)
Reset an user's OrderBackup if needed.
uint32 user
The user that requested the backup.
~OrderBackup()
Free everything that is allocated.
TileIndex tile
Tile of the depot where the order was changed.
friend const struct SaveLoad * GetOrderBackupDescription()
Saving and loading of order backups.
uint8 OrderBackupID
Unique identifier for an order backup.
Defintion of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle...
static void ResetOfUser(TileIndex tile, uint32 user)
Reset an OrderBackup given a tile and user.
const Vehicle * clone
Vehicle this vehicle was a clone of.
OrderBackupPool _order_backup_pool
The pool with order backups.
static const uint32 MAKE_ORDER_BACKUP_FLAG
Flag to pass to the vehicle construction command when an order should be preserved.
Various front vehicle properties that are preserved when autoreplacing, using order-backup or switchi...
uint16 GroupID
Type for all group identifiers.
Properties for front vehicles/consists.
Pool< OrderBackup, OrderBackupID, 1, 256 > OrderBackupPool
The pool type for order backups.
Base class for all PoolItems.
Base class for all pools.
static void Reset(TileIndex tile=INVALID_TILE, bool from_gui=true)
Reset the OrderBackups from GUI/game logic.
static void RemoveOrder(OrderType type, DestinationID destination)
Removes an order from all vehicles.
void DoRestore(Vehicle *v)
Restore the data of this order to the given vehicle.
static void ClearVehicle(const Vehicle *v)
Clear/update the (clone) vehicle from an order backup.
uint32 TileIndex
The index/ID of a Tile.
Types related to vehicles.
static void ClearGroup(GroupID group)
Clear the group of all backups having this group ID.
OrderBackup()
Creation for savegame restoration.
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
GroupID group
The group the vehicle was part of.
static void Restore(Vehicle *v, uint32 user)
Restore the data of this order to the given vehicle.
static void Backup(const Vehicle *v, uint32 user)
Create an order backup for the given vehicle.
Data for backing up an order of a vehicle so it can be restored after a vehicle is rebuilt in the sam...
friend void Load_BKOR()
Creating empty orders upon savegame loading.