mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Tolerate & recover from null player money
This commit is contained in:
@@ -166,7 +166,9 @@ export class PlayerObject extends Person {
|
||||
|
||||
/** Initializes a PlayerObject object from a JSON save state. */
|
||||
static fromJSON(value: IReviverValue): PlayerObject {
|
||||
return Generic_fromJSON(PlayerObject, value.data);
|
||||
const player = Generic_fromJSON(PlayerObject, value.data);
|
||||
if (player.money === null) player.money = 0;
|
||||
return player;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user