22 using BaseType = uint16_t;
26 constexpr DestinationID(
size_t index) : value(
static_cast<BaseType
>(index)) {}
30 constexpr DepotID ToDepotID()
const noexcept {
return static_cast<DepotID>(this->value); }
31 constexpr StationID ToStationID()
const noexcept {
return static_cast<StationID>(this->value); }
32 constexpr BaseType base()
const noexcept {
return this->value; }
34 constexpr bool operator ==(
const DestinationID &destination)
const {
return this->value == destination.value; }
35 constexpr bool operator ==(
const StationID &station)
const {
return this->value == station; }
Header files for depots (not hangars)
Type (helpers) for enums.
OrderUnloadType
Unloading order types.
@ Transfer
Transfer all cargo onto the platform.
@ UnloadIfPossible
Unload all cargo that the station accepts.
@ NoUnload
Totally no unloading will be done.
@ Unload
Force unloading all cargo onto the platform, possibly not getting paid.
OrderConditionVariable
Variables (of a vehicle) to 'cause' skipping on.
@ Unconditionally
Always skip.
@ MaxSpeed
Skip based on the maximum speed.
@ Reliability
Skip based on the reliability.
@ MaxReliability
Skip based on the maximum reliability.
@ RequiresService
Skip when the vehicle requires service.
@ LoadPercentage
Skip based on the amount of load.
@ Age
Skip based on the age.
@ RemainingLifetime
Skip based on the remaining lifetime.
OrderStopLocation
Where to stop the trains.
@ NearEnd
Stop at the near end of the platform.
@ FarEnd
Stop at the far end of the platform.
@ Middle
Stop at the middle of the platform.
ModifyOrderFlags
Enumeration for the data to set in CmdModifyOrder.
@ MOF_COND_VARIABLE
A conditional variable changes.
@ MOF_LOAD
Passes an OrderLoadType.
@ MOF_UNLOAD
Passes an OrderUnloadType.
@ MOF_STOP_LOCATION
Passes an OrderStopLocation.
@ MOF_COND_DESTINATION
Change the destination of a conditional order.
@ MOF_COND_COMPARATOR
A comparator changes.
@ MOF_COND_VALUE
The value to set the condition to.
@ MOF_DEPOT_ACTION
Selects the OrderDepotAction.
@ MOF_NON_STOP
Passes an OrderNonStopFlags.
OrderDepotAction
Depot action to switch to when doing a MOF_DEPOT_ACTION.
@ Stop
Go to the depot and stop there.
@ AlwaysGo
Always go to the depot.
OrderNonStopFlag
Non-stop order flags.
@ NoDestination
The vehicle will stop at any station it passes except the destination, aka via.
@ NoIntermediate
The vehicle will not stop at any stations it passes except the destination, aka non-stop.
uint8_t VehicleOrderID
The index of an order within its current vehicle (not pool related)
OrderLoadType
Loading order types.
@ FullLoad
Full load all cargoes of the consist.
@ NoLoad
Do not load anything.
@ FullLoadAny
Full load a single cargo of the consist.
@ LoadIfPossible
Load as long as there is cargo that fits in the train.
static const VehicleOrderID MAX_VEH_ORDER_ID
Last valid VehicleOrderID.
OrderDepotActionFlag
Actions that can be performed when the vehicle enters the depot.
@ Halt
Service the vehicle and then halt it.
@ NearestDepot
Send the vehicle to the nearest depot.
@ Unbunch
Service the vehicle and then unbunch it.
OrderDepotTypeFlag
Reasons that could cause us to go to the depot.
@ PartOfOrders
This depot order is because of a regular order.
@ Service
This depot order is because of the servicing limit.
static const VehicleOrderID INVALID_VEH_ORDER_ID
Invalid vehicle order index (sentinel)
static const uint IMPLICIT_ORDER_ONLY_CAP
Maximum number of orders in implicit-only lists before we start searching harder for duplicates.
OrderConditionComparator
Comparator for the skip reasoning.
@ IsTrue
Skip if the variable is true.
@ NotEqual
Skip if both values are not equal.
@ IsFalse
Skip if the variable is false.
@ LessThanOrEqual
Skip if the value is less or equal to the limit.
@ MoreThan
Skip if the value is more than the limit.
@ MoreThanOrEqual
Skip if the value is more or equal to the limit.
@ LessThan
Skip if the value is less than the limit.
@ Equal
Skip if both values are equal.
ModifyTimetableFlags
Enumeration for the data to set in CmdChangeTimetable.
@ MTF_TRAVEL_TIME
Set travel time.
@ MTF_WAIT_TIME
Set wait time.
@ MTF_TRAVEL_SPEED
Set max travel speed.
CloneOptions
Clone actions.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Types related to stations.
Shared order list linking together the linked list of orders and the list of vehicles sharing this or...
Templated helper to make a PoolID a single POD value.