added ramUsed to getNodeStats

This commit is contained in:
Olivier Gagnon 2021-11-12 10:10:33 -05:00
parent c0d28c17e7
commit 7059bdf08a
4 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -77,6 +77,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, he
name: node instanceof HacknetServer ? node.hostname : node.name,
level: node.level,
ram: node instanceof HacknetServer ? node.maxRam : node.ram,
ramUsed: node instanceof HacknetServer ? node.ramUsed : undefined,
cores: node.cores,
production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,
timeOnline: node.onlineTimeSeconds,

@ -470,6 +470,8 @@ export interface NodeStats {
level: number;
/** Node's RAM */
ram: number;
/** Node's used RAM */
ramUsed: number;
/** Node's number of cores */
cores: number;
/** Cache level. Only applicable for Hacknet Servers */