From da7f161e45b3e3d6b8e39316f01d1171f5101f20 Mon Sep 17 00:00:00 2001 From: Martin Fournier Date: Sun, 16 Jan 2022 11:20:15 -0500 Subject: [PATCH] Add check for hash capacity > 0 for MAX_CACHE Achievement would trigger as soon as you entered the node as the capacity was 0. It looks like this fix was lost in a merge resolution (see PR #2459) --- src/Achievements/Achievements.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Achievements/Achievements.ts b/src/Achievements/Achievements.ts index d27dc3b06..d454774da 100644 --- a/src/Achievements/Achievements.ts +++ b/src/Achievements/Achievements.ts @@ -553,7 +553,9 @@ export const achievements: IMap = { ...achievementData["MAX_CACHE"], Icon: "HASHNETCAP", Visible: () => hasAccessToSF(Player, 9), - Condition: () => hasHacknetServers(Player) && Player.hashManager.hashes === Player.hashManager.capacity, + Condition: () => hasHacknetServers(Player) && + Player.hashManager.hashes === Player.hashManager.capacity && + Player.hashManager.capacity > 0, }, SLEEVE_8: { ...achievementData["SLEEVE_8"],