Index: src/rail_gui.cpp =================================================================== --- src/rail_gui.cpp (revision 24942) +++ src/rail_gui.cpp (working copy) @@ -987,7 +987,7 @@ } } - int rad = (_settings_game.station.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED; + int rad = (_settings_game.station.modified_catchment) ? _settings_game.station.catchment_radius_train : CA_UNMODIFIED; if (_settings_client.gui.station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); Index: src/airport_gui.cpp =================================================================== --- src/airport_gui.cpp (revision 24942) +++ src/airport_gui.cpp (working copy) @@ -376,7 +376,21 @@ if (_selected_airport_index != -1) { const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index); - int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED; + int rad = (uint)CA_UNMODIFIED; + if (_settings_game.station.modified_catchment) { + switch(as->name) { + case STR_AIRPORT_SMALL: rad = _settings_game.station.catchment_radius_airport_country; break; + case STR_AIRPORT_COMMUTER: rad = _settings_game.station.catchment_radius_airport_commuter; break; + case STR_AIRPORT_CITY: rad = _settings_game.station.catchment_radius_airport_city; break; + case STR_AIRPORT_METRO: rad = _settings_game.station.catchment_radius_airport_metropolitan; break; + case STR_AIRPORT_INTERNATIONAL: rad = _settings_game.station.catchment_radius_airport_international; break; + case STR_AIRPORT_INTERCONTINENTAL: rad = _settings_game.station.catchment_radius_airport_intercontinental; break; + case STR_AIRPORT_HELIPORT: rad = _settings_game.station.catchment_radius_airport_heliport; break; + case STR_AIRPORT_HELIDEPOT: rad = _settings_game.station.catchment_radius_airport_helidepot; break; + case STR_AIRPORT_HELISTATION: rad = _settings_game.station.catchment_radius_airport_helistation; break; + default: rad = as->catchment; break; + } + } /* only show the station (airport) noise, if the noise option is activated */ if (_settings_game.economy.station_noise_level) { @@ -425,7 +439,22 @@ this->SetWidgetDisabledState(WID_AP_LAYOUT_DECREASE, _selected_airport_layout == 0); this->SetWidgetDisabledState(WID_AP_LAYOUT_INCREASE, _selected_airport_layout + 1 >= as->num_table); - int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED; + int rad = (uint)CA_UNMODIFIED; + if (_settings_game.station.modified_catchment) { + switch(as->name) { + case STR_AIRPORT_SMALL: rad = _settings_game.station.catchment_radius_airport_country; break; + case STR_AIRPORT_COMMUTER: rad = _settings_game.station.catchment_radius_airport_commuter; break; + case STR_AIRPORT_CITY: rad = _settings_game.station.catchment_radius_airport_city; break; + case STR_AIRPORT_METRO: rad = _settings_game.station.catchment_radius_airport_metropolitan; break; + case STR_AIRPORT_INTERNATIONAL: rad = _settings_game.station.catchment_radius_airport_international; break; + case STR_AIRPORT_INTERCONTINENTAL: rad = _settings_game.station.catchment_radius_airport_intercontinental; break; + case STR_AIRPORT_HELIPORT: rad = _settings_game.station.catchment_radius_airport_heliport; break; + case STR_AIRPORT_HELIDEPOT: rad = _settings_game.station.catchment_radius_airport_helidepot; break; + case STR_AIRPORT_HELISTATION: rad = _settings_game.station.catchment_radius_airport_helistation; break; + default: rad = as->catchment; break; + } + } + if (_settings_client.gui.station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); } } Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (revision 24942) +++ src/lang/english.txt (working copy) @@ -1270,6 +1270,25 @@ STR_CONFIG_SETTING_STATION_SPREAD :Max station spread: {STRING2} STR_CONFIG_SETTING_STATION_SPREAD_HELPTEXT :Maximum area the parts of a single station may be spread out on. Note that high values will slow the game + +STR_CONFIG_SETTING_CATCHMENT_RADIUS_BUS :Bus station catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_TRUCK :Truck station catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_TRAIN :Train station catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_DOCK :Dock catchment radius: {STRING2} + +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_COUNTRY :Small airport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_COMMUTER :Commuter airport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_CITY :City airport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_METROPOLITAN :Metropolitan airport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_INTERNATIONAL :International airport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_INTERCONTINENTAL :Intercontinental airport catchment radius: {STRING2} + +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_HELIPORT :Heliport catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_HELIDEPOT :Helidepot catchment radius: {STRING2} +STR_CONFIG_SETTING_CATCHMENT_RADIUS_AIRPORT_HELISTATION :Helistation catchment radius: {STRING2} + +STR_CONFIG_SETTING_CATCHMENT_RADIUS_HELPTEXT :How many tiles around the station to deliver/pickup cargo + STR_CONFIG_SETTING_SERVICEATHELIPAD :Service helicopters at helipads automatically: {STRING2} STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT :Service helicopters after every landing, even if there is no depot at the airport STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Link landscape toolbar to rail/road/water/airport toolbars: {STRING2} @@ -1562,6 +1581,7 @@ STR_CONFIG_SETTING_NEWS :{ORANGE}News and messages STR_CONFIG_SETTING_CONSTRUCTION_SIGNALS :{ORANGE}Signals STR_CONFIG_SETTING_STATIONS_CARGOHANDLING :{ORANGE}Cargo handling +STR_CONFIG_SETTING_STATIONS_CATCHMENT :{ORANGE}Catchment STR_CONFIG_SETTING_AI_NPC :{ORANGE}Computer players STR_CONFIG_SETTING_VEHICLES_AUTORENEW :{ORANGE}Autorenew STR_CONFIG_SETTING_VEHICLES_SERVICING :{ORANGE}Servicing Index: src/dock_gui.cpp =================================================================== --- src/dock_gui.cpp (revision 24942) +++ src/dock_gui.cpp (working copy) @@ -405,7 +405,7 @@ virtual void OnPaint() { - int rad = (_settings_game.station.modified_catchment) ? CA_DOCK : CA_UNMODIFIED; + int rad = (_settings_game.station.modified_catchment) ? _settings_game.station.catchment_radius_dock : CA_UNMODIFIED; this->DrawWidgets(); Index: src/station_type.h =================================================================== --- src/station_type.h (revision 24942) +++ src/station_type.h (working copy) @@ -75,13 +75,7 @@ /** The different catchment areas used */ enum CatchmentArea { CA_NONE = 0, ///< Catchment when the station has no facilities - CA_BUS = 3, ///< Catchment for bus stops with "modified catchment" enabled - CA_TRUCK = 3, ///< Catchment for truck stops with "modified catchment" enabled - CA_TRAIN = 4, ///< Catchment for train stations with "modified catchment" enabled - CA_DOCK = 5, ///< Catchment for docks with "modified catchment" enabled - CA_UNMODIFIED = 4, ///< Catchment for all stations with "modified catchment" disabled - MAX_CATCHMENT = 10, ///< Maximum catchment for airports with "modified catchment" enabled }; Index: src/road_gui.cpp =================================================================== --- src/road_gui.cpp (revision 24942) +++ src/road_gui.cpp (working copy) @@ -957,7 +957,7 @@ { this->DrawWidgets(); - int rad = _settings_game.station.modified_catchment ? CA_TRUCK /* = CA_BUS */ : CA_UNMODIFIED; + int rad = _settings_game.station.modified_catchment ? ((this->window_class == WC_BUS_STATION) ? _settings_game.station.catchment_radius_bus : _settings_game.station.catchment_radius_truck) : CA_UNMODIFIED; if (_settings_client.gui.station_show_coverage) { SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); } else { Index: src/station.cpp =================================================================== --- src/station.cpp (revision 24942) +++ src/station.cpp (working copy) @@ -246,11 +246,24 @@ uint ret = CA_NONE; if (_settings_game.station.modified_catchment) { - if (this->bus_stops != NULL) ret = max(ret, CA_BUS); - if (this->truck_stops != NULL) ret = max(ret, CA_TRUCK); - if (this->train_station.tile != INVALID_TILE) ret = max(ret, CA_TRAIN); - if (this->dock_tile != INVALID_TILE) ret = max(ret, CA_DOCK); - if (this->airport.tile != INVALID_TILE) ret = max(ret, this->airport.GetSpec()->catchment); + if (this->bus_stops != NULL) ret = max(ret, _settings_game.station.catchment_radius_bus); + if (this->truck_stops != NULL) ret = max(ret, _settings_game.station.catchment_radius_truck); + if (this->train_station.tile != INVALID_TILE) ret = max(ret, _settings_game.station.catchment_radius_train); + if (this->dock_tile != INVALID_TILE) ret = max(ret, _settings_game.station.catchment_radius_dock); + if (this->airport.tile != INVALID_TILE) { + switch(this->airport.GetSpec()->name) { + case STR_AIRPORT_SMALL: ret = max(ret, _settings_game.station.catchment_radius_airport_country); break; + case STR_AIRPORT_COMMUTER: ret = max(ret, _settings_game.station.catchment_radius_airport_commuter); break; + case STR_AIRPORT_CITY: ret = max(ret, _settings_game.station.catchment_radius_airport_city); break; + case STR_AIRPORT_METRO: ret = max(ret, _settings_game.station.catchment_radius_airport_metropolitan); break; + case STR_AIRPORT_INTERNATIONAL: ret = max(ret, _settings_game.station.catchment_radius_airport_international); break; + case STR_AIRPORT_INTERCONTINENTAL: ret = max(ret, _settings_game.station.catchment_radius_airport_intercontinental); break; + case STR_AIRPORT_HELIPORT: ret = max(ret, _settings_game.station.catchment_radius_airport_heliport); break; + case STR_AIRPORT_HELIDEPOT: ret = max(ret, _settings_game.station.catchment_radius_airport_helidepot); break; + case STR_AIRPORT_HELISTATION: ret = max(ret, _settings_game.station.catchment_radius_airport_helistation); break; + default: ret = max(ret, this->airport.GetSpec()->catchment); break; + } + } } else { if (this->bus_stops != NULL || this->truck_stops != NULL || this->train_station.tile != INVALID_TILE || this->dock_tile != INVALID_TILE || this->airport.tile != INVALID_TILE) { ret = CA_UNMODIFIED; Index: src/settings_type.h =================================================================== --- src/settings_type.h (revision 24942) +++ src/settings_type.h (working copy) @@ -479,11 +479,27 @@ /** Settings related to stations. */ struct StationSettings { - bool modified_catchment; ///< different-size catchment areas bool adjacent_stations; ///< allow stations to be built directly adjacent to other stations bool distant_join_stations; ///< allow to join non-adjacent stations bool never_expire_airports; ///< never expire airports byte station_spread; ///< amount a station may spread + + bool modified_catchment; ///< different-size catchment areas + byte catchment_radius_bus; ///< catchment radius for a bus station + byte catchment_radius_truck; ///< catchment radius for a truck station + byte catchment_radius_train; ///< catchment radius for a train station + byte catchment_radius_dock; ///< catchment radius for a dock + + byte catchment_radius_airport_country; ///< catchment radius for a + byte catchment_radius_airport_commuter; ///< catchment radius for a + byte catchment_radius_airport_city; ///< catchment radius for a + byte catchment_radius_airport_metropolitan; ///< catchment radius for a + byte catchment_radius_airport_international; ///< catchment radius for a + byte catchment_radius_airport_intercontinental; ///< catchment radius for a + + byte catchment_radius_airport_heliport; ///< catchment radius for a + byte catchment_radius_airport_helidepot; ///< catchment radius for a + byte catchment_radius_airport_helistation; ///< catchment radius for a }; /** Default settings for vehicles. */ Index: src/settings_gui.cpp =================================================================== --- src/settings_gui.cpp (revision 24942) +++ src/settings_gui.cpp (working copy) @@ -1549,13 +1549,32 @@ /** Cargo handling sub-page */ static SettingsPage _settings_stations_cargo_page = {_settings_stations_cargo, lengthof(_settings_stations_cargo)}; +static SettingEntry _settings_stations_catchment[] = { + SettingEntry("station.modified_catchment"), + SettingEntry("station.catchment_radius_bus"), + SettingEntry("station.catchment_radius_truck"), + SettingEntry("station.catchment_radius_train"), + SettingEntry("station.catchment_radius_dock"), + SettingEntry("station.catchment_radius_airport_country"), + SettingEntry("station.catchment_radius_airport_commuter"), + SettingEntry("station.catchment_radius_airport_city"), + SettingEntry("station.catchment_radius_airport_metropolitan"), + SettingEntry("station.catchment_radius_airport_international"), + SettingEntry("station.catchment_radius_airport_intercontinental"), + SettingEntry("station.catchment_radius_airport_heliport"), + SettingEntry("station.catchment_radius_airport_helidepot"), + SettingEntry("station.catchment_radius_airport_helistation"), +}; +/** Catchment sub-page */ +static SettingsPage _settings_stations_catchment_page = {_settings_stations_catchment, lengthof(_settings_stations_catchment)}; + static SettingEntry _settings_stations[] = { SettingEntry(&_settings_stations_cargo_page, STR_CONFIG_SETTING_STATIONS_CARGOHANDLING), + SettingEntry(&_settings_stations_catchment_page, STR_CONFIG_SETTING_STATIONS_CATCHMENT), SettingEntry("station.adjacent_stations"), SettingEntry("station.distant_join_stations"), SettingEntry("station.station_spread"), SettingEntry("economy.station_noise_level"), - SettingEntry("station.modified_catchment"), SettingEntry("construction.road_stop_on_town_road"), SettingEntry("construction.road_stop_on_competitor_road"), }; Index: src/script/api/script_airport.cpp =================================================================== --- src/script/api/script_airport.cpp (revision 24942) +++ src/script/api/script_airport.cpp (working copy) @@ -64,8 +64,19 @@ /* static */ int32 ScriptAirport::GetAirportCoverageRadius(AirportType type) { if (!IsAirportInformationAvailable(type)) return -1; - - return _settings_game.station.modified_catchment ? ::AirportSpec::Get(type)->catchment : (uint)CA_UNMODIFIED; + if (!_settings_game.station.modified_catchment) return (uint)CA_UNMODIFIED; + switch(type) { + case AT_SMALL: return _settings_game.station.catchment_radius_airport_country; + case AT_COMMUTER: return _settings_game.station.catchment_radius_airport_commuter; + case AT_LARGE: return _settings_game.station.catchment_radius_airport_city; + case AT_METROPOLITAN: return _settings_game.station.catchment_radius_airport_metropolitan; + case AT_INTERNATIONAL: return _settings_game.station.catchment_radius_airport_international; + case AT_INTERCON: return _settings_game.station.catchment_radius_airport_intercontinental; + case AT_HELIPORT: return _settings_game.station.catchment_radius_airport_heliport; + case AT_HELIDEPOT: return _settings_game.station.catchment_radius_airport_helidepot; + case AT_HELISTATION: return _settings_game.station.catchment_radius_airport_helistation; + default: return AirportSpec::Get(type)->catchment; + } } /* static */ bool ScriptAirport::BuildAirport(TileIndex tile, AirportType type, StationID station_id) Index: src/script/api/script_station.cpp =================================================================== --- src/script/api/script_station.cpp (revision 24942) +++ src/script/api/script_station.cpp (working copy) @@ -60,10 +60,10 @@ if (!_settings_game.station.modified_catchment) return CA_UNMODIFIED; switch (station_type) { - case STATION_TRAIN: return CA_TRAIN; - case STATION_TRUCK_STOP: return CA_TRUCK; - case STATION_BUS_STOP: return CA_BUS; - case STATION_DOCK: return CA_DOCK; + case STATION_TRAIN: return _settings_game.station.catchment_radius_train; + case STATION_TRUCK_STOP: return _settings_game.station.catchment_radius_truck; + case STATION_BUS_STOP: return _settings_game.station.catchment_radius_bus; + case STATION_DOCK: return _settings_game.station.catchment_radius_dock; default: return CA_NONE; } }