bitburner-src/src/Player.ts

13 lines
419 B
TypeScript
Raw Normal View History

2019-04-04 02:08:11 +02:00
import { PlayerObject } from "./PersonObjects/Player/PlayerObject";
2021-03-09 02:31:34 +01:00
import { sanitizeExploits } from "./Exploits/Exploit";
2021-09-25 20:42:57 +02:00
import { Reviver } from "./utils/JSONReviver";
export let Player = new PlayerObject();
2021-09-24 00:47:43 +02:00
export function loadPlayer(saveString: string): void {
2021-09-05 01:09:30 +02:00
Player = JSON.parse(saveString, Reviver);
2021-11-12 03:35:26 +01:00
Player.money = parseFloat(Player.money as any);
2021-09-05 01:09:30 +02:00
Player.exploits = sanitizeExploits(Player.exploits);
}