From 9b4042af4013b6545c7aee8cca73c815eb129f79 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Mon, 13 Nov 2023 13:38:39 -0400 Subject: [PATCH] Move filtering to after logging --- servers/home/watcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/home/watcher.ts b/servers/home/watcher.ts index a2b0fd7..3c6d786 100644 --- a/servers/home/watcher.ts +++ b/servers/home/watcher.ts @@ -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")