mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
add early out to say "sorry not part of faction when working and augmenting"
This commit is contained in:
parent
3917ef2663
commit
f7dcf5ca97
@ -31,9 +31,20 @@ export function WorkInProgressRoot(): React.ReactElement {
|
|||||||
const id = setInterval(rerender, CONSTANTS.MilliPerCycle);
|
const id = setInterval(rerender, CONSTANTS.MilliPerCycle);
|
||||||
return () => clearInterval(id);
|
return () => clearInterval(id);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const player = use.Player();
|
const player = use.Player();
|
||||||
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) {
|
||||||
function cancel(): void {
|
function cancel(): void {
|
||||||
router.toFaction(faction);
|
router.toFaction(faction);
|
||||||
|
Loading…
Reference in New Issue
Block a user