23 using BaseType = uint16_t;
27 constexpr DestinationID(
size_t index) : value(
static_cast<BaseType
>(index)) {}
31 constexpr DepotID ToDepotID()
const noexcept {
return static_cast<DepotID>(this->value); }
32 constexpr StationID ToStationID()
const noexcept {
return static_cast<StationID>(this->value); }
33 constexpr BaseType base()
const noexcept {
return this->value; }
35 constexpr bool operator ==(
const DestinationID &destination)
const {
return this->value == destination.value; }
36 constexpr bool operator ==(
const StationID &station)
const {
return this->value == station; }
Header files for depots (not hangars)
Type (helpers) for enums.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
OrderConditionVariable
Variables (of a vehicle) to 'cause' skipping on.
@ OCV_AGE
Skip based on the age.
@ OCV_UNCONDITIONALLY
Always skip.
@ OCV_MAX_SPEED
Skip based on the maximum speed.
@ OCV_LOAD_PERCENTAGE
Skip based on the amount of load.
@ OCV_REQUIRES_SERVICE
Skip when the vehicle requires service.
@ OCV_RELIABILITY
Skip based on the reliability.
@ OCV_REMAINING_LIFETIME
Skip based on the remaining lifetime.
@ OCV_MAX_RELIABILITY
Skip based on the maximum reliability.
OrderStopLocation
Where to stop the trains.
@ OSL_PLATFORM_MIDDLE
Stop at the middle of the platform.
@ OSL_PLATFORM_FAR_END
Stop at the far end of the platform.
@ OSL_PLATFORM_NEAR_END
Stop at the near end 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.
OrderUnloadFlags
Flags related to the unloading order.
@ OUFB_TRANSFER
Transfer all cargo onto the platform.
@ OUFB_NO_UNLOAD
Totally no unloading will be done.
@ OUF_UNLOAD_IF_POSSIBLE
Unload all cargo that the station accepts.
@ OUFB_UNLOAD
Force unloading all cargo onto the platform, possibly not getting paid.
OrderDepotAction
Depot action to switch to when doing a MOF_DEPOT_ACTION.
@ DA_SERVICE
Service only if needed.
@ DA_STOP
Go to the depot and stop there.
@ DA_ALWAYS_GO
Always go to the depot.
@ DA_UNBUNCH
Go to the depot and unbunch.
OrderDepotTypeFlags
Reasons that could cause us to go to the depot.
@ ODTFB_PART_OF_ORDERS
This depot order is because of a regular order.
@ ODTFB_SERVICE
This depot order is because of the servicing limit.
@ ODTF_MANUAL
Manually initiated order.
uint8_t VehicleOrderID
The index of an order within its current vehicle (not pool related)
OrderDepotActionFlags
Actions that can be performed when the vehicle enters the depot.
@ ODATFB_UNBUNCH
Service the vehicle and then unbunch it.
@ ODATFB_NEAREST_DEPOT
Send the vehicle to the nearest depot.
@ ODATFB_HALT
Service the vehicle and then halt it.
@ ODATF_SERVICE_ONLY
Only service the vehicle.
static const VehicleOrderID MAX_VEH_ORDER_ID
Last valid VehicleOrderID.
OrderLoadFlags
Flags related to the loading order.
@ OLFB_FULL_LOAD
Full load all cargoes of the consist.
@ OLFB_NO_LOAD
Do not load anything.
@ OLF_LOAD_IF_POSSIBLE
Load as long as there is cargo that fits in the train.
@ OLF_FULL_LOAD_ANY
Full load a single cargo of the consist.
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.
@ OCC_LESS_EQUALS
Skip if the value is less or equal to the limit.
@ OCC_EQUALS
Skip if both values are equal.
@ OCC_NOT_EQUALS
Skip if both values are not equal.
@ OCC_MORE_THAN
Skip if the value is more than the limit.
@ OCC_IS_TRUE
Skip if the variable is true.
@ OCC_LESS_THAN
Skip if the value is less than the limit.
@ OCC_MORE_EQUALS
Skip if the value is more or equal to the limit.
@ OCC_IS_FALSE
Skip if the variable is false.
OrderNonStopFlags
Non-stop order flags.
@ ONSF_NO_STOP_AT_ANY_STATION
The vehicle will not stop at any stations it passes including the destination.
@ ONSF_NO_STOP_AT_DESTINATION_STATION
The vehicle will stop at any station it passes except the destination.
@ ONSF_STOP_EVERYWHERE
The vehicle will stop at any station it passes and the destination.
@ ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS
The vehicle will not stop at any stations it passes except the destination.
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...