mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 06:32: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
|
||||||
|
Loading…
Reference in New Issue
Block a user