Allow per-house town cargo generation to be truncated to 0

This effectively applies the town cargo scaling setting more strictly
This commit is contained in:
Jonathan G Rennison
2021-11-30 23:11:25 +00:00
parent a8f879251b
commit 431d33f149
3 changed files with 13 additions and 8 deletions

View File

@@ -652,7 +652,9 @@ static void TownGenerateCargo (Town *t, CargoID ct, uint amount, StationFinder &
amount = (amount + 1) >> 1;
}
amount = ScaleQuantity(amount, _settings_game.economy.town_cargo_scale_factor);
amount = ScaleQuantity(amount, _settings_game.economy.town_cargo_scale_factor, true);
if (amount == 0) return;
// calculate for town stats