grow helpers

This commit is contained in:
2022-09-10 20:42:31 +02:00
parent b0abc2a614
commit 7b393a7ffc
12 changed files with 281 additions and 111 deletions
+19 -4
View File
@@ -31,9 +31,13 @@
"/** @param {import(\".\").NS } ns */",
"",
"export async function main(ns) {",
" ns.disableLog('ALL');",
" // ns.disableLog('ALL');",
"",
" async function writeLog(obj) {",
" await ns.tryWritePort($1, obj + '\\n');",
" }",
" ",
" $0",
" $2",
"}"
],
"description": "New file template for Bitburner."
@@ -42,7 +46,8 @@
"scope": "",
"prefix": "print",
"body": [
"ns.print(`$0`);"
"ns.print(`$1`);",
"$2"
],
"description": "NS print"
},
@@ -50,8 +55,18 @@
"scope": "",
"prefix": "tprint",
"body": [
"ns.tprint(`$0`);"
"ns.tprint(`$1`);",
"$2"
],
"description": "NS terminal print"
},
"log": {
"scope": "",
"prefix": "log",
"body": [
"writeLog(`$1`);",
"$2"
],
"description": "write log to port"
}
}