Tracerestrict: Add slot action mode, try to acquire (only on reserve)

This commit is contained in:
Jonathan G Rennison
2021-08-15 22:11:08 +01:00
parent be4c2be35b
commit b8d5113c5a
6 changed files with 22 additions and 3 deletions

View File

@@ -722,6 +722,7 @@ static const StringID _slot_op_cond_ops_str[] = {
STR_TRACE_RESTRICT_SLOT_PBS_RES_END_ACQUIRE_WAIT,
STR_TRACE_RESTRICT_SLOT_PBS_RES_END_TRY_ACQUIRE,
STR_TRACE_RESTRICT_SLOT_PBS_RES_END_RELEASE,
STR_TRACE_RESTRICT_SLOT_TRY_ACQUIRE_ON_RES,
INVALID_STRING_ID,
};
static const uint _slot_op_cond_ops_val[] = {
@@ -732,6 +733,7 @@ static const uint _slot_op_cond_ops_val[] = {
TRSCOF_PBS_RES_END_ACQ_WAIT,
TRSCOF_PBS_RES_END_ACQ_TRY,
TRSCOF_PBS_RES_END_RELEASE,
TRSCOF_ACQUIRE_TRY_ON_RESERVE,
};
/** cargo conditional operators dropdown list set */
static const TraceRestrictDropDownListSet _slot_op_cond_ops = {
@@ -1409,6 +1411,10 @@ static void DrawInstructionString(const TraceRestrictProgram *prog, TraceRestric
instruction_string = STR_TRACE_RESTRICT_SLOT_PBS_RES_END_RELEASE_ITEM;
break;
case TRSCOF_ACQUIRE_TRY_ON_RESERVE:
instruction_string = STR_TRACE_RESTRICT_SLOT_TRY_ACQUIRE_ITEM_RES_ONLY;
break;
default:
NOT_REACHED();
break;