Move filtering to after logging
This commit is contained in:
parent
e6aca2e998
commit
9b4042af40
@ -8,10 +8,10 @@ export async function main(ns: NS) {
|
||||
|
||||
do {
|
||||
if (Math.min(...levels) <= hackingLevel) {
|
||||
// remove the level from the list, so we don't try to hack it again
|
||||
levels = levels.filter(level => level > hackingLevel)
|
||||
ns.tprint(`Hacking level increased past ${Math.min(...levels)}}, is now ${hackingLevel}`)
|
||||
ns.tprint(`Remaining levels to hack: ${levels}`)
|
||||
// remove the level from the list, so we don't try to hack it again
|
||||
levels = levels.filter(level => level > hackingLevel)
|
||||
ns.run("killall.js")
|
||||
await ns.sleep(1000) // 1 second
|
||||
ns.run("hackallservers.js")
|
||||
|
Loading…
Reference in New Issue
Block a user