Add script that will contain user created programs
This commit is contained in:
		
							
								
								
									
										15
									
								
								servers/home/programs.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								servers/home/programs.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
import { recursiveScan } from "./utils"
 | 
			
		||||
 | 
			
		||||
export async function main(ns: NS){
 | 
			
		||||
	switch (ns.args[0]) {
 | 
			
		||||
		case "getServers":
 | 
			
		||||
			getServers(ns);
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			ns.tprint("Invalid program name");
 | 
			
		||||
			break;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function getServers(ns: NS) {
 | 
			
		||||
	ns.tprint(recursiveScan(ns));
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user