Fix logic bug
This commit is contained in:
parent
74aae19a82
commit
29d88170ab
@ -97,10 +97,10 @@ export function performFunctionIfCapable(ns: NS, server: string, func: CallableF
|
||||
}
|
||||
if (ns.getServerNumPortsRequired(server) < ns.getServer(server).openPortCount) {
|
||||
ns.print(`Not enough ports, trying to root ${server}`)
|
||||
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
|
||||
ns.print(`Need more port opening programs to root ${server}`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
|
||||
ns.print(`Need more port opening programs to root ${server}`)
|
||||
return false
|
||||
}
|
||||
if (!ns.hasRootAccess(server)) {
|
||||
ns.print(`Failed to root ${server}`)
|
||||
|
Loading…
Reference in New Issue
Block a user