Tracerestrict: Add slot action mode, try to acquire (only on reserve)
This commit is contained in:
@@ -671,6 +671,10 @@ void TraceRestrictProgram::Execute(const Train* v, const TraceRestrictProgramInp
|
||||
if (input.permitted_slot_operations & TRPISP_PBS_RES_END_RELEASE) slot->Vacate(v->index);
|
||||
break;
|
||||
|
||||
case TRSCOF_ACQUIRE_TRY_ON_RESERVE:
|
||||
if (input.permitted_slot_operations & TRPISP_ACQUIRE_ON_RES) slot->Occupy(v->index);
|
||||
break;
|
||||
|
||||
default:
|
||||
NOT_REACHED();
|
||||
break;
|
||||
@@ -924,6 +928,10 @@ CommandCost TraceRestrictProgram::Validate(const std::vector<TraceRestrictItem>
|
||||
actions_used_flags |= TRPAUF_PBS_RES_END_SLOT;
|
||||
break;
|
||||
|
||||
case TRSCOF_ACQUIRE_TRY_ON_RESERVE:
|
||||
actions_used_flags |= TRPAUF_SLOT_ACQUIRE_ON_RES;
|
||||
break;
|
||||
|
||||
default:
|
||||
NOT_REACHED();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user