Timetable wait in depot: minor whitespace/style changes.
This commit is contained in:
@@ -1362,10 +1362,12 @@ static void AircraftEventHandler_InHangar(Aircraft *v, const AirportFTAClass *ap
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->current_order.IsWaitTimetabled())
|
if (v->current_order.IsWaitTimetabled()) {
|
||||||
v->HandleWaiting(false);
|
v->HandleWaiting(false);
|
||||||
if (v->current_order.IsType(OT_WAITING))
|
}
|
||||||
|
if (v->current_order.IsType(OT_WAITING)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* if we were sent to the depot, stay there */
|
/* if we were sent to the depot, stay there */
|
||||||
if (v->current_order.IsType(OT_GOTO_DEPOT) && (v->vehstatus & VS_STOPPED)) {
|
if (v->current_order.IsType(OT_GOTO_DEPOT) && (v->vehstatus & VS_STOPPED)) {
|
||||||
|
@@ -316,10 +316,12 @@ static bool CheckShipLeaveDepot(Ship *v)
|
|||||||
{
|
{
|
||||||
if (!v->IsChainInDepot()) return false;
|
if (!v->IsChainInDepot()) return false;
|
||||||
|
|
||||||
if (v->current_order.IsWaitTimetabled())
|
if (v->current_order.IsWaitTimetabled()) {
|
||||||
v->HandleWaiting(false);
|
v->HandleWaiting(false);
|
||||||
if (v->current_order.IsType(OT_WAITING))
|
}
|
||||||
|
if (v->current_order.IsType(OT_WAITING)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* We are leaving a depot, but have to go to the exact same one; re-enter */
|
/* We are leaving a depot, but have to go to the exact same one; re-enter */
|
||||||
if (v->current_order.IsType(OT_GOTO_DEPOT) &&
|
if (v->current_order.IsType(OT_GOTO_DEPOT) &&
|
||||||
|
@@ -310,7 +310,9 @@ struct TimetableWindow : Window {
|
|||||||
if (selected % 2 == 1) {
|
if (selected % 2 == 1) {
|
||||||
disable = order != NULL && (order->IsType(OT_CONDITIONAL) || order->IsType(OT_IMPLICIT));
|
disable = order != NULL && (order->IsType(OT_CONDITIONAL) || order->IsType(OT_IMPLICIT));
|
||||||
} else {
|
} else {
|
||||||
disable = order == NULL || ((!(order->IsType(OT_GOTO_STATION) || (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_HALT))) || (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION)) && !order->IsType(OT_CONDITIONAL));
|
disable = (order == NULL) ||
|
||||||
|
((!(order->IsType(OT_GOTO_STATION) || (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_HALT))) ||
|
||||||
|
(order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION)) && !order->IsType(OT_CONDITIONAL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool disable_speed = disable || selected % 2 != 1 || v->type == VEH_AIRCRAFT;
|
bool disable_speed = disable || selected % 2 != 1 || v->type == VEH_AIRCRAFT;
|
||||||
|
@@ -2131,10 +2131,12 @@ static bool CheckTrainStayInDepot(Train *v)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->current_order.IsWaitTimetabled())
|
if (v->current_order.IsWaitTimetabled()) {
|
||||||
v->HandleWaiting(false);
|
v->HandleWaiting(false);
|
||||||
if (v->current_order.IsType(OT_WAITING))
|
}
|
||||||
|
if (v->current_order.IsType(OT_WAITING)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
SigSegState seg_state;
|
SigSegState seg_state;
|
||||||
|
|
||||||
|
@@ -2199,7 +2199,8 @@ void Vehicle::HandleWaiting(bool stop_waiting)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default: return;
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user