mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +01:00
Merge pull request #3045 from jjayeon/dev
sort player's joined factions for cleaner rendering
This commit is contained in:
commit
46d37a89b0
@ -19,6 +19,42 @@ import { SourceFileFlags } from "../SourceFile/SourceFileFlags";
|
|||||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||||
import { InvitationEvent } from "./ui/InvitationModal";
|
import { InvitationEvent } from "./ui/InvitationModal";
|
||||||
|
|
||||||
|
const factionOrder = [
|
||||||
|
"CyberSec",
|
||||||
|
"Tian Di Hui",
|
||||||
|
"Netburners",
|
||||||
|
"Sector-12",
|
||||||
|
"Chongqing",
|
||||||
|
"New Tokyo",
|
||||||
|
"Ishima",
|
||||||
|
"Aevum",
|
||||||
|
"Volhaven",
|
||||||
|
"NiteSec",
|
||||||
|
"The Black Hand",
|
||||||
|
"BitRunners",
|
||||||
|
"ECorp",
|
||||||
|
"MegaCorp",
|
||||||
|
"KuaiGong International",
|
||||||
|
"Four Sigma",
|
||||||
|
"NWO",
|
||||||
|
"Blade Industries",
|
||||||
|
"OmniTek Incorporated",
|
||||||
|
"Bachman & Associates",
|
||||||
|
"Clarke Incorporated",
|
||||||
|
"Fulcrum Secret Technologies",
|
||||||
|
"Slum Snakes",
|
||||||
|
"Tetrads",
|
||||||
|
"Silhouette",
|
||||||
|
"Speakers for the Dead",
|
||||||
|
"The Dark Army",
|
||||||
|
"The Syndicate",
|
||||||
|
"The Covenant",
|
||||||
|
"Daedalus",
|
||||||
|
"Illuminati",
|
||||||
|
"Bladeburners",
|
||||||
|
"Church of the Machine God",
|
||||||
|
]
|
||||||
|
|
||||||
export function inviteToFaction(faction: Faction): void {
|
export function inviteToFaction(faction: Faction): void {
|
||||||
Player.receiveInvite(faction.name);
|
Player.receiveInvite(faction.name);
|
||||||
faction.alreadyInvited = true;
|
faction.alreadyInvited = true;
|
||||||
@ -31,6 +67,8 @@ export function joinFaction(faction: Faction): void {
|
|||||||
if (faction.isMember) return;
|
if (faction.isMember) return;
|
||||||
faction.isMember = true;
|
faction.isMember = true;
|
||||||
Player.factions.push(faction.name);
|
Player.factions.push(faction.name);
|
||||||
|
Player.factions.sort((a, b) =>
|
||||||
|
factionOrder.indexOf(a) - factionOrder.indexOf(b));
|
||||||
const factionInfo = faction.getInfo();
|
const factionInfo = faction.getInfo();
|
||||||
|
|
||||||
//Determine what factions you are banned from now that you have joined this faction
|
//Determine what factions you are banned from now that you have joined this faction
|
||||||
@ -132,19 +170,19 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
|
|||||||
if (!Settings.SuppressBuyAugmentationConfirmation) {
|
if (!Settings.SuppressBuyAugmentationConfirmation) {
|
||||||
dialogBoxCreate(
|
dialogBoxCreate(
|
||||||
"You purchased " +
|
"You purchased " +
|
||||||
aug.name +
|
aug.name +
|
||||||
". Its enhancements will not take " +
|
". Its enhancements will not take " +
|
||||||
"effect until they are installed. To install your augmentations, go to the " +
|
"effect until they are installed. To install your augmentations, go to the " +
|
||||||
"'Augmentations' tab on the left-hand navigation menu. Purchasing additional " +
|
"'Augmentations' tab on the left-hand navigation menu. Purchasing additional " +
|
||||||
"augmentations will now be more expensive.",
|
"augmentations will now be more expensive.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dialogBoxCreate(
|
dialogBoxCreate(
|
||||||
"Hmm, something went wrong when trying to purchase an Augmentation. " +
|
"Hmm, something went wrong when trying to purchase an Augmentation. " +
|
||||||
"Please report this to the game developer with an explanation of how to " +
|
"Please report this to the game developer with an explanation of how to " +
|
||||||
"reproduce this.",
|
"reproduce this.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
Reference in New Issue
Block a user