|
OpenTTD Source 20251117-master-g7398d2e290
|
Types related to orders. More...
#include "core/enum_type.hpp"#include "depot_type.h"#include "core/pool_type.hpp"#include "station_type.h"Go to the source code of this file.
Data Structures | |
| struct | DestinationID |
Typedefs | |
| typedef uint8_t | VehicleOrderID |
| The index of an order within its current vehicle (not pool related) | |
| using | OrderListID = PoolID< uint16_t, struct OrderListIDTag, 64000, 0xFFFF > |
Enumerations | |
| enum | OrderType : uint8_t { OT_BEGIN = 0 , OT_NOTHING = 0 , OT_GOTO_STATION = 1 , OT_GOTO_DEPOT = 2 , OT_LOADING = 3 , OT_LEAVESTATION = 4 , OT_DUMMY = 5 , OT_GOTO_WAYPOINT = 6 , OT_CONDITIONAL = 7 , OT_IMPLICIT = 8 , OT_END } |
| Order types. More... | |
| enum | OrderUnloadFlags : uint8_t { OUF_UNLOAD_IF_POSSIBLE = 0 , OUFB_UNLOAD = 1 << 0 , OUFB_TRANSFER = 1 << 1 , OUFB_NO_UNLOAD = 1 << 2 } |
| Flags related to the unloading order. More... | |
| enum | OrderLoadFlags : uint8_t { OLF_LOAD_IF_POSSIBLE = 0 , OLFB_FULL_LOAD = 1 << 1 , OLF_FULL_LOAD_ANY = 3 , OLFB_NO_LOAD = 4 } |
| Flags related to the loading order. More... | |
| enum | OrderNonStopFlags : uint8_t { ONSF_STOP_EVERYWHERE = 0 , ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS = 1 , ONSF_NO_STOP_AT_DESTINATION_STATION = 2 , ONSF_NO_STOP_AT_ANY_STATION = 3 , ONSF_END } |
| Non-stop order flags. More... | |
| enum | OrderStopLocation : uint8_t { OSL_PLATFORM_NEAR_END = 0 , OSL_PLATFORM_MIDDLE = 1 , OSL_PLATFORM_FAR_END = 2 , OSL_END } |
| Where to stop the trains. More... | |
| enum | OrderDepotTypeFlags : uint8_t { ODTF_MANUAL = 0 , ODTFB_SERVICE = 1 << 0 , ODTFB_PART_OF_ORDERS = 1 << 1 } |
| Reasons that could cause us to go to the depot. More... | |
| enum | OrderDepotActionFlags : uint8_t { ODATF_SERVICE_ONLY = 0 , ODATFB_HALT = 1 << 0 , ODATFB_NEAREST_DEPOT = 1 << 1 , ODATFB_UNBUNCH = 1 << 2 } |
| Actions that can be performed when the vehicle enters the depot. More... | |
| enum | OrderConditionVariable : uint8_t { OCV_LOAD_PERCENTAGE , OCV_RELIABILITY , OCV_MAX_SPEED , OCV_AGE , OCV_REQUIRES_SERVICE , OCV_UNCONDITIONALLY , OCV_REMAINING_LIFETIME , OCV_MAX_RELIABILITY , OCV_END } |
| Variables (of a vehicle) to 'cause' skipping on. More... | |
| enum | OrderConditionComparator : uint8_t { OCC_EQUALS , OCC_NOT_EQUALS , OCC_LESS_THAN , OCC_LESS_EQUALS , OCC_MORE_THAN , OCC_MORE_EQUALS , OCC_IS_TRUE , OCC_IS_FALSE , OCC_END } |
| Comparator for the skip reasoning. More... | |
| enum | ModifyOrderFlags : uint8_t { MOF_NON_STOP , MOF_STOP_LOCATION , MOF_UNLOAD , MOF_LOAD , MOF_DEPOT_ACTION , MOF_COND_VARIABLE , MOF_COND_COMPARATOR , MOF_COND_VALUE , MOF_COND_DESTINATION , MOF_END } |
| Enumeration for the data to set in CmdModifyOrder. More... | |
| enum | OrderDepotAction : uint8_t { DA_ALWAYS_GO , DA_SERVICE , DA_STOP , DA_UNBUNCH , DA_END } |
| Depot action to switch to when doing a MOF_DEPOT_ACTION. More... | |
| enum | ModifyTimetableFlags : uint8_t { MTF_WAIT_TIME , MTF_TRAVEL_TIME , MTF_TRAVEL_SPEED , MTF_END } |
| Enumeration for the data to set in CmdChangeTimetable. More... | |
| enum | CloneOptions : uint8_t { CO_SHARE = 0 , CO_COPY = 1 , CO_UNSHARE = 2 } |
| Clone actions. More... | |
Variables | |
| static const VehicleOrderID | INVALID_VEH_ORDER_ID = 0xFF |
| Invalid vehicle order index (sentinel) | |
| static const VehicleOrderID | MAX_VEH_ORDER_ID = INVALID_VEH_ORDER_ID - 1 |
| Last valid VehicleOrderID. | |
| static const uint | IMPLICIT_ORDER_ONLY_CAP = 32 |
| Maximum number of orders in implicit-only lists before we start searching harder for duplicates. | |
Types related to orders.
Definition in file order_type.h.
| using OrderListID = PoolID<uint16_t, struct OrderListIDTag, 64000, 0xFFFF> |
Definition at line 19 of file order_type.h.
| typedef uint8_t VehicleOrderID |
The index of an order within its current vehicle (not pool related)
Definition at line 18 of file order_type.h.
| enum CloneOptions : uint8_t |
Clone actions.
Definition at line 194 of file order_type.h.
| enum ModifyOrderFlags : uint8_t |
Enumeration for the data to set in CmdModifyOrder.
Definition at line 159 of file order_type.h.
| enum ModifyTimetableFlags : uint8_t |
Enumeration for the data to set in CmdChangeTimetable.
| Enumerator | |
|---|---|
| MTF_WAIT_TIME | Set wait time. |
| MTF_TRAVEL_TIME | Set travel time. |
| MTF_TRAVEL_SPEED | Set max travel speed. |
Definition at line 186 of file order_type.h.
| enum OrderConditionComparator : uint8_t |
Comparator for the skip reasoning.
Definition at line 143 of file order_type.h.
| enum OrderConditionVariable : uint8_t |
Variables (of a vehicle) to 'cause' skipping on.
Definition at line 128 of file order_type.h.
| enum OrderDepotAction : uint8_t |
Depot action to switch to when doing a MOF_DEPOT_ACTION.
| Enumerator | |
|---|---|
| DA_ALWAYS_GO | Always go to the depot. |
| DA_SERVICE | Service only if needed. |
| DA_STOP | Go to the depot and stop there. |
| DA_UNBUNCH | Go to the depot and unbunch. |
Definition at line 175 of file order_type.h.
| enum OrderDepotActionFlags : uint8_t |
Actions that can be performed when the vehicle enters the depot.
Definition at line 117 of file order_type.h.
| enum OrderDepotTypeFlags : uint8_t |
Reasons that could cause us to go to the depot.
| Enumerator | |
|---|---|
| ODTF_MANUAL | Manually initiated order. |
| ODTFB_SERVICE | This depot order is because of the servicing limit. |
| ODTFB_PART_OF_ORDERS | This depot order is because of a regular order. |
Definition at line 108 of file order_type.h.
| enum OrderLoadFlags : uint8_t |
Flags related to the loading order.
Definition at line 77 of file order_type.h.
| enum OrderNonStopFlags : uint8_t |
Non-stop order flags.
Definition at line 87 of file order_type.h.
| enum OrderStopLocation : uint8_t |
Where to stop the trains.
| Enumerator | |
|---|---|
| OSL_PLATFORM_NEAR_END | Stop at the near end of the platform. |
| OSL_PLATFORM_MIDDLE | Stop at the middle of the platform. |
| OSL_PLATFORM_FAR_END | Stop at the far end of the platform. |
Definition at line 98 of file order_type.h.
| enum OrderType : uint8_t |
Order types.
It needs to be 8bits, because we save and load it as such
Definition at line 50 of file order_type.h.
| enum OrderUnloadFlags : uint8_t |
Flags related to the unloading order.
Definition at line 67 of file order_type.h.
|
static |
Maximum number of orders in implicit-only lists before we start searching harder for duplicates.
Definition at line 47 of file order_type.h.
Referenced by Vehicle::BeginLoading().
|
static |
Invalid vehicle order index (sentinel)
Definition at line 39 of file order_type.h.
Referenced by RefitWindow::BuildRefitList(), DeleteOrder(), Vehicle::DeleteUnreachedImplicitOrders(), TimetableWindow::DrawArrivalDeparturePanel(), OrdersWindow::DrawWidget(), RefitWindow::DrawWidget(), RefitWindow::GetCapacityString(), OrderList::GetFirstOrder(), OrderList::GetLastOrder(), OrderList::GetNext(), OrderList::GetNextDecisionNode(), OrderList::GetNextStoppingStation(), OrdersWindow::GetOrderFromPt(), InsertOrder(), OrdersWindow::OnClick(), RefitWindow::OnClick(), VehicleViewWindow::OnClick(), OrdersWindow::OnDragDrop(), RefitWindow::OnDragDrop(), OrdersWindow::OnInvalidateData(), TimetableWindow::OnInvalidateData(), OrdersWindow::OnMouseDrag(), RefitWindow::OnMouseDrag(), OrdersWindow::OnPlaceObjectAbort(), LinkRefresher::PredictNextOrder(), ProcessConditionalOrder(), LinkRefresher::RefreshLinks(), RemoveOrderFromAllVehicles(), LinkRefresher::Run(), VehicleOrderSaver::SwitchToNextOrder(), and UpdateOrderDest().
|
static |
Last valid VehicleOrderID.
Definition at line 41 of file order_type.h.
Referenced by Vehicle::BeginLoading(), and CmdInsertOrder().