diff options
author | rubidium <rubidium@openttd.org> | 2008-04-12 13:07:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-12 13:07:25 +0000 |
commit | ed250cc7b581595ed57a518ce6dfd4b00551a022 (patch) | |
tree | cb10294f4483a7fa3996d88041453988e023385f /src/timetable_gui.cpp | |
parent | 8c89250f58116309341c04ff4fc5d31887e8b180 (diff) | |
download | openttd-ed250cc7b581595ed57a518ce6dfd4b00551a022.tar.xz |
(svn r12670) -Add: unconditional/always order 'jump/skip' variable.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index d77691552..75ed54a65 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -179,18 +179,22 @@ static void DrawTimetableWindow(Window *w) break; - case OT_CONDITIONAL: { - extern uint ConvertSpeedToDisplaySpeed(uint speed); - OrderConditionComparator occ = order->GetConditionComparator(); - SetDParam(0, (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) ? STR_CONDITIONAL_TRUE_FALSE : STR_CONDITIONAL_NUM); + case OT_CONDITIONAL: SetDParam(1, order->GetConditionSkipToOrder() + 1); - SetDParam(2, STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + order->GetConditionVariable()); - SetDParam(3, STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS + occ); - - uint value = order->GetConditionValue(); - if (order->GetConditionVariable() == OCV_MAX_SPEED) value = ConvertSpeedToDisplaySpeed(value); - SetDParam(4, value); - } break; + if (order->GetConditionVariable() == OCV_UNCONDITIONALLY) { + SetDParam(0, STR_CONDITIONAL_UNCONDITIONAL); + } else { + extern uint ConvertSpeedToDisplaySpeed(uint speed); + OrderConditionComparator occ = order->GetConditionComparator(); + SetDParam(0, (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) ? STR_CONDITIONAL_TRUE_FALSE : STR_CONDITIONAL_NUM); + SetDParam(2, STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + order->GetConditionVariable()); + SetDParam(3, STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS + occ); + + uint value = order->GetConditionValue(); + if (order->GetConditionVariable() == OCV_MAX_SPEED) value = ConvertSpeedToDisplaySpeed(value); + SetDParam(4, value); + } + break; default: break; } |