mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33: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);
|
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 (player.workType == CONSTANTS.WorkTypeFaction) {
|
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 {
|
function cancel(): void {
|
||||||
router.toFaction(faction);
|
router.toFaction(faction);
|
||||||
player.finishFactionWork(true);
|
player.finishFactionWork(true);
|
||||||
@ -124,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