Handle double instructions correctly when deleting stations/depots/etc.

Fix some whitespace and comment typos.
pull/6/merge
Jonathan G Rennison 9 years ago
parent a93714a720
commit 9c5189b212

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

@ -99,7 +99,7 @@ enum TraceRestrictItemType {
TRIT_PF_PENALTY = 2, ///< Add to pathfinder penalty
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_UNDEFINED = 9, ///< This condition has no type defined (evaluate as false)
TRIT_COND_TRAIN_LENGTH = 10, ///< Test train length

@ -123,7 +123,7 @@ static const StringID _program_insert_str[] = {
INVALID_STRING_ID
};
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 uint _program_insert_val[] = {
TRIT_COND_UNDEFINED, // if block
@ -1418,7 +1418,7 @@ private:
this->RaiseWidget(TR_WIDGET_VALUE_DEST);
this->RaiseWidget(TR_WIDGET_VALUE_SIGNAL);
NWidgetStacked *left_2_sel = this->GetWidget<NWidgetStacked>(TR_WIDGET_SEL_TOP_LEFT_2);
NWidgetStacked *left_2_sel = this->GetWidget<NWidgetStacked>(TR_WIDGET_SEL_TOP_LEFT_2);
NWidgetStacked *left_sel = this->GetWidget<NWidgetStacked>(TR_WIDGET_SEL_TOP_LEFT);
NWidgetStacked *middle_sel = this->GetWidget<NWidgetStacked>(TR_WIDGET_SEL_TOP_MIDDLE);
NWidgetStacked *right_sel = this->GetWidget<NWidgetStacked>(TR_WIDGET_SEL_TOP_RIGHT);

Loading…
Cancel
Save