Merge pull request #2863 from SagePtr/can-run-scripts

Show "Can run scripts" to "NO" for zero-RAM servers in "analyze" command
This commit is contained in:
hydroflame 2022-01-29 11:27:05 -05:00 committed by GitHub
commit 9ddb1c4379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -314,7 +314,9 @@ export class Terminal implements ITerminal {
this.print("Organization name: " + (!isHacknet ? org : "player"));
const hasAdminRights = (!isHacknet && currServ.hasAdminRights) || isHacknet;
this.print("Root Access: " + (hasAdminRights ? "YES" : "NO"));
this.print("Can run scripts on this host: " + (hasAdminRights ? "YES" : "NO"));
const canRunScripts = hasAdminRights && currServ.maxRam > 0;
this.print("Can run scripts on this host: " + (canRunScripts ? "YES" : "NO"));
this.print("RAM: " + numeralWrapper.formatRAM(currServ.maxRam));
if (currServ instanceof Server) {
this.print("Backdoor: " + (currServ.backdoorInstalled ? "YES" : "NO"));
const hackingSkill = currServ.requiredHackingSkill;