Add company setting for remain at station if next order for same station

Set value on load for whether the save version had this enabled for trains
This commit is contained in:
Jonathan G Rennison
2023-04-06 01:14:02 +01:00
parent 1d05637d45
commit c9c0436e58
11 changed files with 29 additions and 4 deletions

View File

@@ -2197,7 +2197,8 @@ static bool AircraftEventHandler(Aircraft *v, int loop)
ProcessOrders(v);
if (v->current_order.IsType(OT_GOTO_STATION) && v->current_order.GetDestination() == station_id &&
v->targetairport == station_id && IsAirportTile(v->tile) && GetStationIndex(v->tile) == station_id) {
v->targetairport == station_id && IsAirportTile(v->tile) && GetStationIndex(v->tile) == station_id &&
Company::Get(v->owner)->settings.remain_if_next_order_same_station) {
AircraftEntersTerminal(v);
return true;
}