Timetable GUI: Add warnings for conditional order timetabling.
This commit is contained in:
@@ -569,12 +569,14 @@ struct TimetableWindow : Window {
|
||||
bool have_missing_wait = false;
|
||||
bool have_missing_travel = false;
|
||||
bool have_bad_full_load = false;
|
||||
bool have_non_timetabled_conditional_branch = false;
|
||||
|
||||
const bool assume_timetabled = HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE) || HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE);
|
||||
for (int n = 0; n < v->GetNumOrders(); n++) {
|
||||
const Order *order = v->GetOrder(n);
|
||||
if (order->IsType(OT_CONDITIONAL)) {
|
||||
have_conditional = true;
|
||||
if (!order->IsWaitTimetabled()) have_non_timetabled_conditional_branch = true;
|
||||
} else {
|
||||
if (order->GetWaitTime() == 0 && order->IsType(OT_GOTO_STATION)) {
|
||||
have_missing_wait = true;
|
||||
@@ -636,6 +638,8 @@ 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 (warning_count != this->summary_warnings) {
|
||||
TimetableWindow *mutable_this = const_cast<TimetableWindow *>(this);
|
||||
|
Reference in New Issue
Block a user