From e5b1fd6b587ce7fb8b7fe53739d16e73fcc4890a Mon Sep 17 00:00:00 2001 From: omuretsu <84951833+Snarling@users.noreply.github.com> Date: Tue, 1 Aug 2023 02:42:43 -0400 Subject: [PATCH] Fix wiregame, update changlog WireGame had been reworked to refer to wires using their index, not the wire number, but the aug highlight display was still referring to the wire number, leading to an off-by-one. --- src/Constants.ts | 9 +++++++-- src/Infiltration/ui/WireCuttingGame.tsx | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 6e03f6657..392f6c900 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -219,7 +219,7 @@ export const CONSTANTS: { // Also update doc/source/changelog.rst LatestUpdate: ` -## v2.4.1dev - Last changelog update 7/31/23 +## v2.4.1dev - Last changelog update 8/1/23 See 2.4.0 changelog at: https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/ui/doc/changelog.md @@ -232,8 +232,13 @@ Changes below include spoilers. * ns.corporation.getConstants now has a ram cost of 0 (@Snarling) * ns.sleeve.setToFactionWork no longer allows working for factions the player has not joined (@Snarling) -### Internal Code Refactors +### INFILTRATION: + +* Knowledge of Apollo aug highlights the correct wires again (@Snarling) + +### CODEBASE: * Reorganize game constants (@zerbosh) +* Reorganize ingame documentation folder structure, simplify documentation bundling (@Snarling) `, }; diff --git a/src/Infiltration/ui/WireCuttingGame.tsx b/src/Infiltration/ui/WireCuttingGame.tsx index b39af507a..f70d82175 100644 --- a/src/Infiltration/ui/WireCuttingGame.tsx +++ b/src/Infiltration/ui/WireCuttingGame.tsx @@ -134,7 +134,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP }} > {Array.from({ length: wires.length }).map((_, i) => { - const isCorrectWire = cutWires[i + 1] || wiresToCut.has(i + 1); + const isCorrectWire = cutWires[i] || wiresToCut.has(i); const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary; return ( @@ -148,7 +148,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP if ((i === 3 || i === 4) && cutWires[j]) { return ; } - const isCorrectWire = cutWires[j + 1] || wiresToCut.has(j + 1); + const isCorrectWire = cutWires[j] || wiresToCut.has(j); const wireColor = hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length]; return (