mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Merge pull request #3101 from phyzical/bugfix/work-in-progress-augment-fix
work in progress augment fix
This commit is contained in:
commit
1a9b3bd113
@ -31,10 +31,21 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
const id = setInterval(rerender, CONSTANTS.MilliPerCycle);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
const player = use.Player();
|
||||
const router = use.Router();
|
||||
|
||||
const faction = Factions[player.currentWorkFactionName];
|
||||
if (player.workType == CONSTANTS.WorkTypeFaction) {
|
||||
if (!faction) {
|
||||
return <>
|
||||
<Typography variant="h4" color="primary">
|
||||
You have not joined {faction} yet!
|
||||
</Typography>
|
||||
<Button onClick={() => router.toFactions()}>Back to Factions</Button>
|
||||
</>
|
||||
}
|
||||
|
||||
function cancel(): void {
|
||||
router.toFaction(faction);
|
||||
player.finishFactionWork(true);
|
||||
@ -124,7 +135,6 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
}
|
||||
|
||||
function unfocus(): void {
|
||||
router.toFaction(faction);
|
||||
router.toCity();
|
||||
player.stopFocusing();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user