Merge pull request #3601 from phyzical/bugfix/3598

BUGFIX: sleeve stale object refence during augmentation
This commit is contained in:
hydroflame 2022-05-04 11:49:53 -04:00 committed by GitHub
commit 8705199714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

@ -463,12 +463,12 @@ export class PlayerObject implements IPlayer {
this.bladeburner = null; this.bladeburner = null;
this.bladeburner_max_stamina_mult = 1; this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1; this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1; //Field Analysis Onl; this.bladeburner_analysis_mult = 1; //Field Analysis Only
this.bladeburner_success_chance_mult = 1; this.bladeburner_success_chance_mult = 1;
// Sleeves & Re-sleeving // Sleeves & Re-sleeving
this.sleeves = []; this.sleeves = [];
this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenan; this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant
//bitnode //bitnode
this.bitNodeN = 1; this.bitNodeN = 1;
@ -483,8 +483,8 @@ export class PlayerObject implements IPlayer {
this.playtimeSinceLastBitnode = 0; this.playtimeSinceLastBitnode = 0;
// Keep track of where money comes from // Keep track of where money comes from
this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentatio; this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentation
this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode ru; this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode run
// Production since last Augmentation installation // Production since last Augmentation installation
this.scriptProdSinceLastAug = 0; this.scriptProdSinceLastAug = 0;

@ -77,7 +77,9 @@ function possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {
} }
return factions.filter((faction) => { return factions.filter((faction) => {
const facInfo = Factions[faction].getInfo(); const factionObj = Factions[faction];
if (!factionObj) return false;
const facInfo = factionObj.getInfo();
return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork; return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork;
}); });
} }