mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Fix stanek not recalculating stats immediately on game load
This commit is contained in:
parent
ce9ceb05a3
commit
21162c8cdd
@ -13,10 +13,11 @@ import { Player } from "@player";
|
|||||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||||
import { defaultMultipliers, mergeMultipliers, Multipliers, scaleMultipliers } from "../PersonObjects/Multipliers";
|
import { defaultMultipliers, mergeMultipliers, Multipliers, scaleMultipliers } from "../PersonObjects/Multipliers";
|
||||||
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
||||||
|
import { getKeyList } from "src/utils/helpers/getKeyList";
|
||||||
|
|
||||||
export class StaneksGift extends BaseGift {
|
export class StaneksGift extends BaseGift {
|
||||||
isBonusCharging = false;
|
isBonusCharging = false;
|
||||||
justCharged = false;
|
justCharged = true;
|
||||||
storedCycles = 0;
|
storedCycles = 0;
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -244,14 +245,16 @@ export class StaneksGift extends BaseGift {
|
|||||||
this.storedCycles = 0;
|
this.storedCycles = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static includedProperties = getKeyList(StaneksGift, { removedKeys: ["justCharged"] });
|
||||||
|
|
||||||
/** Serialize Staneks Gift to a JSON save state. */
|
/** Serialize Staneks Gift to a JSON save state. */
|
||||||
toJSON(): IReviverValue {
|
toJSON(): IReviverValue {
|
||||||
return Generic_toJSON("StaneksGift", this);
|
return Generic_toJSON("StaneksGift", this, StaneksGift.includedProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Initializes Staneks Gift from a JSON save state */
|
/** Initializes Staneks Gift from a JSON save state */
|
||||||
static fromJSON(value: IReviverValue): StaneksGift {
|
static fromJSON(value: IReviverValue): StaneksGift {
|
||||||
return Generic_fromJSON(StaneksGift, value.data);
|
return Generic_fromJSON(StaneksGift, value.data, StaneksGift.includedProperties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user