Skip to content

Commit

Permalink
Avoids building the same tile improvement twice when making an AI col…
Browse files Browse the repository at this point in the history
…ony plan.
  • Loading branch information
stiangre committed Jul 25, 2024
1 parent 2ba9834 commit d9c5025
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public MaximumPotentialProduction getMaximumPotentialProduction(GoodsType goodsT
.collect(Collectors.toList());

for (TileImprovementType tit : getNormalImprovements(spec, originalTileType)) {
if (!tile.isImprovementTypeAllowed(tit)) {
continue;
}
final ProductionInfo newResult = getBasicProductionInfo(tile, turn, new WorkerAssignment(unitType, originalProductionType), colonyCenterTile, List.of(tit));
final int amount = productionOfGoodsType(goodsType, newResult);
if (amount > currentMaximumPotentialProduction) {
Expand Down

0 comments on commit d9c5025

Please sign in to comment.