All the player sub-objects need to be copied.

Not just `mults`. Also, `hacking_chance_mult` still being at the base level appears to be a mistake.
This commit is contained in:
MageKing17 2022-08-21 12:22:58 -07:00 committed by GitHub
parent 853e9c2e4f
commit 80aafc7d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1911,10 +1911,9 @@ const base: InternalAPI<NS> = {
},
getPlayer: () => (): INetscriptPlayer => {
const data = {
hp: Player.hp,
skills: Player.skills,
exp: Player.exp,
hacking_chance_mult: Player.mults.hacking_chance,
hp: JSON.parse(JSON.stringify(Player.hp)),
skills: JSON.parse(JSON.stringify(Player.skills)),
exp: JSON.parse(JSON.stringify(Player.exp)),
mults: JSON.parse(JSON.stringify(Player.mults)),
numPeopleKilled: Player.numPeopleKilled,
money: Player.money,