diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 3c7700e..5e9f867 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -225,8 +225,9 @@ * 158 21933 * 159 21962 * 160 21974 + * 161 */ -extern const uint16 SAVEGAME_VERSION = 160; ///< Current savegame version of OpenTTD. +extern const uint16 SAVEGAME_VERSION = 161; ///< Current savegame version of OpenTTD. SavegameType _savegame_type; ///< type of savegame we are loading 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..6fbc40e 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -903,6 +903,12 @@ str = STR_CONFIG_SETTING_SERVICEATHELIPAD [SDT_BOOL] base = GameSettings +var = order.add_auto +from = 161 +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; }