grow helpers
This commit is contained in:
Vendored
+19
-4
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user