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