From 81c2436272d3a61d01eecd747666f9439d8dc7e2 Mon Sep 17 00:00:00 2001 From: Metritutus <324345+Metritutus@users.noreply.github.com> Date: Sat, 27 Jul 2024 21:27:22 +0100 Subject: [PATCH] * Fixed bulk upgrades producing two entries in the event log. * Fixed bulk upgrades deducting credits twice for the AI when it only acquired the upgrades once. --- server/services/starUpgrade.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/server/services/starUpgrade.ts b/server/services/starUpgrade.ts index 3dac2d3fc..e7645d3e9 100644 --- a/server/services/starUpgrade.ts +++ b/server/services/starUpgrade.ts @@ -532,15 +532,6 @@ export default class StarUpgradeService extends EventEmitter { await this.achievementService.incrementInfrastructureBuilt(infrastructureType, player.userId, upgradeSummary.upgraded); } - player.credits -= upgradeSummary.cost; - - this.emit(StarUpgradeServiceEvents.onPlayerInfrastructureBulkUpgraded, { - gameId: game._id, - gameTick: game.state.tick, - player, - upgradeSummary - }); - if (infrastructureType === 'science') { upgradeSummary.currentResearchTicksEta = this.researchService.calculateCurrentResearchETAInTicks(game, player); upgradeSummary.nextResearchTicksEta = this.researchService.calculateNextResearchETAInTicks(game, player);