fix a few things about getRecentScritps

This commit is contained in:
Olivier Gagnon
2022-04-12 14:45:48 -04:00
parent a9b03f34ab
commit 52e01fc026
7 changed files with 16 additions and 30 deletions
+4 -1
View File
@@ -1462,7 +1462,10 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
},
getRecentScripts: function (): IRecentScript[] {
updateDynamicRam("getRecentScripts", getRamCost(Player, "getRecentScripts"));
return recentScripts.map((rs) => ({ ...rs, runningScript: createPublicRunningScript(rs.runningScript) }));
return recentScripts.map((rs) => ({
timeOfDeath: rs.timeOfDeath,
...createPublicRunningScript(rs.runningScript),
}));
},
ps: function (_hostname: unknown = workerScript.hostname): ProcessInfo[] {
updateDynamicRam("ps", getRamCost(Player, "ps"));