format & lint

This commit is contained in:
Snarling
2022-09-13 12:37:24 -04:00
parent c9ee938bc6
commit 91a69d7d8f
39 changed files with 59 additions and 154 deletions
@@ -124,9 +124,7 @@ export const GraftingRoot = (): React.ReactElement => {
<ListItemButton key={i + 1} onClick={() => setSelectedAug(k)} selected={selectedAug === k}>
<Typography
sx={{
color: canGraft(graftableAugmentations[k])
? Settings.theme.primary
: Settings.theme.disabled,
color: canGraft(graftableAugmentations[k]) ? Settings.theme.primary : Settings.theme.disabled,
}}
>
{k}
@@ -1,4 +1,3 @@
import { IPlayer } from "../../IPlayer";
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../../utils/JSONReviver";
import { applySleeveGains, Work, WorkType } from "./Work";
import { ClassType } from "../../../Work/ClassWork";
@@ -25,11 +24,7 @@ export class SleeveClassWork extends Work {
}
calculateRates(sleeve: Sleeve): WorkStats {
return scaleWorkStats(
calculateClassEarnings(sleeve, this.classType, this.location),
sleeve.shockBonus(),
false,
);
return scaleWorkStats(calculateClassEarnings(sleeve, this.classType, this.location), sleeve.shockBonus(), false);
}
isGym(): boolean {
@@ -1,4 +1,3 @@
import { IPlayer } from "../../IPlayer";
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../../utils/JSONReviver";
import { Sleeve } from "../Sleeve";
import { applySleeveGains, Work, WorkType } from "./Work";
+1 -3
View File
@@ -200,9 +200,7 @@ export function SleeveElem(props: IProps): React.ReactElement {
<ProgressBar
variant="determinate"
value={
(props.sleeve.currentWork.cyclesWorked /
props.sleeve.currentWork.cyclesNeeded(props.sleeve)) *
100
(props.sleeve.currentWork.cyclesWorked / props.sleeve.currentWork.cyclesNeeded(props.sleeve)) * 100
}
color="primary"
/>
+2 -5
View File
@@ -243,8 +243,7 @@ const canDo: {
"Commit Crime": () => true,
"Take University Course": (sleeve: Sleeve) =>
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
"Workout at Gym": (sleeve: Sleeve) =>
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
"Workout at Gym": (sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
"Perform Bladeburner Actions": () => Player.inBladeburner(),
"Shock Recovery": (sleeve: Sleeve) => sleeve.shock < 100,
Synchronize: (sleeve: Sleeve) => sleeve.sync < 100,
@@ -343,9 +342,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
const [s1, setS1] = useState(abc[1]);
const [s2, setS2] = useState(abc[2]);
const validActions = Object.keys(canDo).filter((k) =>
(canDo[k] as (sleeve: Sleeve) => boolean)(props.sleeve),
);
const validActions = Object.keys(canDo).filter((k) => (canDo[k] as (sleeve: Sleeve) => boolean)(props.sleeve));
const detailsF = tasks[s0];
if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);