|
OpenTTD Source 20251213-master-g1091fa6071
|
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 > |
| using | OrderNonStopFlags = EnumBitSet< OrderNonStopFlag, uint8_t > |
| using | OrderDepotTypeFlags = EnumBitSet< OrderDepotTypeFlag, uint8_t > |
| using | OrderDepotActionFlags = EnumBitSet< OrderDepotActionFlag, uint8_t > |
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 class | OrderUnloadType : uint8_t { UnloadIfPossible = 0 , Unload = 1 , Transfer = 2 , NoUnload = 4 } |
| Unloading order types. More... | |
| enum class | OrderLoadType : uint8_t { LoadIfPossible = 0 , FullLoad = 2 , FullLoadAny = 3 , NoLoad = 4 } |
| Loading order types. More... | |
| enum class | OrderNonStopFlag : uint8_t { NoIntermediate = 0 , NoDestination = 1 } |
| Non-stop order flags. More... | |
| enum class | OrderStopLocation : uint8_t { NearEnd = 0 , Middle = 1 , FarEnd = 2 , End } |
| Where to stop the trains. More... | |
| enum class | OrderDepotTypeFlag : uint8_t { Service = 0 , PartOfOrders = 1 } |
| Reasons that could cause us to go to the depot. More... | |
| enum class | OrderDepotActionFlag : uint8_t { Halt = 0 , NearestDepot = 1 , Unbunch = 2 } |
| Actions that can be performed when the vehicle enters the depot. More... | |
| enum class | OrderConditionVariable : uint8_t { LoadPercentage = 0 , Reliability = 1 , MaxSpeed = 2 , Age = 3 , RequiresService = 4 , Unconditionally = 5 , RemainingLifetime = 6 , MaxReliability = 7 , End } |
| Variables (of a vehicle) to 'cause' skipping on. More... | |
| enum class | OrderConditionComparator : uint8_t { Equal = 0 , NotEqual = 1 , LessThan = 2 , LessThanOrEqual = 3 , MoreThan = 4 , MoreThanOrEqual = 5 , IsTrue = 6 , IsFalse = 7 , 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 class | OrderDepotAction : uint8_t { AlwaysGo = 0 , Service = 1 , Stop = 2 , Unbunch = 3 , 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 OrderDepotActionFlags = EnumBitSet<OrderDepotActionFlag, uint8_t> |
Definition at line 123 of file order_type.h.
| using OrderDepotTypeFlags = EnumBitSet<OrderDepotTypeFlag, uint8_t> |
Definition at line 112 of file order_type.h.
| using OrderListID = PoolID<uint16_t, struct OrderListIDTag, 64000, 0xFFFF> |
Definition at line 19 of file order_type.h.
| using OrderNonStopFlags = EnumBitSet<OrderNonStopFlag, uint8_t> |
Definition at line 92 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.
|
strong |
Comparator for the skip reasoning.
Definition at line 143 of file order_type.h.
|
strong |
Variables (of a vehicle) to 'cause' skipping on.
Definition at line 128 of file order_type.h.
|
strong |
Depot action to switch to when doing a MOF_DEPOT_ACTION.
| Enumerator | |
|---|---|
| AlwaysGo | Always go to the depot. |
| Service | Service only if needed. |
| Stop | Go to the depot and stop there. |
| Unbunch | Go to the depot and unbunch. |
Definition at line 175 of file order_type.h.
|
strong |
Actions that can be performed when the vehicle enters the depot.
| Enumerator | |
|---|---|
| Halt | Service the vehicle and then halt it. |
| NearestDepot | Send the vehicle to the nearest depot. |
| Unbunch | Service the vehicle and then unbunch it. |
Definition at line 117 of file order_type.h.
|
strong |
Reasons that could cause us to go to the depot.
| Enumerator | |
|---|---|
| Service | This depot order is because of the servicing limit. |
| PartOfOrders | This depot order is because of a regular order. |
Definition at line 107 of file order_type.h.
|
strong |
Loading order types.
Definition at line 77 of file order_type.h.
|
strong |
Non-stop order flags.
Definition at line 87 of file order_type.h.
|
strong |
Where to stop the trains.
| Enumerator | |
|---|---|
| NearEnd | Stop at the near end of the platform. |
| Middle | Stop at the middle of the platform. |
| FarEnd | Stop at the far end of the platform. |
Definition at line 97 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.
|
strong |
Unloading order types.
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().