mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
FACTIONS: fix unstable display order (#920)
This commit is contained in:
@@ -35,13 +35,13 @@ export function prestigeAugmentation(): void {
|
||||
initBitNodeMultipliers();
|
||||
|
||||
// Maintain invites to factions with the 'keepOnInstall' flag, and rumors about others
|
||||
const maintainInvites = [];
|
||||
const maintainRumors = [];
|
||||
const maintainInvites = new Set<FactionName>();
|
||||
const maintainRumors = new Set<FactionName>();
|
||||
for (const facName of [...Player.factions, ...Player.factionInvitations]) {
|
||||
if (Factions[facName].getInfo().keep) {
|
||||
maintainInvites.push(facName);
|
||||
maintainInvites.add(facName);
|
||||
} else {
|
||||
maintainRumors.push(facName);
|
||||
maintainRumors.add(facName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,8 +92,10 @@ export function prestigeAugmentation(): void {
|
||||
// Recalculate the bonus for circadian modulator aug
|
||||
initCircadianModulator();
|
||||
|
||||
Player.factionInvitations = Player.factionInvitations.concat(maintainInvites);
|
||||
for (const factionName of maintainInvites) Factions[factionName].alreadyInvited = true;
|
||||
Player.factionInvitations = Player.factionInvitations.concat([...maintainInvites]);
|
||||
for (const factionName of maintainInvites) {
|
||||
Factions[factionName].alreadyInvited = true;
|
||||
}
|
||||
Player.reapplyAllAugmentations();
|
||||
Player.reapplyAllSourceFiles();
|
||||
Player.hp.current = Player.hp.max;
|
||||
|
||||
Reference in New Issue
Block a user