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";
|
2019-04-01 11:23:25 +02:00
|
|
|
|
2021-09-25 20:42:57 +02:00
|
|
|
import { Reviver } from "./utils/JSONReviver";
|
2019-04-01 11:23:25 +02:00
|
|
|
|
|
|
|
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);
|
2017-08-30 19:44:29 +02:00
|
|
|
}
|