diff --git a/src/settings_type.h b/src/settings_type.h index 3b8b324..7ecbfec 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -356,6 +356,7 @@ struct OrderSettings { bool selectgoods; ///< only send the goods to station if a train has been there bool no_servicing_if_no_breakdowns; ///< dont send vehicles to depot when breakdowns are disabled bool serviceathelipad; ///< service helicopters at helipads automatically (no need to send to depot) + bool add_auto; ///< add automatic orders for non-scheduled stops }; /** Settings related to vehicles. */ diff --git a/src/table/settings.ini b/src/table/settings.ini index 36db523..8501669 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -903,6 +903,11 @@ str = STR_CONFIG_SETTING_SERVICEATHELIPAD [SDT_BOOL] base = GameSettings +var = order.add_auto +def = true + +[SDT_BOOL] +base = GameSettings var = station.modified_catchment def = true str = STR_CONFIG_SETTING_CATCHMENT diff --git a/src/vehicle.cpp b/src/vehicle.cpp index e3ffbbc..5cc12e4 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1847,7 +1847,8 @@ void Vehicle::BeginLoading() * to show that we are stopping here, but only do that if the order * list isn't empty. */ Order *in_list = this->GetOrder(this->cur_auto_order_index); - if (in_list != NULL && this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID && + if (_settings_game.order.add_auto && in_list != NULL && + this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID && (!in_list->IsType(OT_AUTOMATIC) || in_list->GetDestination() != this->last_station_visited) && Order::CanAllocateItem()) { @@ -1917,8 +1918,10 @@ void Vehicle::HandleLoading(bool mode) this->PlayLeaveStationSound(); + bool at_destination_station = this->current_order.GetNonStopType() != ONSF_STOP_EVERYWHERE; this->LeaveStation(); + if (!_settings_game.order.add_auto && !at_destination_station) return; break; }