mirror of https://github.com/OpenTTD/OpenTTD
Remove: Hidden setting for adjacent stations (#12862)
parent
5d7a7b2955
commit
c3bb512bd9
|
@ -129,7 +129,7 @@ const SaveLoadCompat _settings_sl_compat[] = {
|
||||||
SLC_VAR("order.gradual_loading"),
|
SLC_VAR("order.gradual_loading"),
|
||||||
SLC_VAR("construction.road_stop_on_town_road"),
|
SLC_VAR("construction.road_stop_on_town_road"),
|
||||||
SLC_VAR("construction.road_stop_on_competitor_road"),
|
SLC_VAR("construction.road_stop_on_competitor_road"),
|
||||||
SLC_VAR("station.adjacent_stations"),
|
SLC_NULL(1, SLV_62, SLV_TABLE_CHUNKS),
|
||||||
SLC_VAR("economy.station_noise_level"),
|
SLC_VAR("economy.station_noise_level"),
|
||||||
SLC_VAR("station.distant_join_stations"),
|
SLC_VAR("station.distant_join_stations"),
|
||||||
SLC_VAR("economy.inflation"),
|
SLC_VAR("economy.inflation"),
|
||||||
|
|
|
@ -564,7 +564,6 @@ struct LinkGraphSettings {
|
||||||
struct StationSettings {
|
struct StationSettings {
|
||||||
bool modified_catchment; ///< different-size catchment areas
|
bool modified_catchment; ///< different-size catchment areas
|
||||||
bool serve_neutral_industries; ///< company stations can serve industries with attached neutral stations
|
bool serve_neutral_industries; ///< company stations can serve industries with attached neutral stations
|
||||||
bool adjacent_stations; ///< allow stations to be built directly adjacent to other stations
|
|
||||||
bool distant_join_stations; ///< allow to join non-adjacent stations
|
bool distant_join_stations; ///< allow to join non-adjacent stations
|
||||||
bool never_expire_airports; ///< never expire airports
|
bool never_expire_airports; ///< never expire airports
|
||||||
uint8_t station_spread; ///< amount a station may spread
|
uint8_t station_spread; ///< amount a station may spread
|
||||||
|
|
|
@ -1167,24 +1167,22 @@ CommandCost FindJoiningBaseStation(StationID existing_station, StationID station
|
||||||
assert(*st == nullptr);
|
assert(*st == nullptr);
|
||||||
bool check_surrounding = true;
|
bool check_surrounding = true;
|
||||||
|
|
||||||
if (_settings_game.station.adjacent_stations) {
|
if (existing_station != INVALID_STATION) {
|
||||||
if (existing_station != INVALID_STATION) {
|
if (adjacent && existing_station != station_to_join) {
|
||||||
if (adjacent && existing_station != station_to_join) {
|
/* You can't build an adjacent station over the top of one that
|
||||||
/* You can't build an adjacent station over the top of one that
|
* already exists. */
|
||||||
* already exists. */
|
return_cmd_error(error_message);
|
||||||
return_cmd_error(error_message);
|
|
||||||
} else {
|
|
||||||
/* Extend the current station, and don't check whether it will
|
|
||||||
* be near any other stations. */
|
|
||||||
T *candidate = T::GetIfValid(existing_station);
|
|
||||||
if (candidate != nullptr && filter(candidate)) *st = candidate;
|
|
||||||
check_surrounding = (*st == nullptr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* There's no station here. Don't check the tiles surrounding this
|
/* Extend the current station, and don't check whether it will
|
||||||
* one if the company wanted to build an adjacent station. */
|
* be near any other stations. */
|
||||||
if (adjacent) check_surrounding = false;
|
T *candidate = T::GetIfValid(existing_station);
|
||||||
|
if (candidate != nullptr && filter(candidate)) *st = candidate;
|
||||||
|
check_surrounding = (*st == nullptr);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* There's no station here. Don't check the tiles surrounding this
|
||||||
|
* one if the company wanted to build an adjacent station. */
|
||||||
|
if (adjacent) check_surrounding = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_surrounding) {
|
if (check_surrounding) {
|
||||||
|
|
|
@ -2455,11 +2455,7 @@ static bool StationJoinerNeeded(TileArea ta, const StationPickerCmdProc &proc)
|
||||||
/* Now check if we could build there */
|
/* Now check if we could build there */
|
||||||
if (!proc(true, INVALID_STATION)) return false;
|
if (!proc(true, INVALID_STATION)) return false;
|
||||||
|
|
||||||
/* Test for adjacent station or station below selection.
|
return FindStationsNearby<T>(ta, false) == nullptr;
|
||||||
* If adjacent-stations is disabled and we are building next to a station, do not show the selection window.
|
|
||||||
* but join the other station immediately. */
|
|
||||||
const BaseStation *st = FindStationsNearby<T>(ta, false);
|
|
||||||
return st == nullptr && (_settings_game.station.adjacent_stations || std::any_of(std::begin(_stations_nearby_list), std::end(_stations_nearby_list), [](StationID s) { return s != NEW_STATION; }));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,12 +131,6 @@ str = STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES
|
||||||
strhelp = STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT
|
strhelp = STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT
|
||||||
post_cb = StationCatchmentChanged
|
post_cb = StationCatchmentChanged
|
||||||
|
|
||||||
[SDT_BOOL]
|
|
||||||
var = station.adjacent_stations
|
|
||||||
from = SLV_62
|
|
||||||
def = true
|
|
||||||
cat = SC_EXPERT
|
|
||||||
|
|
||||||
[SDT_BOOL]
|
[SDT_BOOL]
|
||||||
var = station.distant_join_stations
|
var = station.distant_join_stations
|
||||||
from = SLV_106
|
from = SLV_106
|
||||||
|
|
Loading…
Reference in New Issue