mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
make crime unfocusable
This commit is contained in:
parent
fac6633347
commit
28956d8fd6
@ -107,6 +107,7 @@ export class Crime {
|
||||
singularity: workerScript !== null,
|
||||
}),
|
||||
);
|
||||
p.focus = true;
|
||||
router.toWork();
|
||||
|
||||
return this.time;
|
||||
|
@ -33,6 +33,7 @@ import { isGraftingWork } from "../../Work/GraftingWork";
|
||||
import { isFactionWork } from "../../Work/FactionWork";
|
||||
import { ReputationRate } from "./ReputationRate";
|
||||
import { isCompanyWork } from "../../Work/CompanyWork";
|
||||
import { isCrimeWork } from "../../Work/CrimeWork";
|
||||
|
||||
interface IProps {
|
||||
save: () => void;
|
||||
@ -149,6 +150,14 @@ function Work(): React.ReactElement {
|
||||
let details = <></>;
|
||||
let header = <></>;
|
||||
let innerText = <></>;
|
||||
if (isCrimeWork(player.currentWork)) {
|
||||
const crime = player.currentWork.getCrime();
|
||||
const perc = ((player.currentWork.cyclesWorked * CONSTANTS._idleSpeed) / crime.time) * 100;
|
||||
|
||||
details = <>{player.currentWork.crimeType}</>;
|
||||
header = <>You are attempting to {player.currentWork.crimeType}</>;
|
||||
innerText = <>{perc.toFixed(2)}%</>;
|
||||
}
|
||||
if (isClassWork(player.currentWork)) {
|
||||
details = <>{player.currentWork.getClass().youAreCurrently}</>;
|
||||
header = <>You are {player.currentWork.getClass().youAreCurrently}</>;
|
||||
|
@ -153,6 +153,10 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
router.toLocation(Locations[LocationName.Slums]);
|
||||
player.finishNEWWork(true);
|
||||
},
|
||||
unfocus: () => {
|
||||
router.toCity();
|
||||
player.stopFocusing();
|
||||
},
|
||||
},
|
||||
title: `You are attempting to ${crime.type}`,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user