From 921cbbdf45f40e30c74e1362bfee4c5633e20e74 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Fri, 16 May 2025 16:42:31 -0400 Subject: [PATCH] src/core/game/StatsImpl.ts --- src/core/game/StatsImpl.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/game/StatsImpl.ts b/src/core/game/StatsImpl.ts index c512b6748..aad8d57a1 100644 --- a/src/core/game/StatsImpl.ts +++ b/src/core/game/StatsImpl.ts @@ -15,13 +15,15 @@ export class StatsImpl implements Stats { [UnitType.MIRVWarhead]: 0, [UnitType.AtomBomb]: 0, [UnitType.HydrogenBomb]: 0, - }; + } satisfies Record; } } increaseNukeCount(sender: PlayerID, target: PlayerID, type: NukeType): void { this._createUserData(sender, target); - this.data[sender].sentNukes[target][type]++; + const d = this.data[sender].sentNukes[target]; + const v = d[type] ?? 0; + d[type] = v + 1; } getPlayerStats(player: PlayerID): PlayerStats {