From 7d928a51c835fb43b217f6f6717894243f79d2dc Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Sat, 5 Feb 2022 00:13:35 +0000 Subject: [PATCH] Update update.js --- scripts/update.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/update.js b/scripts/update.js index eeb60f6..af6389a 100644 --- a/scripts/update.js +++ b/scripts/update.js @@ -14,11 +14,12 @@ export async function main(ns) { ]; // Download each file + ns.tprint("Downloading scripts:"); for(const FILE of FILE_LIST) { - const SPEED = ~~(Math.random() * 100) / 10; - await ns.wget(`${SRC}${FILE}`, `${DIST}${FILE}`); - ns.tprint(`${FILE} \t [==================>] 100% \t (${SPEED} MB/s)`); await ns.sleep(500); + await ns.wget(`${SRC}${FILE}`, `${DIST}${FILE}`); + const SPEED = ~~((Math.random() * 200) + 100) / 10; + ns.tprint(`${FILE} ${FILE.length <= 10 ? '\t' : ''}\t [==================>] 100% \t (${SPEED} MB/s)`); } ns.tprint('Done!'); }