NETSCRIPT: Store the value of Player.money in the returned object's moneyAvailable property when ns.getServer is called with "home" (#2024)

This commit is contained in:
Naga
2025-03-12 21:17:57 -04:00
committed by GitHub
parent f5b12da0fe
commit b0165d5c2c

View File

@@ -1007,7 +1007,7 @@ export const ns: InternalAPI<NSFull> = {
baseDifficulty: server.baseDifficulty,
hackDifficulty: server.hackDifficulty,
minDifficulty: server.minDifficulty,
moneyAvailable: server.moneyAvailable,
moneyAvailable: server.hostname === "home" ? Player.money : server.moneyAvailable,
moneyMax: server.moneyMax,
numOpenPortsRequired: server.numOpenPortsRequired,
openPortCount: server.openPortCount,