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)
This commit is contained in:
Martin Fournier 2022-01-16 11:20:15 -05:00
parent 8b69fd7faa
commit da7f161e45

@ -553,7 +553,9 @@ export const achievements: IMap<Achievement> = {
...achievementData["MAX_CACHE"], ...achievementData["MAX_CACHE"],
Icon: "HASHNETCAP", Icon: "HASHNETCAP",
Visible: () => hasAccessToSF(Player, 9), 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: { SLEEVE_8: {
...achievementData["SLEEVE_8"], ...achievementData["SLEEVE_8"],