Add a release slot at front of train slot action.

Distinguish from release slot at back.
Fix slot release and acquire at front when passing PBS from back.
This commit is contained in:
Jonathan G Rennison
2017-03-31 01:10:26 +01:00
parent 870216d27c
commit 0772236986
5 changed files with 37 additions and 18 deletions

View File

@@ -482,13 +482,15 @@ static const TraceRestrictDropDownListSet _cargo_cond_ops = {
static const StringID _slot_op_cond_ops_str[] = {
STR_TRACE_RESTRICT_SLOT_ACQUIRE_WAIT,
STR_TRACE_RESTRICT_SLOT_TRY_ACQUIRE,
STR_TRACE_RESTRICT_SLOT_RELEASE,
STR_TRACE_RESTRICT_SLOT_RELEASE_FRONT,
STR_TRACE_RESTRICT_SLOT_RELEASE_BACK,
INVALID_STRING_ID,
};
static const uint _slot_op_cond_ops_val[] = {
TRSCOF_ACQUIRE_WAIT,
TRSCOF_ACQUIRE_TRY,
TRSCOF_RELEASE,
TRSCOF_RELEASE_FRONT,
TRSCOF_RELEASE_BACK,
};
/** cargo conditional operators dropdown list set */
static const TraceRestrictDropDownListSet _slot_op_cond_ops = {
@@ -1006,8 +1008,12 @@ static void DrawInstructionString(const TraceRestrictProgram *prog, TraceRestric
instruction_string = STR_TRACE_RESTRICT_SLOT_TRY_ACQUIRE_ITEM;
break;
case TRSCOF_RELEASE:
instruction_string = STR_TRACE_RESTRICT_SLOT_RELEASE_ITEM;
case TRSCOF_RELEASE_BACK:
instruction_string = STR_TRACE_RESTRICT_SLOT_RELEASE_BACK_ITEM;
break;
case TRSCOF_RELEASE_FRONT:
instruction_string = STR_TRACE_RESTRICT_SLOT_RELEASE_FRONT_ITEM;
break;
default: