|
|
|
@ -33,8 +33,6 @@
|
|
|
|
|
|
|
|
|
|
#include "safeguards.h"
|
|
|
|
|
|
|
|
|
|
VehicleOrderID GetVehicleFirstWaitingLocation(const Vehicle *v);
|
|
|
|
|
|
|
|
|
|
/** Container for the arrival/departure dates of a vehicle */
|
|
|
|
|
struct TimetableArrivalDeparture {
|
|
|
|
|
Ticks arrival; ///< The arrival time
|
|
|
|
@ -114,7 +112,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VehicleOrderID scheduled_dispatch_order = INVALID_VEH_ORDER_ID;
|
|
|
|
|
if (HasBit(v->vehicle_flags, VF_SCHEDULED_DISPATCH)) scheduled_dispatch_order = GetVehicleFirstWaitingLocation(v);
|
|
|
|
|
if (HasBit(v->vehicle_flags, VF_SCHEDULED_DISPATCH)) scheduled_dispatch_order = v->GetFirstWaitingLocation(true);
|
|
|
|
|
|
|
|
|
|
/* Cyclically loop over all orders until we reach the current one again.
|
|
|
|
|
* As we may start at the current order, do a post-checking loop */
|
|
|
|
@ -685,6 +683,14 @@ struct TimetableWindow : Window {
|
|
|
|
|
if (have_bad_full_load) draw_info(STR_TIMETABLE_WARNING_FULL_LOAD, true);
|
|
|
|
|
if (have_conditional && HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) draw_info(STR_TIMETABLE_WARNING_AUTOFILL_CONDITIONAL, true);
|
|
|
|
|
if (total_time && have_non_timetabled_conditional_branch) draw_info(STR_TIMETABLE_NON_TIMETABLED_BRANCH, false);
|
|
|
|
|
if (HasBit(v->vehicle_flags, VF_SCHEDULED_DISPATCH)) {
|
|
|
|
|
VehicleOrderID n = v->GetFirstWaitingLocation(false);
|
|
|
|
|
if (n == INVALID_VEH_ORDER_ID) {
|
|
|
|
|
draw_info(STR_TIMETABLE_WARNING_NO_SCHEDULED_DISPATCH_ORDER, true);
|
|
|
|
|
} else if (!v->GetOrder(n)->IsWaitTimetabled()) {
|
|
|
|
|
draw_info(STR_TIMETABLE_WARNING_SCHEDULED_DISPATCH_ORDER_NO_WAIT_TIME, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (warning_count != this->summary_warnings) {
|
|
|
|
|
TimetableWindow *mutable_this = const_cast<TimetableWindow *>(this);
|
|
|
|
|