Merge branch 'tracerestrict' into tracerestrict-sx

This commit is contained in:
Jonathan G Rennison 2015-12-15 18:37:55 +00:00
commit ecbbc03794
3 changed files with 5 additions and 3 deletions

View File

@ -1084,6 +1084,7 @@ void TraceRestrictRemoveDestinationID(TraceRestrictOrderCondAuxField type, uint1
SetTraceRestrictValueDefault(item, TRVT_ORDER); // this updates the instruction in-place SetTraceRestrictValueDefault(item, TRVT_ORDER); // this updates the instruction in-place
} }
} }
if (IsTraceRestrictDoubleItem(item)) i++;
} }
} }

View File

@ -99,7 +99,7 @@ enum TraceRestrictItemType {
TRIT_PF_PENALTY = 2, ///< Add to pathfinder penalty TRIT_PF_PENALTY = 2, ///< Add to pathfinder penalty
TRIT_RESERVE_THROUGH = 3, ///< Reserve through PBS signal TRIT_RESERVE_THROUGH = 3, ///< Reserve through PBS signal
TRIT_COND_BEGIN = 8, ///< Start of conditional item types, note that this has the save value as TRIT_COND_ENDIF TRIT_COND_BEGIN = 8, ///< Start of conditional item types, note that this has the same value as TRIT_COND_ENDIF
TRIT_COND_ENDIF = 8, ///< This is an endif block or an else block TRIT_COND_ENDIF = 8, ///< This is an endif block or an else block
TRIT_COND_UNDEFINED = 9, ///< This condition has no type defined (evaluate as false) TRIT_COND_UNDEFINED = 9, ///< This condition has no type defined (evaluate as false)
TRIT_COND_TRAIN_LENGTH = 10, ///< Test train length TRIT_COND_TRAIN_LENGTH = 10, ///< Test train length
@ -110,6 +110,7 @@ enum TraceRestrictItemType {
TRIT_COND_CARGO = 15, ///< Test if train can carry cargo type TRIT_COND_CARGO = 15, ///< Test if train can carry cargo type
TRIT_COND_ENTRY_DIRECTION = 16, ///< Test which side of signal/signal tile is being entered from TRIT_COND_ENTRY_DIRECTION = 16, ///< Test which side of signal/signal tile is being entered from
TRIT_COND_PBS_ENTRY_SIGNAL = 17, ///< Test tile and PBS-state of previous signal TRIT_COND_PBS_ENTRY_SIGNAL = 17, ///< Test tile and PBS-state of previous signal
//TRIT_COND_TRAIN_OWNER = 24, ///< Test train owner: reserved for future use
/* space up to 31 */ /* space up to 31 */
}; };

View File

@ -123,7 +123,7 @@ static const StringID _program_insert_str[] = {
INVALID_STRING_ID INVALID_STRING_ID
}; };
static const uint32 _program_insert_else_hide_mask = 8; ///< disable bitmask for else static const uint32 _program_insert_else_hide_mask = 8; ///< disable bitmask for else
static const uint32 _program_insert_or_if_hide_mask = 4; ///< disable bitmask for elif static const uint32 _program_insert_or_if_hide_mask = 4; ///< disable bitmask for orif
static const uint32 _program_insert_else_if_hide_mask = 2; ///< disable bitmask for elif static const uint32 _program_insert_else_if_hide_mask = 2; ///< disable bitmask for elif
static const uint _program_insert_val[] = { static const uint _program_insert_val[] = {
TRIT_COND_UNDEFINED, // if block TRIT_COND_UNDEFINED, // if block