From f2c1c6887b85cebd2a10444d4a9a247bbd651f1f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 20:20:03 +0200 Subject: [PATCH] fix: don't count Australia's uranium mines in the resources pass warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit canPowerAllPlants() summed the fuel cost of every plant in hand, including Australia's uranium plants (11/23/28/34/39), which are mines that never power cities — and uranium cannot even be bought in the main market there. That made the 'skip buying resources without enough to power all your plants?' confirmation fire every Resources phase, no matter what. Skip mines via the engine's isUraniumMine() helper, mirroring how the bureaucracy move list and the hand-limit count already treat them. --- viewer/src/components/Game.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/viewer/src/components/Game.vue b/viewer/src/components/Game.vue index 2ac08f3..17543d1 100644 --- a/viewer/src/components/Game.vue +++ b/viewer/src/components/Game.vue @@ -822,7 +822,7 @@ import { PhasePlan, PremoveCommand, canQueuePhases } from 'powergrid-engine/src/ import { completedPhases } from '../util/round-plan'; import Resources from './boards/Resources.vue'; import { LogMove } from 'powergrid-engine/src/log'; -import { Phase, playerTimeUsed, PowerPlant, PowerPlantType, ResourceType } from 'powergrid-engine/src/gamestate'; +import { isUraniumMine, Phase, playerTimeUsed, PowerPlant, PowerPlantType, ResourceType } from 'powergrid-engine/src/gamestate'; import { City } from 'powergrid-engine/src/maps'; import { formatDuration } from '../util/time'; import { playerOrderForDisplay } from '../util/player-order'; @@ -2216,6 +2216,11 @@ export default class Game extends Vue { let uraniumUsed = 0; let hybridUsed = 0; for (const powerPlant of player.powerPlants) { + // Australia: uranium mines never power cities, so they need no fuel + // (there isn't even a uranium row in the main market to buy it from). + if (this.G && isUraniumMine(this.G, powerPlant)) { + continue; + } switch (powerPlant.type) { case PowerPlantType.Coal: coalUsed += powerPlant.cost;