Scheduled Dispatch feature
Code is tested and run well on small-ish train network. Not tested extensively.
This commit is contained in:
@@ -76,6 +76,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_STATION_CATCHMENT_INC, XSCF_NULL, 1, 1, "station_catchment_inc", NULL, NULL, NULL },
|
||||
{ XSLFI_CUSTOM_BRIDGE_HEADS, XSCF_NULL, 1, 1, "custom_bridge_heads", NULL, NULL, NULL },
|
||||
{ XSLFI_CHUNNEL, XSCF_NULL, 1, 1, "chunnel", NULL, NULL, "TUNN" },
|
||||
{ XSLFI_SCHEDULED_DISPATCH, XSCF_NULL, 1, 1, "scheduled_dispatch", NULL, NULL, NULL },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
||||
};
|
||||
|
||||
|
@@ -50,6 +50,7 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_STATION_CATCHMENT_INC, ///< Station catchment radius increase
|
||||
XSLFI_CUSTOM_BRIDGE_HEADS, ///< Custom bridge heads
|
||||
XSLFI_CHUNNEL, ///< Tunnels under water (channel tunnel)
|
||||
XSLFI_SCHEDULED_DISPATCH, ///< Scheduled vehicle dispatching
|
||||
|
||||
XSLFI_RIFF_HEADER_60_BIT, ///< Size field in RIFF chunk header is 60 bit
|
||||
XSLFI_HEIGHT_8_BIT, ///< Map tile height is 8 bit instead of 4 bit, but savegame version may be before this became true in trunk
|
||||
|
@@ -245,7 +245,13 @@ static void Ptrs_ORDR()
|
||||
const SaveLoad *GetOrderListDescription()
|
||||
{
|
||||
static const SaveLoad _orderlist_desc[] = {
|
||||
SLE_REF(OrderList, first, REF_ORDER),
|
||||
SLE_REF(OrderList, first, REF_ORDER),
|
||||
SLE_CONDVARVEC_X(OrderList, scheduled_dispatch, SLE_UINT32, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_CONDVAR_X(OrderList, scheduled_dispatch_duration, SLE_UINT32, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_CONDVAR_X(OrderList, scheduled_dispatch_start_date, SLE_INT32, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_CONDVAR_X(OrderList, scheduled_dispatch_start_full_date_fract, SLE_UINT16, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_CONDVAR_X(OrderList, scheduled_dispatch_last_dispatch, SLE_INT32, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_CONDVAR_X(OrderList, scheduled_dispatch_max_delay, SLE_INT32, 0, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SCHEDULED_DISPATCH)),
|
||||
SLE_END()
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user