Add setting to increase station catchment radius.

Update acceptance and refresh screen when catchment settings change.
This commit is contained in:
Jonathan G Rennison
2016-11-20 01:49:10 +00:00
parent 10ae23d3b9
commit 37a58fd11d
18 changed files with 46 additions and 15 deletions

View File

@@ -208,7 +208,7 @@
{
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius < 0 || !ScriptCargo::IsValidCargo(cargo_type)) return -1;
CargoArray acceptance = ::GetAcceptanceAroundTiles(tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED);
CargoArray acceptance = ::GetAcceptanceAroundTiles(tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED + _settings_game.station.catchment_increase);
return acceptance[cargo_type];
}
@@ -216,7 +216,7 @@
{
if (!::IsValidTile(tile) || width <= 0 || height <= 0 || radius < 0 || !ScriptCargo::IsValidCargo(cargo_type)) return -1;
CargoArray produced = ::GetProductionAroundTiles(tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED);
CargoArray produced = ::GetProductionAroundTiles(tile, width, height, _settings_game.station.modified_catchment ? radius : (int)CA_UNMODIFIED + _settings_game.station.catchment_increase);
return produced[cargo_type];
}