Add trace restrict slot membership conditional.

This commit is contained in:
Jonathan G Rennison
2017-03-30 21:53:30 +01:00
parent 6417fb16c3
commit 927323dcb1
4 changed files with 36 additions and 3 deletions

View File

@@ -133,6 +133,7 @@ enum TraceRestrictItemType {
TRIT_COND_TRAIN_GROUP = 18, ///< Test train group membership
TRIT_COND_PHYS_PROP = 19, ///< Test train physical property
TRIT_COND_PHYS_RATIO = 20, ///< Test train physical property ratio
TRIT_COND_SLOT = 21, ///< Test train slot membership
//TRIT_COND_TRAIN_OWNER = 24, ///< Test train owner: reserved for future use
/* space up to 31 */
};
@@ -551,6 +552,11 @@ static inline TraceRestrictTypePropertySet GetTraceRestrictTypeProperties(TraceR
out.cond_type = TRCOT_BINARY;
break;
case TRIT_COND_SLOT:
out.value_type = TRVT_SLOT_INDEX;
out.cond_type = TRCOT_BINARY;
break;
case TRIT_COND_PHYS_PROP:
switch (static_cast<TraceRestrictPhysPropCondAuxField>(GetTraceRestrictAuxField(item))) {
case TRPPCAF_WEIGHT: