summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2011-02-04 14:11:14 +0000
committersmatz <smatz@openttd.org>2011-02-04 14:11:14 +0000
commit3057a26fd5e2cffe9afc6ed5034dcd2c61fb2c6e (patch)
tree48d267f1a760881a5ba0f98aee6dc8138b811d9e
parent732a0d069ad45cc65da7ba0deb2bc081662de146 (diff)
downloadopenttd-3057a26fd5e2cffe9afc6ed5034dcd2c61fb2c6e.tar.xz
(svn r21953) -Remove [FS#4456]: the non-uniform stations setting. Support for uniform stations has been broken for over a year
-rw-r--r--bin/ai/compat_0.7.nut2
-rw-r--r--bin/ai/compat_1.0.nut2
-rw-r--r--src/ai/api/ai_changelog.hpp1
-rw-r--r--src/ai/api/ai_rail.hpp3
-rw-r--r--src/ai/api/ai_rail.hpp.sq73
-rw-r--r--src/lang/english.txt2
-rw-r--r--src/newgrf.cpp2
-rw-r--r--src/settings_gui.cpp1
-rw-r--r--src/settings_type.h1
-rw-r--r--src/station_cmd.cpp62
-rw-r--r--src/table/settings.h2
-rw-r--r--src/water_cmd.cpp13
-rw-r--r--src/waypoint_cmd.cpp2
13 files changed, 55 insertions, 111 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut
index ea1c01db1..75669eaf6 100644
--- a/bin/ai/compat_0.7.nut
+++ b/bin/ai/compat_0.7.nut
@@ -319,3 +319,5 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
AIAbstractList <- AIList;
AIList.ChangeItem <- AIList.SetValue;
+
+AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;
diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut
index 9765a3b97..92eca47d8 100644
--- a/bin/ai/compat_1.0.nut
+++ b/bin/ai/compat_1.0.nut
@@ -70,3 +70,5 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
AIAbstractList <- AIList;
AIList.ChangeItem <- AIList.SetValue;
+
+AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;
diff --git a/src/ai/api/ai_changelog.hpp b/src/ai/api/ai_changelog.hpp
index 99d891425..cd35b5bfa 100644
--- a/src/ai/api/ai_changelog.hpp
+++ b/src/ai/api/ai_changelog.hpp
@@ -33,6 +33,7 @@
* \li HasNext for all lists.
* \li AIAbstractList, use AIList instead.
* \li AIList::ChangeItem, use AIList::SetValue instead.
+ * \li AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, that error is never returned anymore.
*
* Other changes:
* \li AIEngine::GetMaxTractiveEffort can be used for road vehicles.
diff --git a/src/ai/api/ai_rail.hpp b/src/ai/api/ai_rail.hpp
index 0ecdd374a..5f58c3014 100644
--- a/src/ai/api/ai_rail.hpp
+++ b/src/ai/api/ai_rail.hpp
@@ -35,9 +35,6 @@ public:
/** Track not suitable for signals */
ERR_UNSUITABLE_TRACK, // [STR_ERROR_NO_SUITABLE_RAILROAD_TRACK]
- /** Non-uniform stations is diabled */
- ERR_NONUNIFORM_STATIONS_DISABLED, // [STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED]
-
/** This railtype cannot have crossings */
ERR_RAILTYPE_DISALLOWS_CROSSING, // [STR_ERROR_CROSSING_DISALLOWED]
};
diff --git a/src/ai/api/ai_rail.hpp.sq b/src/ai/api/ai_rail.hpp.sq
index a21bfcfa5..7be4b7b75 100644
--- a/src/ai/api/ai_rail.hpp.sq
+++ b/src/ai/api/ai_rail.hpp.sq
@@ -38,46 +38,43 @@ void SQAIRail_Register(Squirrel *engine)
SQAIRail.PreRegister(engine);
SQAIRail.AddConstructor<void (AIRail::*)(), 1>(engine, "x");
- SQAIRail.DefSQConst(engine, AIRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
- SQAIRail.DefSQConst(engine, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
- SQAIRail.DefSQConst(engine, AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
- SQAIRail.DefSQConst(engine, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
- SQAIRail.DefSQConst(engine, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
- SQAIRail.DefSQConst(engine, AIRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
- SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
- SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
- SQAIRail.DefSQConst(engine, AIRail::BT_TRACK, "BT_TRACK");
- SQAIRail.DefSQConst(engine, AIRail::BT_SIGNAL, "BT_SIGNAL");
- SQAIRail.DefSQConst(engine, AIRail::BT_DEPOT, "BT_DEPOT");
- SQAIRail.DefSQConst(engine, AIRail::BT_STATION, "BT_STATION");
- SQAIRail.DefSQConst(engine, AIRail::BT_WAYPOINT, "BT_WAYPOINT");
+ SQAIRail.DefSQConst(engine, AIRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
+ SQAIRail.DefSQConst(engine, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
+ SQAIRail.DefSQConst(engine, AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
+ SQAIRail.DefSQConst(engine, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
+ SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
+ SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
+ SQAIRail.DefSQConst(engine, AIRail::BT_TRACK, "BT_TRACK");
+ SQAIRail.DefSQConst(engine, AIRail::BT_SIGNAL, "BT_SIGNAL");
+ SQAIRail.DefSQConst(engine, AIRail::BT_DEPOT, "BT_DEPOT");
+ SQAIRail.DefSQConst(engine, AIRail::BT_STATION, "BT_STATION");
+ SQAIRail.DefSQConst(engine, AIRail::BT_WAYPOINT, "BT_WAYPOINT");
- AIError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD);
- AIError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, AIRail::ERR_UNSUITABLE_TRACK);
- AIError::RegisterErrorMap(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED);
- AIError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
+ AIError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD);
+ AIError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, AIRail::ERR_UNSUITABLE_TRACK);
+ AIError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
- AIError::RegisterErrorMapString(AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
- AIError::RegisterErrorMapString(AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
- AIError::RegisterErrorMapString(AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
- AIError::RegisterErrorMapString(AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
+ AIError::RegisterErrorMapString(AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
+ AIError::RegisterErrorMapString(AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
+ AIError::RegisterErrorMapString(AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
SQAIRail.DefSQStaticMethod(engine, &AIRail::GetName, "GetName", 2, ".i");
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsRailTile, "IsRailTile", 2, ".i");
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 1ddf73d53..54952199a 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1136,7 +1136,6 @@ STR_CONFIG_SETTING_AUTOSCROLL :{LTBLUE}Pan win
STR_CONFIG_SETTING_BRIBE :{LTBLUE}Allow bribing of the local authority: {ORANGE}{STRING1}
STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :{LTBLUE}Allow buying exclusive transport rights: {ORANGE}{STRING1}
STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :{LTBLUE}Allow sending money to other companies: {ORANGE}{STRING1}
-STR_CONFIG_SETTING_NONUNIFORM_STATIONS :{LTBLUE}Nonuniform stations: {ORANGE}{STRING1}
STR_CONFIG_SETTING_FREIGHT_TRAINS :{LTBLUE}Weight multiplier for freight to simulate heavy trains: {ORANGE}{STRING}
STR_CONFIG_SETTING_PLANE_SPEED :{LTBLUE}Plane speed factor: {ORANGE}1 / {STRING1}
STR_CONFIG_SETTING_PLANE_CRASHES :{LTBLUE}Number of plane crashes: {ORANGE}{STRING1}
@@ -3548,7 +3547,6 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't bu
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing station/loading area
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station too spread out
-STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED :{WHITE}... nonuniform stations disabled
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many stations/loading areas
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 6f989e3a5..68ed5ca1b 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6965,7 +6965,7 @@ static void InitializeGRFSpecial()
| (1 << 0x0B) // newcargo
| (1 << 0x0C) // enhancemultiplayer
| (1 << 0x0D) // onewayroads
- | ((_settings_game.station.nonuniform_stations ? 1 : 0) << 0x0E) // irregularstations
+ | (1 << 0x0E) // irregularstations
| (1 << 0x0F) // statistics
| (1 << 0x10) // newsounds
| (1 << 0x11) // autoreplace
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index cb8e32fd9..6f1880d7f 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1356,7 +1356,6 @@ static SettingsPage _settings_stations_cargo_page = {_settings_stations_cargo, l
static SettingEntry _settings_stations[] = {
SettingEntry(&_settings_stations_cargo_page, STR_CONFIG_SETTING_STATIONS_CARGOHANDLING),
SettingEntry("station.join_stations"),
- SettingEntry("station.nonuniform_stations"),
SettingEntry("station.adjacent_stations"),
SettingEntry("station.distant_join_stations"),
SettingEntry("station.station_spread"),
diff --git a/src/settings_type.h b/src/settings_type.h
index e25a3f960..38cca46e8 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -388,7 +388,6 @@ struct EconomySettings {
struct StationSettings {
bool modified_catchment; ///< different-size catchment areas
bool join_stations; ///< allow joining of train stations
- bool nonuniform_stations; ///< allow nonuniform train 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 never_expire_airports; ///< never expire airports
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 9aae855cb..5997bb4d4 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -933,46 +933,13 @@ CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, Axis a
{
TileArea cur_ta = st->train_station;
- if (_settings_game.station.nonuniform_stations) {
- /* determine new size of train station region.. */
- int x = min(TileX(cur_ta.tile), TileX(new_ta.tile));
- int y = min(TileY(cur_ta.tile), TileY(new_ta.tile));
- new_ta.w = max(TileX(cur_ta.tile) + cur_ta.w, TileX(new_ta.tile) + new_ta.w) - x;
- new_ta.h = max(TileY(cur_ta.tile) + cur_ta.h, TileY(new_ta.tile) + new_ta.h) - y;
- new_ta.tile = TileXY(x, y);
- } else {
- /* do not allow modifying non-uniform stations,
- * the uniform-stations code wouldn't handle it well */
- TILE_AREA_LOOP(t, cur_ta) {
- if (!st->TileBelongsToRailStation(t)) { // there may be adjoined station
- return_cmd_error(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED);
- }
- }
+ /* determine new size of train station region.. */
+ int x = min(TileX(cur_ta.tile), TileX(new_ta.tile));
+ int y = min(TileY(cur_ta.tile), TileY(new_ta.tile));
+ new_ta.w = max(TileX(cur_ta.tile) + cur_ta.w, TileX(new_ta.tile) + new_ta.w) - x;
+ new_ta.h = max(TileY(cur_ta.tile) + cur_ta.h, TileY(new_ta.tile) + new_ta.h) - y;
+ new_ta.tile = TileXY(x, y);
- /* check so the orientation is the same */
- if (GetRailStationAxis(cur_ta.tile) != axis) {
- return_cmd_error(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED);
- }
-
- /* check if the new station adjoins the old station in either direction */
- if (cur_ta.w == new_ta.w && cur_ta.tile == new_ta.tile + TileDiffXY(0, new_ta.h)) {
- /* above */
- new_ta.h += cur_ta.h;
- } else if (cur_ta.w == new_ta.w && cur_ta.tile == new_ta.tile - TileDiffXY(0, cur_ta.h)) {
- /* below */
- new_ta.tile = cur_ta.tile;
- new_ta.h += new_ta.h;
- } else if (cur_ta.h == new_ta.h && cur_ta.tile == new_ta.tile + TileDiffXY(new_ta.w, 0)) {
- /* to the left */
- new_ta.w += cur_ta.w;
- } else if (cur_ta.h == new_ta.h && cur_ta.tile == new_ta.tile - TileDiffXY(cur_ta.w, 0)) {
- /* to the right */
- new_ta.tile = cur_ta.tile;
- new_ta.w += cur_ta.w;
- } else {
- return_cmd_error(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED);
- }
- }
/* make sure the final size is not too big. */
if (new_ta.w > _settings_game.station.station_spread || new_ta.h > _settings_game.station.station_spread) {
return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
@@ -1165,7 +1132,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
StationID est = INVALID_STATION;
SmallVector<Train *, 4> affected_vehicles;
/* Clear the land below the station. */
- CommandCost cost = CheckFlatLandRailStation(TileArea(tile_org, w_org, h_org), flags, 5 << axis, _settings_game.station.nonuniform_stations ? &est : NULL, rt, affected_vehicles);
+ CommandCost cost = CheckFlatLandRailStation(TileArea(tile_org, w_org, h_org), flags, 5 << axis, &est, rt, affected_vehicles);
if (cost.Failed()) return cost;
/* Add construction expenses. */
cost.AddCost((numtracks * _price[PR_BUILD_STATION_RAIL] + _price[PR_BUILD_STATION_RAIL_LENGTH]) * plat_len);
@@ -1408,11 +1375,6 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
if (ret.Failed()) continue;
}
- /* Do not allow removing from stations if non-uniform stations are not enabled
- * The check must be here to give correct error message
- */
- if (!_settings_game.station.nonuniform_stations) return_cmd_error(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED);
-
/* If we reached here, the tile is valid so increase the quantity of tiles we will remove */
quantity++;
@@ -1572,7 +1534,7 @@ CommandCost RemoveRailStation(T *st, DoCommandFlag flags)
CommandCost cost(EXPENSES_CONSTRUCTION);
/* clear all areas of the station */
TILE_AREA_LOOP(tile, ta) {
- /* for nonuniform stations, only remove tiles that are actually train station tiles */
+ /* only remove tiles that are actually train station tiles */
if (!st->TileBelongsToRailStation(tile)) continue;
CommandCost ret = EnsureNoVehicleOnGround(tile);
@@ -1624,8 +1586,8 @@ CommandCost RemoveRailStation(T *st, DoCommandFlag flags)
*/
static CommandCost RemoveRailStation(TileIndex tile, DoCommandFlag flags)
{
- /* if there is flooding and non-uniform stations are enabled, remove platforms tile by tile */
- if (_current_company == OWNER_WATER && _settings_game.station.nonuniform_stations) {
+ /* if there is flooding, remove platforms tile by tile */
+ if (_current_company == OWNER_WATER) {
return DoCommand(tile, 0, 0, DC_EXEC, CMD_REMOVE_FROM_RAIL_STATION);
}
@@ -1645,8 +1607,8 @@ static CommandCost RemoveRailStation(TileIndex tile, DoCommandFlag flags)
*/
static CommandCost RemoveRailWaypoint(TileIndex tile, DoCommandFlag flags)
{
- /* if there is flooding and non-uniform stations are enabled, remove waypoints tile by tile */
- if (_current_company == OWNER_WATER && _settings_game.station.nonuniform_stations) {
+ /* if there is flooding, remove waypoints tile by tile */
+ if (_current_company == OWNER_WATER) {
return DoCommand(tile, 0, 0, DC_EXEC, CMD_REMOVE_FROM_RAIL_WAYPOINT);
}
diff --git a/src/table/settings.h b/src/table/settings.h
index 344064852..8c5d98bba 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -429,7 +429,7 @@ const SettingDesc _settings[] = {
SDT_BOOL(GameSettings, order.improved_load, 0,NN, true, STR_CONFIG_SETTING_IMPROVEDLOAD, NULL),
SDT_BOOL(GameSettings, order.selectgoods, 0, 0, true, STR_CONFIG_SETTING_SELECTGOODS, NULL),
SDTC_CONDBOOL( gui.sg_new_nonstop, 22, 92, 0, 0, false, STR_NULL, NULL),
- SDT_BOOL(GameSettings, station.nonuniform_stations, 0,NN, true, STR_CONFIG_SETTING_NONUNIFORM_STATIONS, NULL),
+ SDT_CONDNULL( 1, 0, 158), // station.nonuniform_stations
SDT_VAR(GameSettings, station.station_spread, SLE_UINT8, 0, 0, 12, 4, 64, 0, STR_CONFIG_SETTING_STATION_SPREAD, InvalidateStationBuildWindow),
SDT_BOOL(GameSettings, order.serviceathelipad, 0, 0, true, STR_CONFIG_SETTING_SERVICEATHELIPAD, NULL),
SDT_BOOL(GameSettings, station.modified_catchment, 0, 0, true, STR_CONFIG_SETTING_CATCHMENT, StationCatchmentChanged),
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 9f803fc89..6a81e890b 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -902,19 +902,6 @@ static void FloodVehicles(TileIndex tile)
return;
}
- /* if non-uniform stations are disabled, flood some train in this train station (if there is any) */
- if (!_settings_game.station.nonuniform_stations && IsTileType(tile, MP_STATION) && GetStationType(tile) == STATION_RAIL) {
- const Station *st = Station::GetByTile(tile);
-
- TILE_AREA_LOOP(t, st->train_station) {
- if (st->TileBelongsToRailStation(t)) {
- FindVehicleOnPos(tile, &z, &FloodVehicleProc);
- }
- }
-
- return;
- }
-
if (!IsBridgeTile(tile)) {
FindVehicleOnPos(tile, &z, &FloodVehicleProc);
return;
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 3c065525e..b50d4c552 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -190,7 +190,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
TileIndexDiff offset = TileOffsByDiagDir(AxisToDiagDir(OtherAxis(axis)));
for (int i = 0; i < count; i++) {
TileIndex tile = start_tile + i * offset;
- CommandCost ret = IsValidTileForWaypoint(tile, axis, _settings_game.station.nonuniform_stations ? &est : NULL);
+ CommandCost ret = IsValidTileForWaypoint(tile, axis, &est);
if (ret.Failed()) return ret;
}