diff options
author | rubidium <rubidium@openttd.org> | 2008-04-07 08:59:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-07 08:59:04 +0000 |
commit | c57a1d74c3e083a24505fad78ce216500adf82ee (patch) | |
tree | e49996b3a01b39c141422d537b97922f7c2956ee /src/timetable_gui.cpp | |
parent | 6af1fb2bdd32898d9456174d99413adf3e466797 (diff) | |
download | openttd-c57a1d74c3e083a24505fad78ce216500adf82ee.tar.xz |
(svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 494ed91b3..dd78c2e0f 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -79,7 +79,7 @@ static void DrawTimetableWindow(Window *w) w->EnableWidget(TTV_CLEAR_TIME); } else { const Order *order = GetVehicleOrder(v, (selected + 1) / 2); - bool disable = order == NULL || !order->IsType(OT_GOTO_STATION) || (_patches.new_nonstop && (order->GetNonStopType() & OFB_NON_STOP)); + bool disable = order == NULL || !order->IsType(OT_GOTO_STATION) || (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION); w->SetWidgetDisabledState(TTV_CHANGE_TIME, disable); w->SetWidgetDisabledState(TTV_CLEAR_TIME, disable); @@ -119,7 +119,7 @@ static void DrawTimetableWindow(Window *w) break; case OT_GOTO_STATION: - SetDParam(0, (order->GetNonStopType() & OFB_NON_STOP) ? STR_880A_GO_NON_STOP_TO : STR_8806_GO_TO); + SetDParam(0, (order->GetNonStopType() != ONSF_STOP_EVERYWHERE) ? STR_880A_GO_NON_STOP_TO : STR_8806_GO_TO); SetDParam(1, order->GetDestination()); if (order->wait_time > 0) { @@ -139,7 +139,7 @@ static void DrawTimetableWindow(Window *w) SetDParam(1, GetDepot(order->GetDestination())->town_index); switch (v->type) { - case VEH_TRAIN: string = (order->GetNonStopType() & OFB_NON_STOP) ? STR_880F_GO_NON_STOP_TO_TRAIN_DEPOT : STR_GO_TO_TRAIN_DEPOT; break; + case VEH_TRAIN: string = (order->GetNonStopType() != ONSF_STOP_EVERYWHERE) ? STR_880F_GO_NON_STOP_TO_TRAIN_DEPOT : STR_GO_TO_TRAIN_DEPOT; break; case VEH_ROAD: string = STR_GO_TO_ROADVEH_DEPOT; break; case VEH_SHIP: string = STR_GO_TO_SHIP_DEPOT; break; default: break; @@ -152,7 +152,7 @@ static void DrawTimetableWindow(Window *w) } break; case OT_GOTO_WAYPOINT: - SetDParam(0, (order->GetNonStopType() & OFB_NON_STOP) ? STR_GO_NON_STOP_TO_WAYPOINT : STR_GO_TO_WAYPOINT); + SetDParam(0, (order->GetNonStopType() != ONSF_STOP_EVERYWHERE) ? STR_GO_NON_STOP_TO_WAYPOINT : STR_GO_TO_WAYPOINT); SetDParam(1, order->GetDestination()); break; @@ -197,7 +197,7 @@ static void DrawTimetableWindow(Window *w) for (const Order *order = GetVehicleOrder(v, 0); order != NULL; order = order->next) { total_time += order->travel_time + order->wait_time; if (order->travel_time == 0) complete = false; - if (order->wait_time == 0 && order->IsType(OT_GOTO_STATION) && !(_patches.new_nonstop && (order->GetNonStopType() & OFB_NON_STOP))) complete = false; + if (order->wait_time == 0 && order->IsType(OT_GOTO_STATION) && !(order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION)) complete = false; } if (total_time != 0) { |