mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-26 16:07:33 +01:00
Very slightly adjust router.toFaction
- Faction argument is now required - Added augPage argument
This commit is contained in:
parent
668e43c5de
commit
e39817cb57
@ -590,7 +590,7 @@ export function process(this: IPlayer, router: IRouter, numCycles = 1): void {
|
||||
if (this.isWorking) {
|
||||
if (this.workType == CONSTANTS.WorkTypeFaction) {
|
||||
if (this.workForFaction(numCycles)) {
|
||||
router.toFaction();
|
||||
router.toFaction(Factions[this.currentWorkFactionName]);
|
||||
}
|
||||
} else if (this.workType == CONSTANTS.WorkTypeCreateProgram) {
|
||||
if (this.createProgramWork(numCycles)) {
|
||||
|
@ -223,6 +223,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
const [{ files, vim }, setEditorOptions] = useState({ files: {}, vim: false });
|
||||
const [page, setPage] = useState(determineStartPage(player));
|
||||
const setRerender = useState(0)[1];
|
||||
const [augPage, setAugPage] = useState<boolean>(false);
|
||||
const [faction, setFaction] = useState<Faction>(
|
||||
player.currentWorkFactionName ? Factions[player.currentWorkFactionName] : (undefined as unknown as Faction),
|
||||
);
|
||||
@ -275,7 +276,8 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
toCorporation: () => setPage(Page.Corporation),
|
||||
toCreateProgram: () => setPage(Page.CreateProgram),
|
||||
toDevMenu: () => setPage(Page.DevMenu),
|
||||
toFaction: (faction?: Faction) => {
|
||||
toFaction: (faction: Faction, augPage = false) => {
|
||||
setAugPage(augPage);
|
||||
setPage(Page.Faction);
|
||||
if (faction) setFaction(faction);
|
||||
},
|
||||
@ -453,7 +455,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
break;
|
||||
}
|
||||
case Page.Faction: {
|
||||
mainPage = <FactionRoot faction={faction} />;
|
||||
mainPage = <FactionRoot faction={faction} augPage={augPage} />;
|
||||
break;
|
||||
}
|
||||
case Page.Milestones: {
|
||||
|
@ -65,7 +65,7 @@ export interface IRouter {
|
||||
toCorporation(): void;
|
||||
toCreateProgram(): void;
|
||||
toDevMenu(): void;
|
||||
toFaction(faction?: Faction): void; // faction name
|
||||
toFaction(faction: Faction, augPage?: boolean): void; // faction name
|
||||
toFactions(): void;
|
||||
toGameOptions(): void;
|
||||
toGang(): void;
|
||||
|
Loading…
Reference in New Issue
Block a user