Fix lint errors

This commit is contained in:
Olivier Gagnon 2024-06-12 09:51:02 -04:00
parent 1294f8f045
commit 6f27643977
No known key found for this signature in database
GPG Key ID: 0018772EA86FA03F
3 changed files with 29 additions and 27 deletions

@ -2,7 +2,7 @@ import { Device, DeviceType, Component, DeviceID, Glitch } from "@nsdefs";
import { glitchMult } from "./formulas/glitches";
import { isDeviceISocket, pickOne } from "./utils";
import { componentTiers } from "./formulas/components";
import { NewBattery, NewBus, NewCache, NewISocket, NewLock, NewOSocket, NewReducer } from "./NewDevices";
import { NewBus, NewISocket, NewOSocket } from "./NewDevices";
import { startRoaming } from "./glitches/roaming";
import { startRust } from "./glitches/rust";
import { startSegmentation } from "./glitches/segmentation";

@ -1,4 +1,3 @@
import { Bus, Myrian as IMyrian, DeviceType, Component, Reducer, Glitch, Battery, ISocket } from "@nsdefs";
import { InternalAPI } from "../Netscript/APIWrapper";
import { helpers } from "../Netscript/NetscriptHelpers";
import {
@ -53,6 +52,7 @@ import {
import { installSpeed, emissionSpeed, moveSpeed, reduceSpeed, transferSpeed } from "../Myrian/formulas/speed";
import { NewBattery, NewBus, NewCache, NewISocket, NewLock, NewOSocket, NewReducer } from "../Myrian/NewDevices";
import { rustBus } from "../Myrian/glitches/rust";
import { Bus, Myrian as IMyrian, DeviceType, Component, Reducer, Glitch, Battery, ISocket } from "@nsdefs";
export function NetscriptMyrian(): InternalAPI<IMyrian> {
return {

@ -360,31 +360,33 @@ const Engine: {
Player.lastUpdate = Engine._lastUpdate;
Engine.start(); // Run main game loop and Scripts loop
// const timeOfflineString = convertTimeMsToTimeElapsedString(time);
// setTimeout(
// () =>
// AlertEvents.emit(
// <>
// <Typography>Offline for {timeOfflineString}. While you were offline:</Typography>
// <ul>
// <li>
// <Typography>
// Your scripts generated <Money money={offlineHackingIncome} />
// </Typography>
// </li>
// <li>
// <Typography>Your Hacknet Nodes generated {hacknetProdInfo}</Typography>
// </li>
// <li>
// <Typography>
// You gained <Reputation reputation={offlineReputation} /> reputation divided amongst your factions
// </Typography>
// </li>
// </ul>
// </>,
// ),
// 250,
// );
if (process.env.NODE_ENV !== "development") {
const timeOfflineString = convertTimeMsToTimeElapsedString(time);
setTimeout(
() =>
AlertEvents.emit(
<>
<Typography>Offline for {timeOfflineString}. While you were offline:</Typography>
<ul>
<li>
<Typography>
Your scripts generated <Money money={offlineHackingIncome} />
</Typography>
</li>
<li>
<Typography>Your Hacknet Nodes generated {hacknetProdInfo}</Typography>
</li>
<li>
<Typography>
You gained <Reputation reputation={offlineReputation} /> reputation divided amongst your factions
</Typography>
</li>
</ul>
</>,
),
250,
);
}
} else {
// No save found, start new game
FormatsNeedToChange.emit();