add program
This commit is contained in:
parent
a3bdb2ccd1
commit
92ad2da7b7
@ -1,10 +1,13 @@
|
|||||||
import { recursiveScan } from "./utils"
|
import { recursiveHackingRequired, recursiveScan } from "./utils"
|
||||||
|
|
||||||
export async function main(ns: NS){
|
export async function main(ns: NS){
|
||||||
switch (ns.args[0]) {
|
switch (ns.args[0]) {
|
||||||
case "getServers":
|
case "getServers":
|
||||||
getServers(ns);
|
getServers(ns);
|
||||||
break;
|
break;
|
||||||
|
case "getHackingLevels":
|
||||||
|
getHackingLevels(ns);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ns.tprint("Invalid program name");
|
ns.tprint("Invalid program name");
|
||||||
break;
|
break;
|
||||||
@ -13,3 +16,6 @@ export async function main(ns: NS){
|
|||||||
function getServers(ns: NS) {
|
function getServers(ns: NS) {
|
||||||
ns.tprint(recursiveScan(ns));
|
ns.tprint(recursiveScan(ns));
|
||||||
}
|
}
|
||||||
|
function getHackingLevels(ns: NS) {
|
||||||
|
ns.tprint(recursiveHackingRequired(ns))
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user