Add setting to increase station catchment radius.
Update acceptance and refresh screen when catchment settings change.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user