Add check for hash capacity > 0 for MAX_CACHE

Achievement would trigger as soon as you entered the node as the
capacity was 0.
This commit is contained in:
Martin Fournier 2022-01-08 04:57:04 -05:00
parent d2193e017d
commit fc3c896b80

@ -274,7 +274,9 @@ const achievements: Achievement[] = [
{ ID: "HACKNET_SERVER_1B", Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9 }, { ID: "HACKNET_SERVER_1B", Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9 },
{ {
ID: "MAX_CACHE", ID: "MAX_CACHE",
Condition: () => hasHacknetServers(Player) && Player.hashManager.hashes === Player.hashManager.capacity, Condition: () => hasHacknetServers(Player) &&
Player.hashManager.hashes === Player.hashManager.capacity &&
Player.hashManager.capacity > 0,
}, },
{ {
ID: "SLEEVE_8", ID: "SLEEVE_8",