From 2c3e0985c46d49b9f57f0446178184d3df6899f6 Mon Sep 17 00:00:00 2001 From: BB Date: Sun, 6 Mar 2022 05:05:55 +0100 Subject: [PATCH] Simplified some relative imports --- src/Augmentation/ui/InstalledAugmentations.tsx | 4 ++-- src/Augmentation/ui/PurchasedAugmentations.tsx | 4 ++-- src/Faction/ui/AugmentationsPage.tsx | 2 +- src/Faction/ui/DonateOption.tsx | 2 +- src/Faction/ui/FactionRoot.tsx | 2 +- src/Faction/ui/Info.tsx | 4 ++-- src/Faction/ui/PurchaseableAugmentation.tsx | 2 +- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 2 +- src/PersonObjects/Sleeve/ui/SleeveElem.tsx | 6 +++--- src/Script/RamCalculations.ts | 2 +- src/Script/ScriptHelpers.ts | 2 +- src/StockMarket/StockMarket.tsx | 2 +- src/Terminal/commands/ls.tsx | 2 +- src/ui/ActiveScripts/RecentScriptAccordion.tsx | 2 +- src/ui/CharacterStats.tsx | 2 +- src/ui/GameRoot.tsx | 4 ++-- src/ui/React/AlertManager.tsx | 2 +- src/ui/React/CharacterOverview.tsx | 2 +- src/ui/React/Favor.tsx | 2 +- src/ui/React/HashRate.tsx | 4 ++-- src/ui/React/Hashes.tsx | 2 +- src/ui/React/Money.tsx | 2 +- src/ui/React/MoneyRate.tsx | 4 ++-- src/ui/React/PromptManager.tsx | 2 +- src/ui/React/Reputation.tsx | 2 +- src/ui/React/ReputationRate.tsx | 4 ++-- 26 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Augmentation/ui/InstalledAugmentations.tsx b/src/Augmentation/ui/InstalledAugmentations.tsx index d0251c0c5..b83b985f7 100644 --- a/src/Augmentation/ui/InstalledAugmentations.tsx +++ b/src/Augmentation/ui/InstalledAugmentations.tsx @@ -8,8 +8,8 @@ import React, { useState } from "react"; import { AugmentationAccordion } from "../../ui/React/AugmentationAccordion"; -import { Augmentations } from "../../Augmentation/Augmentations"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Augmentations } from "../Augmentations"; +import { AugmentationNames } from "../data/AugmentationNames"; import { Settings } from "../../Settings/Settings"; import { use } from "../../ui/Context"; diff --git a/src/Augmentation/ui/PurchasedAugmentations.tsx b/src/Augmentation/ui/PurchasedAugmentations.tsx index 67fd7ab09..a8aa13b55 100644 --- a/src/Augmentation/ui/PurchasedAugmentations.tsx +++ b/src/Augmentation/ui/PurchasedAugmentations.tsx @@ -4,8 +4,8 @@ */ import * as React from "react"; -import { Augmentations } from "../../Augmentation/Augmentations"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Augmentations } from "../Augmentations"; +import { AugmentationNames } from "../data/AugmentationNames"; import { Player } from "../../Player"; import { AugmentationAccordion } from "../../ui/React/AugmentationAccordion"; diff --git a/src/Faction/ui/AugmentationsPage.tsx b/src/Faction/ui/AugmentationsPage.tsx index 605abee42..1d519b124 100644 --- a/src/Faction/ui/AugmentationsPage.tsx +++ b/src/Faction/ui/AugmentationsPage.tsx @@ -7,7 +7,7 @@ import { PurchaseableAugmentation } from "./PurchaseableAugmentation"; import { Augmentations } from "../../Augmentation/Augmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { Faction } from "../../Faction/Faction"; +import { Faction } from "../Faction"; import { PurchaseAugmentationsOrderSetting } from "../../Settings/SettingEnums"; import { Settings } from "../../Settings/Settings"; import { hasAugmentationPrereqs } from "../FactionHelpers"; diff --git a/src/Faction/ui/DonateOption.tsx b/src/Faction/ui/DonateOption.tsx index 255c73711..bbfc4f72c 100644 --- a/src/Faction/ui/DonateOption.tsx +++ b/src/Faction/ui/DonateOption.tsx @@ -4,7 +4,7 @@ import React, { useState } from "react"; import { CONSTANTS } from "../../Constants"; -import { Faction } from "../../Faction/Faction"; +import { Faction } from "../Faction"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { repFromDonation } from "../formulas/donation"; import { Favor } from "../../ui/React/Favor"; diff --git a/src/Faction/ui/FactionRoot.tsx b/src/Faction/ui/FactionRoot.tsx index dd43d2f94..c1c16a00b 100644 --- a/src/Faction/ui/FactionRoot.tsx +++ b/src/Faction/ui/FactionRoot.tsx @@ -13,7 +13,7 @@ import { Option } from "./Option"; import { CONSTANTS } from "../../Constants"; import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; -import { Faction } from "../../Faction/Faction"; +import { Faction } from "../Faction"; import { use } from "../../ui/Context"; import { CreateGangModal } from "./CreateGangModal"; diff --git a/src/Faction/ui/Info.tsx b/src/Faction/ui/Info.tsx index 39992846f..dc3a07ac7 100644 --- a/src/Faction/ui/Info.tsx +++ b/src/Faction/ui/Info.tsx @@ -4,8 +4,8 @@ */ import React, { useState, useEffect } from "react"; -import { Faction } from "../../Faction/Faction"; -import { FactionInfo } from "../../Faction/FactionInfo"; +import { Faction } from "../Faction"; +import { FactionInfo } from "../FactionInfo"; import { Reputation } from "../../ui/React/Reputation"; import { Favor } from "../../ui/React/Favor"; diff --git a/src/Faction/ui/PurchaseableAugmentation.tsx b/src/Faction/ui/PurchaseableAugmentation.tsx index 47eabe7b9..4ca0b483a 100644 --- a/src/Faction/ui/PurchaseableAugmentation.tsx +++ b/src/Faction/ui/PurchaseableAugmentation.tsx @@ -9,7 +9,7 @@ import { PurchaseAugmentationModal } from "./PurchaseAugmentationModal"; import { Augmentations } from "../../Augmentation/Augmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { Faction } from "../../Faction/Faction"; +import { Faction } from "../Faction"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Settings } from "../../Settings/Settings"; import { Money } from "../../ui/React/Money"; diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 192c52039..f57392831 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -25,7 +25,7 @@ import { Cities } from "../../Locations/Cities"; import { Locations } from "../../Locations/Locations"; import { CityName } from "../../Locations/data/CityNames"; import { LocationName } from "../../Locations/data/LocationNames"; -import { Sleeve } from "../../PersonObjects/Sleeve/Sleeve"; +import { Sleeve } from "../Sleeve/Sleeve"; import { calculateSkill as calculateSkillF, calculateSkillProgress as calculateSkillProgressF, diff --git a/src/PersonObjects/Sleeve/ui/SleeveElem.tsx b/src/PersonObjects/Sleeve/ui/SleeveElem.tsx index 3911e707b..45a3e909d 100644 --- a/src/PersonObjects/Sleeve/ui/SleeveElem.tsx +++ b/src/PersonObjects/Sleeve/ui/SleeveElem.tsx @@ -17,10 +17,10 @@ import { Money } from "../../../ui/React/Money"; import { MoneyRate } from "../../../ui/React/MoneyRate"; import { use } from "../../../ui/Context"; import { ReputationRate } from "../../../ui/React/ReputationRate"; -import { StatsElement } from "../ui/StatsElement"; +import { StatsElement } from "./StatsElement"; import { MoreStatsModal } from "./MoreStatsModal"; -import { MoreEarningsModal } from "../ui/MoreEarningsModal"; -import { TaskSelector } from "../ui/TaskSelector"; +import { MoreEarningsModal } from "./MoreEarningsModal"; +import { TaskSelector } from "./TaskSelector"; import { FactionWorkType } from "../../../Faction/FactionWorkTypeEnum"; import { StatsTable } from "../../../ui/React/StatsTable"; diff --git a/src/Script/RamCalculations.ts b/src/Script/RamCalculations.ts index 25e699e23..7608f407b 100644 --- a/src/Script/RamCalculations.ts +++ b/src/Script/RamCalculations.ts @@ -11,7 +11,7 @@ import acorn, { parse } from "acorn"; import { RamCalculationErrorCode } from "./RamCalculationErrorCodes"; import { RamCosts, RamCostConstants } from "../Netscript/RamCostGenerator"; -import { Script } from "../Script/Script"; +import { Script } from "./Script"; import { WorkerScript } from "../Netscript/WorkerScript"; import { areImportsEquals } from "../Terminal/DirectoryHelpers"; import { IPlayer } from "../PersonObjects/IPlayer"; diff --git a/src/Script/ScriptHelpers.ts b/src/Script/ScriptHelpers.ts index 1d0617f9e..078634328 100644 --- a/src/Script/ScriptHelpers.ts +++ b/src/Script/ScriptHelpers.ts @@ -2,7 +2,7 @@ import { CONSTANTS } from "../Constants"; import { Player } from "../Player"; import { BaseServer } from "../Server/BaseServer"; import { Server } from "../Server/Server"; -import { RunningScript } from "../Script/RunningScript"; +import { RunningScript } from "./RunningScript"; import { processSingleServerGrowth } from "../Server/ServerHelpers"; import { GetServer } from "../Server/AllServers"; diff --git a/src/StockMarket/StockMarket.tsx b/src/StockMarket/StockMarket.tsx index 3fc17595e..119d272b4 100644 --- a/src/StockMarket/StockMarket.tsx +++ b/src/StockMarket/StockMarket.tsx @@ -14,7 +14,7 @@ import { WorkerScript } from "../Netscript/WorkerScript"; import { IMap } from "../types"; import { EventEmitter } from "../utils/EventEmitter"; -import { numeralWrapper } from ".././ui/numeralFormat"; +import { numeralWrapper } from "../ui/numeralFormat"; import { dialogBoxCreate } from "../ui/React/DialogBox"; import { Reviver } from "../utils/JSONReviver"; diff --git a/src/Terminal/commands/ls.tsx b/src/Terminal/commands/ls.tsx index a7ed3027d..738f23f00 100644 --- a/src/Terminal/commands/ls.tsx +++ b/src/Terminal/commands/ls.tsx @@ -5,7 +5,7 @@ import { toString } from "lodash"; import React from "react"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { BaseServer } from "../../Server/BaseServer"; -import { evaluateDirectoryPath, getFirstParentDirectory, isValidDirectoryPath } from "../../Terminal/DirectoryHelpers"; +import { evaluateDirectoryPath, getFirstParentDirectory, isValidDirectoryPath } from "../DirectoryHelpers"; import { IRouter } from "../../ui/Router"; import { ITerminal } from "../ITerminal"; diff --git a/src/ui/ActiveScripts/RecentScriptAccordion.tsx b/src/ui/ActiveScripts/RecentScriptAccordion.tsx index d91d33dfe..49e687540 100644 --- a/src/ui/ActiveScripts/RecentScriptAccordion.tsx +++ b/src/ui/ActiveScripts/RecentScriptAccordion.tsx @@ -26,7 +26,7 @@ import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFuncti import { arrayToString } from "../../utils/helpers/arrayToString"; import { Money } from "../React/Money"; import { MoneyRate } from "../React/MoneyRate"; -import { RecentScript } from "../..//Netscript/RecentScripts"; +import { RecentScript } from "../../Netscript/RecentScripts"; import { LogBoxEvents } from "../React/LogBoxManager"; const useStyles = makeStyles({ diff --git a/src/ui/CharacterStats.tsx b/src/ui/CharacterStats.tsx index 667db7fce..28b8b1731 100644 --- a/src/ui/CharacterStats.tsx +++ b/src/ui/CharacterStats.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; -import { numeralWrapper } from "../ui/numeralFormat"; +import { numeralWrapper } from "./numeralFormat"; import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { SourceFileFlags } from "../SourceFile/SourceFileFlags"; diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 5dc290211..181bdfee1 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -44,7 +44,7 @@ import { CorporationRoot } from "../Corporation/ui/CorporationRoot"; import { InfiltrationRoot } from "../Infiltration/ui/InfiltrationRoot"; import { ResleeveRoot } from "../PersonObjects/Resleeving/ui/ResleeveRoot"; import { WorkInProgressRoot } from "./WorkInProgressRoot"; -import { GameOptionsRoot } from "../ui/React/GameOptionsRoot"; +import { GameOptionsRoot } from "./React/GameOptionsRoot"; import { SleeveRoot } from "../PersonObjects/Sleeve/ui/SleeveRoot"; import { HacknetRoot } from "../Hacknet/ui/HacknetRoot"; import { GenericLocation } from "../Locations/ui/GenericLocation"; @@ -54,7 +54,7 @@ import { Root as ScriptEditorRoot } from "../ScriptEditor/ui/ScriptEditorRoot"; import { MilestonesRoot } from "../Milestones/ui/MilestonesRoot"; import { TerminalRoot } from "../Terminal/ui/TerminalRoot"; import { TutorialRoot } from "../Tutorial/ui/TutorialRoot"; -import { ActiveScriptsRoot } from "../ui/ActiveScripts/ActiveScriptsRoot"; +import { ActiveScriptsRoot } from "./ActiveScripts/ActiveScriptsRoot"; import { FactionsRoot } from "../Faction/ui/FactionsRoot"; import { FactionRoot } from "../Faction/ui/FactionRoot"; import { CharacterStats } from "./CharacterStats"; diff --git a/src/ui/React/AlertManager.tsx b/src/ui/React/AlertManager.tsx index d780a49cc..b1d7f5f0f 100644 --- a/src/ui/React/AlertManager.tsx +++ b/src/ui/React/AlertManager.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import { EventEmitter } from "../../utils/EventEmitter"; -import { Modal } from "../../ui/React/Modal"; +import { Modal } from "./Modal"; import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; import {sha256} from "js-sha256"; diff --git a/src/ui/React/CharacterOverview.tsx b/src/ui/React/CharacterOverview.tsx index e5beed047..b3c342665 100644 --- a/src/ui/React/CharacterOverview.tsx +++ b/src/ui/React/CharacterOverview.tsx @@ -4,7 +4,7 @@ import React, { useState, useEffect } from "react"; import { Theme, useTheme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; import createStyles from "@mui/styles/createStyles"; -import { numeralWrapper } from "../../ui/numeralFormat"; +import { numeralWrapper } from "../numeralFormat"; import { Reputation } from "./Reputation"; import { KillScriptsModal } from "./KillScriptsModal"; import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; diff --git a/src/ui/React/Favor.tsx b/src/ui/React/Favor.tsx index 29961cb8e..da3805f8f 100644 --- a/src/ui/React/Favor.tsx +++ b/src/ui/React/Favor.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; +import { numeralWrapper } from "../numeralFormat"; import { Theme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; import createStyles from "@mui/styles/createStyles"; diff --git a/src/ui/React/HashRate.tsx b/src/ui/React/HashRate.tsx index 1d4b19b0d..22990bfdf 100644 --- a/src/ui/React/HashRate.tsx +++ b/src/ui/React/HashRate.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; -import { Hashes } from "../../ui/React/Hashes"; +import { numeralWrapper } from "../numeralFormat"; +import { Hashes } from "./Hashes"; export function HashRate({ hashes }: { hashes: number }): React.ReactElement { return ; diff --git a/src/ui/React/Hashes.tsx b/src/ui/React/Hashes.tsx index 2a151defa..dd364b429 100644 --- a/src/ui/React/Hashes.tsx +++ b/src/ui/React/Hashes.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; +import { numeralWrapper } from "../numeralFormat"; import { Theme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; import createStyles from "@mui/styles/createStyles"; diff --git a/src/ui/React/Money.tsx b/src/ui/React/Money.tsx index 9e6a17fa0..90128d001 100644 --- a/src/ui/React/Money.tsx +++ b/src/ui/React/Money.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; +import { numeralWrapper } from "../numeralFormat"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Theme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; diff --git a/src/ui/React/MoneyRate.tsx b/src/ui/React/MoneyRate.tsx index 0e1f92fd6..00f658086 100644 --- a/src/ui/React/MoneyRate.tsx +++ b/src/ui/React/MoneyRate.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; -import { Money } from "../../ui/React/Money"; +import { numeralWrapper } from "../numeralFormat"; +import { Money } from "./Money"; export function MoneyRate({ money }: { money: number }): JSX.Element { return ; diff --git a/src/ui/React/PromptManager.tsx b/src/ui/React/PromptManager.tsx index c2561bc00..6acc669c0 100644 --- a/src/ui/React/PromptManager.tsx +++ b/src/ui/React/PromptManager.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import { EventEmitter } from "../../utils/EventEmitter"; -import { Modal } from "../../ui/React/Modal"; +import { Modal } from "./Modal"; import Typography from "@mui/material/Typography"; import Button from "@mui/material/Button"; diff --git a/src/ui/React/Reputation.tsx b/src/ui/React/Reputation.tsx index 84d2decdc..c9d6ad4d8 100644 --- a/src/ui/React/Reputation.tsx +++ b/src/ui/React/Reputation.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; +import { numeralWrapper } from "../numeralFormat"; import { Theme } from "@mui/material/styles"; import makeStyles from "@mui/styles/makeStyles"; import createStyles from "@mui/styles/createStyles"; diff --git a/src/ui/React/ReputationRate.tsx b/src/ui/React/ReputationRate.tsx index 58ff16097..21c0b3fb3 100644 --- a/src/ui/React/ReputationRate.tsx +++ b/src/ui/React/ReputationRate.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { numeralWrapper } from "../../ui/numeralFormat"; -import { Reputation } from "../../ui/React/Reputation"; +import { numeralWrapper } from "../numeralFormat"; +import { Reputation } from "./Reputation"; export function ReputationRate({ reputation }: { reputation: number }): React.ReactElement { return ;