Fixed network graph port bug

This commit is contained in:
Zakary Timson 2022-04-27 10:08:00 -04:00
parent 3374e80607
commit 54f45ced62

View File

@ -74,7 +74,7 @@ export async function main(ns) {
for(let i = 0; i < nodes.length; i++) { for(let i = 0; i < nodes.length; i++) {
const server = nodes[i], info = ns.getServer(server); const server = nodes[i], info = ns.getServer(server);
let stats = ''; let stats = '';
if(args['level'] || args['verbose']) stats += ` [${info.requiredHackingSkill}|${info.openPortCount}]`; if(args['level'] || args['verbose']) stats += ` [${info.requiredHackingSkill}|${info.numOpenPortsRequired}]`;
if(args['specs'] || args['verbose']) stats += ` {${info.cpuCores}|${info.maxRam}}`; if(args['specs'] || args['verbose']) stats += ` {${info.cpuCores}|${info.maxRam}}`;
if(args['usage'] || args['verbose']) stats += ` (${Math.round(info.ramUsed / info.maxRam * 100) || 0}%)`; if(args['usage'] || args['verbose']) stats += ` (${Math.round(info.ramUsed / info.maxRam * 100) || 0}%)`;
const last = i == nodes.length - 1; const last = i == nodes.length - 1;