mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
moved to only apply when working for faction
This commit is contained in:
parent
f7dcf5ca97
commit
e5acd10c86
@ -36,16 +36,16 @@ export function WorkInProgressRoot(): React.ReactElement {
|
|||||||
const router = use.Router();
|
const router = use.Router();
|
||||||
|
|
||||||
const faction = Factions[player.currentWorkFactionName];
|
const faction = Factions[player.currentWorkFactionName];
|
||||||
if (!faction) {
|
|
||||||
return <>
|
|
||||||
<Typography variant="h4" color="primary">
|
|
||||||
Sorry, You have not joined the faction {faction} yet!
|
|
||||||
</Typography>
|
|
||||||
<Button onClick={() => router.toFactions()}>Back to Factions</Button>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.workType == CONSTANTS.WorkTypeFaction) {
|
if (player.workType == CONSTANTS.WorkTypeFaction) {
|
||||||
|
if (!faction) {
|
||||||
|
return <>
|
||||||
|
<Typography variant="h4" color="primary">
|
||||||
|
Sorry, You have not joined the faction {faction} yet!
|
||||||
|
</Typography>
|
||||||
|
<Button onClick={() => router.toFactions()}>Back to Factions</Button>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
|
||||||
function cancel(): void {
|
function cancel(): void {
|
||||||
router.toFaction(faction);
|
router.toFaction(faction);
|
||||||
player.finishFactionWork(true);
|
player.finishFactionWork(true);
|
||||||
@ -135,7 +135,6 @@ export function WorkInProgressRoot(): React.ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function unfocus(): void {
|
function unfocus(): void {
|
||||||
router.toFaction(faction);
|
|
||||||
router.toCity();
|
router.toCity();
|
||||||
player.stopFocusing();
|
player.stopFocusing();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user