diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index c11ee335e0..ee29db8abf 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -2207,6 +2207,7 @@ class NIHTraceRestrict : public NIHelper { CA(TRAIN_NOT_STUCK) CA(CHANGE_COUNTER) CA(NO_PBS_BACK_PENALTY) + CA(SLOT_CONDITIONALS) CA(SPEED_ADAPTATION) CA(PBS_RES_END_SIMULATE) CA(RESERVE_THROUGH_ALWAYS) diff --git a/src/tracerestrict.cpp b/src/tracerestrict.cpp index 8ccd5ce67f..70e649c105 100644 --- a/src/tracerestrict.cpp +++ b/src/tracerestrict.cpp @@ -1286,6 +1286,7 @@ CommandCost TraceRestrictProgram::Validate(const std::vector case TRIT_COND_TRAIN_IN_SLOT: case TRIT_COND_SLOT_OCCUPANCY: + actions_used_flags |= TRPAUF_SLOT_CONDITIONALS; if (find_index(pbs_res_end_released_slots, GetTraceRestrictValue(item)) >= 0 || find_index(pbs_res_end_acquired_slots, GetTraceRestrictValue(item)) >= 0) { actions_used_flags |= TRPAUF_PBS_RES_END_SIMULATE; } @@ -1350,7 +1351,7 @@ CommandCost TraceRestrictProgram::Validate(const std::vector case TRIT_SLOT: switch (static_cast(GetTraceRestrictCondOp(item))) { case TRSCOF_ACQUIRE_WAIT: - actions_used_flags |= TRPAUF_SLOT_ACQUIRE | TRPAUF_WAIT_AT_PBS; + actions_used_flags |= TRPAUF_SLOT_ACQUIRE | TRPAUF_SLOT_CONDITIONALS | TRPAUF_WAIT_AT_PBS; break; case TRSCOF_ACQUIRE_TRY: @@ -1367,7 +1368,7 @@ CommandCost TraceRestrictProgram::Validate(const std::vector break; case TRSCOF_PBS_RES_END_ACQ_WAIT: - actions_used_flags |= TRPAUF_PBS_RES_END_SLOT | TRPAUF_PBS_RES_END_WAIT; + actions_used_flags |= TRPAUF_PBS_RES_END_SLOT | TRPAUF_PBS_RES_END_WAIT | TRPAUF_SLOT_CONDITIONALS ; if (find_index(pbs_res_end_released_slots, GetTraceRestrictValue(item)) >= 0) actions_used_flags |= TRPAUF_PBS_RES_END_SIMULATE; include(pbs_res_end_acquired_slots, GetTraceRestrictValue(item)); break; diff --git a/src/tracerestrict.h b/src/tracerestrict.h index eb794b9c3a..676262ca5d 100644 --- a/src/tracerestrict.h +++ b/src/tracerestrict.h @@ -470,6 +470,7 @@ enum TraceRestrictProgramActionsUsedFlags { TRPAUF_TRAIN_NOT_STUCK = 1 << 11, ///< Train is not stuck TRPAUF_CHANGE_COUNTER = 1 << 12, ///< Change counter value is present TRPAUF_NO_PBS_BACK_PENALTY = 1 << 13, ///< No PBS back penalty is present + TRPAUF_SLOT_CONDITIONALS = 1 << 14, ///< Slot conditionals are present TRPAUF_SPEED_ADAPTATION = 1 << 15, ///< Speed adaptation control TRPAUF_PBS_RES_END_SIMULATE = 1 << 16, ///< PBS reservations ending at this signal slot changes must be fully simulated in dry run mode TRPAUF_RESERVE_THROUGH_ALWAYS = 1 << 17, ///< Reserve through action is unconditionally set