diff --git a/src/Augmentation/Augmentation.tsx b/src/Augmentation/Augmentation.tsx index 466e17279..6ee656375 100644 --- a/src/Augmentation/Augmentation.tsx +++ b/src/Augmentation/Augmentation.tsx @@ -8,7 +8,7 @@ import { Factions } from "../Faction/Factions"; import { numeralWrapper } from "../ui/numeralFormat"; import { Money } from "../ui/React/Money"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export interface IConstructorParams { info: string | JSX.Element; diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 1ca7b6e7d..37fd019c7 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -11,8 +11,8 @@ import { prestigeAugmentation } from "../Prestige"; import { Programs } from "../Programs/Programs"; import { SourceFileFlags } from "../SourceFile/SourceFileFlags"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { clearObject } from "../../utils/helpers/clearObject"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { clearObject } from "../utils/helpers/clearObject"; import { WHRNG } from "../Casino/RNG"; diff --git a/src/Bladeburner/Action.ts b/src/Bladeburner/Action.ts index 70218e882..70fbf2898 100644 --- a/src/Bladeburner/Action.ts +++ b/src/Bladeburner/Action.ts @@ -1,7 +1,7 @@ import { Player } from "../Player"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { addOffset } from "../../utils/helpers/addOffset"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { addOffset } from "../utils/helpers/addOffset"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; import { BladeburnerConstants } from "./data/Constants"; import { IBladeburner } from "./IBladeburner"; import { IAction, ISuccessChanceParams } from "./IAction"; diff --git a/src/Bladeburner/ActionIdentifier.ts b/src/Bladeburner/ActionIdentifier.ts index efbb01202..07a3c9634 100644 --- a/src/Bladeburner/ActionIdentifier.ts +++ b/src/Bladeburner/ActionIdentifier.ts @@ -1,5 +1,5 @@ import { IActionIdentifier } from "./IActionIdentifier"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; interface IParams { name?: string; diff --git a/src/Bladeburner/BlackOperation.ts b/src/Bladeburner/BlackOperation.ts index 86da39929..8bc9958ca 100644 --- a/src/Bladeburner/BlackOperation.ts +++ b/src/Bladeburner/BlackOperation.ts @@ -1,5 +1,5 @@ import { Operation, IOperationParams } from "./Operation"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class BlackOperation extends Operation { constructor(params: IOperationParams | null = null) { diff --git a/src/Bladeburner/Bladeburner.ts b/src/Bladeburner/Bladeburner.ts index b082990cf..3a3e61510 100644 --- a/src/Bladeburner/Bladeburner.ts +++ b/src/Bladeburner/Bladeburner.ts @@ -1,4 +1,4 @@ -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; import { IBladeburner } from "./IBladeburner"; import { IActionIdentifier } from "./IActionIdentifier"; import { ActionIdentifier } from "./ActionIdentifier"; @@ -9,7 +9,7 @@ import { BlackOperation } from "./BlackOperation"; import { Operation } from "./Operation"; import { Contract } from "./Contract"; import { GeneralActions } from "./GeneralActions"; -import { formatNumber } from "../../utils/StringHelperFunctions"; +import { formatNumber } from "../utils/StringHelperFunctions"; import { Skills } from "./Skills"; import { Skill } from "./Skill"; import { City } from "./City"; @@ -17,21 +17,21 @@ import { IAction } from "./IAction"; import { IPlayer } from "../PersonObjects/IPlayer"; import { IRouter } from "../ui/Router"; import { ConsoleHelpText } from "./data/Help"; -import { exceptionAlert } from "../../utils/helpers/exceptionAlert"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { exceptionAlert } from "../utils/helpers/exceptionAlert"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; import { BladeburnerConstants } from "./data/Constants"; import { numeralWrapper } from "../ui/numeralFormat"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; -import { addOffset } from "../../utils/helpers/addOffset"; +import { addOffset } from "../utils/helpers/addOffset"; import { Faction } from "../Faction/Faction"; import { Factions, factionExists } from "../Faction/Factions"; import { calculateHospitalizationCost } from "../Hospital/Hospital"; import { redPillFlag } from "../RedPill"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; import { Settings } from "../Settings/Settings"; import { Augmentations } from "../Augmentation/Augmentations"; import { AugmentationNames } from "../Augmentation/data/AugmentationNames"; -import { getTimestamp } from "../../utils/helpers/getTimestamp"; +import { getTimestamp } from "../utils/helpers/getTimestamp"; import { joinFaction } from "../Faction/FactionHelpers"; import { WorkerScript } from "../Netscript/WorkerScript"; diff --git a/src/Bladeburner/City.ts b/src/Bladeburner/City.ts index 029a0fd7f..844a059a8 100644 --- a/src/Bladeburner/City.ts +++ b/src/Bladeburner/City.ts @@ -1,7 +1,7 @@ import { BladeburnerConstants } from "./data/Constants"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { addOffset } from "../../utils/helpers/addOffset"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { addOffset } from "../utils/helpers/addOffset"; interface IChangePopulationByCountParams { estChange: number; diff --git a/src/Bladeburner/Contract.ts b/src/Bladeburner/Contract.ts index c1e68b81d..aea403f81 100644 --- a/src/Bladeburner/Contract.ts +++ b/src/Bladeburner/Contract.ts @@ -1,6 +1,6 @@ import { IBladeburner } from "./IBladeburner"; import { Action, IActionParams } from "./Action"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class Contract extends Action { constructor(params: IActionParams | null = null) { diff --git a/src/Bladeburner/Operation.ts b/src/Bladeburner/Operation.ts index fe2052f4a..d08a5ce89 100644 --- a/src/Bladeburner/Operation.ts +++ b/src/Bladeburner/Operation.ts @@ -1,7 +1,7 @@ import { IBladeburner } from "./IBladeburner"; import { BladeburnerConstants } from "./data/Constants"; import { Action, IActionParams } from "./Action"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export interface IOperationParams extends IActionParams { reqdRank?: number; diff --git a/src/Bladeburner/data/Growths.ts b/src/Bladeburner/data/Growths.ts index ea210f762..c80968c2d 100644 --- a/src/Bladeburner/data/Growths.ts +++ b/src/Bladeburner/data/Growths.ts @@ -1,4 +1,4 @@ -import { getRandomInt } from "../../../utils/helpers/getRandomInt"; +import { getRandomInt } from "../../utils/helpers/getRandomInt"; export const Growths: { [key: string]: (() => number) | undefined; diff --git a/src/Bladeburner/ui/BlackOpElem.tsx b/src/Bladeburner/ui/BlackOpElem.tsx index 760508af0..3b6841bc0 100644 --- a/src/Bladeburner/ui/BlackOpElem.tsx +++ b/src/Bladeburner/ui/BlackOpElem.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import { formatNumber, convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { ActionTypes } from "../data/ActionTypes"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; import { stealthIcon, killIcon } from "../data/Icons"; import { createPopup } from "../../ui/React/createPopup"; import { TeamSizePopup } from "./TeamSizePopup"; diff --git a/src/Bladeburner/ui/BladeburnerCinematic.tsx b/src/Bladeburner/ui/BladeburnerCinematic.tsx index 69b0ec4ab..93a612d0c 100644 --- a/src/Bladeburner/ui/BladeburnerCinematic.tsx +++ b/src/Bladeburner/ui/BladeburnerCinematic.tsx @@ -1,7 +1,7 @@ import React from "react"; import { use } from "../../ui/Context"; import { CinematicText } from "../../ui/React/CinematicText"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; export function BladeburnerCinematic(): React.ReactElement { const router = use.Router(); diff --git a/src/Bladeburner/ui/ContractElem.tsx b/src/Bladeburner/ui/ContractElem.tsx index 19531e5a5..14352f72d 100644 --- a/src/Bladeburner/ui/ContractElem.tsx +++ b/src/Bladeburner/ui/ContractElem.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { ActionTypes } from "../data/ActionTypes"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; -import { formatNumber, convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; +import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { stealthIcon, killIcon } from "../data/Icons"; import { BladeburnerConstants } from "../data/Constants"; import { IBladeburner } from "../IBladeburner"; diff --git a/src/Bladeburner/ui/GeneralActionElem.tsx b/src/Bladeburner/ui/GeneralActionElem.tsx index 9e5db3f8d..b2a3ac6cd 100644 --- a/src/Bladeburner/ui/GeneralActionElem.tsx +++ b/src/Bladeburner/ui/GeneralActionElem.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { ActionTypes } from "../data/ActionTypes"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; -import { formatNumber, convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; +import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { IBladeburner } from "../IBladeburner"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { CopyableText } from "../../ui/React/CopyableText"; diff --git a/src/Bladeburner/ui/OperationElem.tsx b/src/Bladeburner/ui/OperationElem.tsx index 78b8ebfbe..fe25814e4 100644 --- a/src/Bladeburner/ui/OperationElem.tsx +++ b/src/Bladeburner/ui/OperationElem.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { ActionTypes } from "../data/ActionTypes"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; -import { formatNumber, convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; +import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { stealthIcon, killIcon } from "../data/Icons"; import { BladeburnerConstants } from "../data/Constants"; import { createPopup } from "../../ui/React/createPopup"; diff --git a/src/Bladeburner/ui/SkillElem.tsx b/src/Bladeburner/ui/SkillElem.tsx index b362f1408..454ae51f1 100644 --- a/src/Bladeburner/ui/SkillElem.tsx +++ b/src/Bladeburner/ui/SkillElem.tsx @@ -1,6 +1,6 @@ import React from "react"; import { CopyableText } from "../../ui/React/CopyableText"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { IBladeburner } from "../IBladeburner"; interface IProps { diff --git a/src/Bladeburner/ui/SkillPage.tsx b/src/Bladeburner/ui/SkillPage.tsx index fd36e8f5a..c1b3a5b2c 100644 --- a/src/Bladeburner/ui/SkillPage.tsx +++ b/src/Bladeburner/ui/SkillPage.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { SkillList } from "./SkillList"; import { BladeburnerConstants } from "../data/Constants"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { IBladeburner } from "../IBladeburner"; interface IProps { diff --git a/src/Bladeburner/ui/Stats.tsx b/src/Bladeburner/ui/Stats.tsx index 09a0e5637..e9dd366a6 100644 --- a/src/Bladeburner/ui/Stats.tsx +++ b/src/Bladeburner/ui/Stats.tsx @@ -1,11 +1,11 @@ import React, { useState, useEffect } from "react"; -import { formatNumber, convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { BladeburnerConstants } from "../data/Constants"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Money } from "../../ui/React/Money"; import { StatsTable } from "../../ui/React/StatsTable"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { createPopup } from "../../ui/React/createPopup"; import { Factions } from "../../Faction/Factions"; import { IRouter } from "../../ui/Router"; diff --git a/src/Bladeburner/ui/SuccessChance.tsx b/src/Bladeburner/ui/SuccessChance.tsx index 31273541d..dbf611470 100644 --- a/src/Bladeburner/ui/SuccessChance.tsx +++ b/src/Bladeburner/ui/SuccessChance.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; interface IProps { chance: number[]; diff --git a/src/Bladeburner/ui/TeamSizePopup.tsx b/src/Bladeburner/ui/TeamSizePopup.tsx index d58a2ec22..56573af8e 100644 --- a/src/Bladeburner/ui/TeamSizePopup.tsx +++ b/src/Bladeburner/ui/TeamSizePopup.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { Action } from "../Action"; import { IBladeburner } from "../IBladeburner"; diff --git a/src/Casino/Game.tsx b/src/Casino/Game.tsx index 85b2ac1cb..404356241 100644 --- a/src/Casino/Game.tsx +++ b/src/Casino/Game.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { IPlayer } from "../PersonObjects/IPlayer"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; const gainLimit = 10e9; diff --git a/src/CodingContractGenerator.ts b/src/CodingContractGenerator.ts index 502ae7dfd..93d499781 100644 --- a/src/CodingContractGenerator.ts +++ b/src/CodingContractGenerator.ts @@ -12,7 +12,7 @@ import { SpecialServerNames } from "./Server/SpecialServerIps"; import { Server } from "./Server/Server"; import { HacknetServer } from "./Hacknet/HacknetServer"; -import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { getRandomInt } from "./utils/helpers/getRandomInt"; export function generateRandomContract(): void { // First select a random problem type diff --git a/src/CodingContracts.ts b/src/CodingContracts.ts index 0feb52320..a0f658801 100644 --- a/src/CodingContracts.ts +++ b/src/CodingContracts.ts @@ -2,7 +2,7 @@ import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc import { IMap } from "./types"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "./utils/JSONReviver"; import { createPopup, removePopup } from "./ui/React/createPopup"; import { CodingContractPopup } from "./ui/React/CodingContractPopup"; diff --git a/src/Company/Companies.ts b/src/Company/Companies.ts index 09abf8373..a8a742a4c 100644 --- a/src/Company/Companies.ts +++ b/src/Company/Companies.ts @@ -2,7 +2,7 @@ import { companiesMetadata } from "./data/CompaniesMetadata"; import { Company, IConstructorParams } from "./Company"; import { IMap } from "../types"; -import { Reviver } from "../../utils/JSONReviver"; +import { Reviver } from "../utils/JSONReviver"; export let Companies: IMap = {}; diff --git a/src/Company/Company.ts b/src/Company/Company.ts index 4ef18400c..3a1e65c2a 100644 --- a/src/Company/Company.ts +++ b/src/Company/Company.ts @@ -4,7 +4,7 @@ import * as posNames from "./data/companypositionnames"; import { CONSTANTS } from "../Constants"; import { IMap } from "../types"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export interface IConstructorParams { name: string; diff --git a/src/Corporation/Corporation.tsx b/src/Corporation/Corporation.tsx index 465babe7a..0a0fcd7e8 100644 --- a/src/Corporation/Corporation.tsx +++ b/src/Corporation/Corporation.tsx @@ -10,9 +10,9 @@ import { showLiterature } from "../Literature/LiteratureHelpers"; import { LiteratureNames } from "../Literature/data/LiteratureNames"; import { IPlayer } from "../PersonObjects/IPlayer"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; -import { isString } from "../../utils/helpers/isString"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; +import { isString } from "../utils/helpers/isString"; // UI Related Imports diff --git a/src/Corporation/CorporationState.ts b/src/Corporation/CorporationState.ts index f9195335a..b6c7903ba 100644 --- a/src/Corporation/CorporationState.ts +++ b/src/Corporation/CorporationState.ts @@ -1,4 +1,4 @@ -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; // Array of all valid states const AllCorporationStates: string[] = ["START", "PURCHASE", "PRODUCTION", "SALE", "EXPORT"]; diff --git a/src/Corporation/Employee.ts b/src/Corporation/Employee.ts index 80589eecf..e38522009 100644 --- a/src/Corporation/Employee.ts +++ b/src/Corporation/Employee.ts @@ -1,11 +1,11 @@ import { CorporationConstants } from "./data/Constants"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { createElement } from "../../utils/uiHelpers/createElement"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { createElement } from "../ui/uiHelpers/createElement"; import { EmployeePositions } from "./EmployeePositions"; import { ICorporation } from "./ICorporation"; import { numeralWrapper } from "../ui/numeralFormat"; -import { formatNumber } from "../../utils/StringHelperFunctions"; +import { formatNumber } from "../utils/StringHelperFunctions"; import { OfficeSpace } from "./OfficeSpace"; import { IIndustry } from "./IIndustry"; diff --git a/src/Corporation/Industry.ts b/src/Corporation/Industry.ts index 20cc318bb..5a895b083 100644 --- a/src/Corporation/Industry.ts +++ b/src/Corporation/Industry.ts @@ -1,22 +1,22 @@ -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; import { CityName } from "../Locations/data/CityNames"; import Decimal from "decimal.js"; import { Industries, IndustryStartingCosts, IndustryResearchTrees } from "./IndustryData"; import { CorporationConstants } from "./data/Constants"; import { EmployeePositions } from "./EmployeePositions"; import { Material } from "./Material"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; import { calculateEffectWithFactors } from "../utils/calculateEffectWithFactors"; import { OfficeSpace } from "./OfficeSpace"; import { Product } from "./Product"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { isString } from "../../utils/helpers/isString"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { isString } from "../utils/helpers/isString"; import { MaterialSizes } from "./MaterialSizes"; import { Warehouse } from "./Warehouse"; import { ICorporation } from "./ICorporation"; import { IIndustry } from "./IIndustry"; import { IndustryUpgrade, IndustryUpgrades } from "./IndustryUpgrades"; -import { formatNumber } from "../../utils/StringHelperFunctions"; +import { formatNumber } from "../utils/StringHelperFunctions"; interface IParams { name?: string; diff --git a/src/Corporation/Material.ts b/src/Corporation/Material.ts index fe394500a..578e87b96 100644 --- a/src/Corporation/Material.ts +++ b/src/Corporation/Material.ts @@ -1,4 +1,4 @@ -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; import { Export } from "./Export"; interface IConstructorParams { diff --git a/src/Corporation/OfficeSpace.ts b/src/Corporation/OfficeSpace.ts index d0f3da7b0..b66775ba9 100644 --- a/src/Corporation/OfficeSpace.ts +++ b/src/Corporation/OfficeSpace.ts @@ -1,8 +1,8 @@ import { EmployeePositions } from "./EmployeePositions"; import { CorporationConstants } from "./data/Constants"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { generateRandomString } from "../../utils/StringHelperFunctions"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { generateRandomString } from "../utils/StringHelperFunctions"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; import { Employee } from "./Employee"; import { IIndustry } from "./IIndustry"; import { ICorporation } from "./ICorporation"; diff --git a/src/Corporation/Product.ts b/src/Corporation/Product.ts index d7743d841..0c81e8670 100644 --- a/src/Corporation/Product.ts +++ b/src/Corporation/Product.ts @@ -6,8 +6,8 @@ import { ProductRatingWeights, IProductRatingWeight } from "./ProductRatingWeigh import { createCityMap } from "../Locations/createCityMap"; import { IMap } from "../types"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; interface IConstructorParams { name?: string; diff --git a/src/Corporation/Warehouse.ts b/src/Corporation/Warehouse.ts index 59553b6f5..381ac9867 100644 --- a/src/Corporation/Warehouse.ts +++ b/src/Corporation/Warehouse.ts @@ -4,8 +4,8 @@ import { IIndustry } from "./IIndustry"; import { MaterialSizes } from "./MaterialSizes"; import { IMap } from "../types"; import { numeralWrapper } from "../ui/numeralFormat"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { exceptionAlert } from "../../utils/helpers/exceptionAlert"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { exceptionAlert } from "../utils/helpers/exceptionAlert"; interface IConstructorParams { corp?: ICorporation; diff --git a/src/Corporation/ui/BribeFactionPopup.tsx b/src/Corporation/ui/BribeFactionPopup.tsx index fddd73aee..3fe8464a4 100644 --- a/src/Corporation/ui/BribeFactionPopup.tsx +++ b/src/Corporation/ui/BribeFactionPopup.tsx @@ -4,7 +4,7 @@ import { Factions } from "../../Faction/Factions"; import { CorporationConstants } from "../data/Constants"; import { numeralWrapper } from "../../ui/numeralFormat"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { ICorporation } from "../ICorporation"; interface IProps { diff --git a/src/Corporation/ui/BuybackSharesPopup.tsx b/src/Corporation/ui/BuybackSharesPopup.tsx index ed9fd7953..3aaa8a4eb 100644 --- a/src/Corporation/ui/BuybackSharesPopup.tsx +++ b/src/Corporation/ui/BuybackSharesPopup.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { removePopup } from "../../ui/React/createPopup"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { ICorporation } from "../ICorporation"; interface IProps { diff --git a/src/Corporation/ui/CreateCorporationPopup.tsx b/src/Corporation/ui/CreateCorporationPopup.tsx index 247fa90a3..daeae26df 100644 --- a/src/Corporation/ui/CreateCorporationPopup.tsx +++ b/src/Corporation/ui/CreateCorporationPopup.tsx @@ -3,7 +3,7 @@ import React, { useState } from "react"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { removePopup } from "../../ui/React/createPopup"; import { Money } from "../../ui/React/Money"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { IRouter } from "../../ui/Router"; interface IProps { diff --git a/src/Corporation/ui/ExpandNewCityPopup.tsx b/src/Corporation/ui/ExpandNewCityPopup.tsx index 3e8cfbfb5..6e846c3c0 100644 --- a/src/Corporation/ui/ExpandNewCityPopup.tsx +++ b/src/Corporation/ui/ExpandNewCityPopup.tsx @@ -2,7 +2,7 @@ import React, { useRef } from "react"; import { IIndustry } from "../IIndustry"; import { CorporationConstants } from "../data/Constants"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { ICorporation } from "../ICorporation"; import { NewCity } from "../Actions"; import { MoneyCost } from "./MoneyCost"; diff --git a/src/Corporation/ui/ExportPopup.tsx b/src/Corporation/ui/ExportPopup.tsx index 699f7dc2d..c3dbe28bf 100644 --- a/src/Corporation/ui/ExportPopup.tsx +++ b/src/Corporation/ui/ExportPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { ICorporation } from "../ICorporation"; import { Material } from "../Material"; diff --git a/src/Corporation/ui/GoPublicPopup.tsx b/src/Corporation/ui/GoPublicPopup.tsx index 39043a63f..9410ba0e0 100644 --- a/src/Corporation/ui/GoPublicPopup.tsx +++ b/src/Corporation/ui/GoPublicPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { numeralWrapper } from "../../ui/numeralFormat"; import { ICorporation } from "../ICorporation"; diff --git a/src/Corporation/ui/HireEmployeePopup.tsx b/src/Corporation/ui/HireEmployeePopup.tsx index 690548256..b4c766d9c 100644 --- a/src/Corporation/ui/HireEmployeePopup.tsx +++ b/src/Corporation/ui/HireEmployeePopup.tsx @@ -5,10 +5,10 @@ import { CorporationConstants } from "../data/Constants"; import { ICorporation } from "../ICorporation"; import { OfficeSpace } from "../OfficeSpace"; import { IPlayer } from "../../PersonObjects/IPlayer"; -import { getRandomInt } from "../../../utils/helpers/getRandomInt"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { Employee } from "../Employee"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; interface INameEmployeeProps { office: OfficeSpace; diff --git a/src/Corporation/ui/IndustryOffice.tsx b/src/Corporation/ui/IndustryOffice.tsx index 1448f52fb..82953a9fe 100644 --- a/src/Corporation/ui/IndustryOffice.tsx +++ b/src/Corporation/ui/IndustryOffice.tsx @@ -9,7 +9,7 @@ import { EmployeePositions } from "../EmployeePositions"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { getSelectText } from "../../../utils/uiHelpers/getSelectData"; +import { getSelectText } from "../../ui/uiHelpers/getSelectData"; import { createPopup } from "../../ui/React/createPopup"; import { UpgradeOfficeSizePopup } from "./UpgradeOfficeSizePopup"; import { HireEmployeePopup } from "./HireEmployeePopup"; diff --git a/src/Corporation/ui/IndustryOverview.tsx b/src/Corporation/ui/IndustryOverview.tsx index 34ea97d6a..2b08c1d54 100644 --- a/src/Corporation/ui/IndustryOverview.tsx +++ b/src/Corporation/ui/IndustryOverview.tsx @@ -7,8 +7,8 @@ import { Industries } from "../IndustryData"; import { IndustryUpgrades } from "../IndustryUpgrades"; import { IIndustry } from "../IIndustry"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; import { MakeProductPopup } from "./MakeProductPopup"; import { ResearchPopup } from "./ResearchPopup"; import { createPopup } from "../../ui/React/createPopup"; diff --git a/src/Corporation/ui/IndustryWarehouse.tsx b/src/Corporation/ui/IndustryWarehouse.tsx index 864652ad0..fdeabb08c 100644 --- a/src/Corporation/ui/IndustryWarehouse.tsx +++ b/src/Corporation/ui/IndustryWarehouse.tsx @@ -20,7 +20,7 @@ import { SmartSupplyPopup } from "./SmartSupplyPopup"; import { numeralWrapper } from "../../ui/numeralFormat"; import { createPopup } from "../../ui/React/createPopup"; -import { isString } from "../../../utils/helpers/isString"; +import { isString } from "../../utils/helpers/isString"; import { ICorporation } from "../ICorporation"; import { IIndustry } from "../IIndustry"; import { IPlayer } from "../../PersonObjects/IPlayer"; diff --git a/src/Corporation/ui/IssueDividendsPopup.tsx b/src/Corporation/ui/IssueDividendsPopup.tsx index 89cfc5019..42aadd432 100644 --- a/src/Corporation/ui/IssueDividendsPopup.tsx +++ b/src/Corporation/ui/IssueDividendsPopup.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { CorporationConstants } from "../data/Constants"; import { ICorporation } from "../ICorporation"; import { IssueDividends } from "../Actions"; diff --git a/src/Corporation/ui/IssueNewSharesPopup.tsx b/src/Corporation/ui/IssueNewSharesPopup.tsx index 8ecf7abe0..1b1eca398 100644 --- a/src/Corporation/ui/IssueNewSharesPopup.tsx +++ b/src/Corporation/ui/IssueNewSharesPopup.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; -import { getRandomInt } from "../../../utils/helpers/getRandomInt"; +import { getRandomInt } from "../../utils/helpers/getRandomInt"; import { CorporationConstants } from "../data/Constants"; import { ICorporation } from "../ICorporation"; diff --git a/src/Corporation/ui/LevelableUpgrade.tsx b/src/Corporation/ui/LevelableUpgrade.tsx index 3d4ef2df0..6cd8d261f 100644 --- a/src/Corporation/ui/LevelableUpgrade.tsx +++ b/src/Corporation/ui/LevelableUpgrade.tsx @@ -1,7 +1,7 @@ // React components for the levelable upgrade buttons on the overview panel import React from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { ICorporation } from "../ICorporation"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { CorporationUpgrade } from "../data/CorporationUpgrades"; diff --git a/src/Corporation/ui/MakeProductPopup.tsx b/src/Corporation/ui/MakeProductPopup.tsx index 13d2a768d..439e9a078 100644 --- a/src/Corporation/ui/MakeProductPopup.tsx +++ b/src/Corporation/ui/MakeProductPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { Industries } from "../IndustryData"; import { ICorporation } from "../ICorporation"; diff --git a/src/Corporation/ui/NewIndustryPopup.tsx b/src/Corporation/ui/NewIndustryPopup.tsx index ec510a4a5..c217a7015 100644 --- a/src/Corporation/ui/NewIndustryPopup.tsx +++ b/src/Corporation/ui/NewIndustryPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { Industries, IndustryDescriptions } from "../IndustryData"; import { ICorporation } from "../ICorporation"; diff --git a/src/Corporation/ui/Overview.tsx b/src/Corporation/ui/Overview.tsx index 824aa956a..4062dd1f1 100644 --- a/src/Corporation/ui/Overview.tsx +++ b/src/Corporation/ui/Overview.tsx @@ -16,7 +16,7 @@ import { CorporationUpgrade, CorporationUpgrades } from "../data/CorporationUpgr import { CONSTANTS } from "../../Constants"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { createPopup } from "../../ui/React/createPopup"; import { Money } from "../../ui/React/Money"; import { IPlayer } from "../../PersonObjects/IPlayer"; diff --git a/src/Corporation/ui/PurchaseMaterialPopup.tsx b/src/Corporation/ui/PurchaseMaterialPopup.tsx index 1649cfe2f..00de1d7d8 100644 --- a/src/Corporation/ui/PurchaseMaterialPopup.tsx +++ b/src/Corporation/ui/PurchaseMaterialPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { MaterialSizes } from "../MaterialSizes"; import { Warehouse } from "../Warehouse"; diff --git a/src/Corporation/ui/ResearchPopup.tsx b/src/Corporation/ui/ResearchPopup.tsx index a2bac8800..294d24a2b 100644 --- a/src/Corporation/ui/ResearchPopup.tsx +++ b/src/Corporation/ui/ResearchPopup.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { IndustryResearchTrees } from "../IndustryData"; import { CorporationConstants } from "../data/Constants"; diff --git a/src/Corporation/ui/SellMaterialPopup.tsx b/src/Corporation/ui/SellMaterialPopup.tsx index 61dff81d0..6a07e30a4 100644 --- a/src/Corporation/ui/SellMaterialPopup.tsx +++ b/src/Corporation/ui/SellMaterialPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { ICorporation } from "../ICorporation"; import { Material } from "../Material"; diff --git a/src/Corporation/ui/SellProductPopup.tsx b/src/Corporation/ui/SellProductPopup.tsx index f24e70c55..089b5469b 100644 --- a/src/Corporation/ui/SellProductPopup.tsx +++ b/src/Corporation/ui/SellProductPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { removePopup } from "../../ui/React/createPopup"; import { Product } from "../Product"; import { SellProduct } from "../Actions"; diff --git a/src/Corporation/ui/SellSharesPopup.tsx b/src/Corporation/ui/SellSharesPopup.tsx index b48bd9296..c3b4d248a 100644 --- a/src/Corporation/ui/SellSharesPopup.tsx +++ b/src/Corporation/ui/SellSharesPopup.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { removePopup } from "../../ui/React/createPopup"; import { CorporationConstants } from "../data/Constants"; diff --git a/src/Corporation/ui/SmartSupplyPopup.tsx b/src/Corporation/ui/SmartSupplyPopup.tsx index 049307a18..50554c030 100644 --- a/src/Corporation/ui/SmartSupplyPopup.tsx +++ b/src/Corporation/ui/SmartSupplyPopup.tsx @@ -6,7 +6,7 @@ import { IIndustry } from "../IIndustry"; import { SetSmartSupply, SetSmartSupplyUseLeftovers } from "../Actions"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Material } from "../Material"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; interface ILeftoverProps { matName: string; diff --git a/src/Corporation/ui/ThrowPartyPopup.tsx b/src/Corporation/ui/ThrowPartyPopup.tsx index 0899eef24..126bcc0da 100644 --- a/src/Corporation/ui/ThrowPartyPopup.tsx +++ b/src/Corporation/ui/ThrowPartyPopup.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { removePopup } from "../../ui/React/createPopup"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { OfficeSpace } from "../OfficeSpace"; import { ICorporation } from "../ICorporation"; import { ThrowParty } from "../Actions"; diff --git a/src/Corporation/ui/UnlockUpgrade.tsx b/src/Corporation/ui/UnlockUpgrade.tsx index c9fe5b5bf..6435a1ea7 100644 --- a/src/Corporation/ui/UnlockUpgrade.tsx +++ b/src/Corporation/ui/UnlockUpgrade.tsx @@ -1,7 +1,7 @@ // React Components for the Unlock upgrade buttons on the overview page import React from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { CorporationUnlockUpgrade } from "../data/CorporationUnlockUpgrades"; import { ICorporation } from "../ICorporation"; import { IPlayer } from "../../PersonObjects/IPlayer"; diff --git a/src/Corporation/ui/UpgradeOfficeSizePopup.tsx b/src/Corporation/ui/UpgradeOfficeSizePopup.tsx index 3c344a7dd..3a48d922a 100644 --- a/src/Corporation/ui/UpgradeOfficeSizePopup.tsx +++ b/src/Corporation/ui/UpgradeOfficeSizePopup.tsx @@ -1,7 +1,7 @@ import React from "react"; import { removePopup } from "../../ui/React/createPopup"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { CorporationConstants } from "../data/Constants"; import { OfficeSpace } from "../OfficeSpace"; import { ICorporation } from "../ICorporation"; diff --git a/src/Crime/CrimeHelpers.ts b/src/Crime/CrimeHelpers.ts index 05bdc2267..e42d141c5 100644 --- a/src/Crime/CrimeHelpers.ts +++ b/src/Crime/CrimeHelpers.ts @@ -2,7 +2,7 @@ import { Crimes } from "./Crimes"; import { Crime } from "./Crime"; import { IPlayer } from "../PersonObjects/IPlayer"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; export function determineCrimeSuccess(p: IPlayer, type: string): boolean { let chance = 0; diff --git a/src/DarkWeb/DarkWeb.tsx b/src/DarkWeb/DarkWeb.tsx index 2e339946b..c9ef01e82 100644 --- a/src/DarkWeb/DarkWeb.tsx +++ b/src/DarkWeb/DarkWeb.tsx @@ -5,7 +5,7 @@ import { Terminal } from "../Terminal"; import { SpecialServerIps } from "../Server/SpecialServerIps"; import { numeralWrapper } from "../ui/numeralFormat"; -import { isValidIPAddress } from "../../utils/helpers/isValidIPAddress"; +import { isValidIPAddress } from "../utils/helpers/isValidIPAddress"; //Posts a "help" message if connected to DarkWeb export function checkIfConnectedToDarkweb(): void { diff --git a/src/DevMenu/ui/StockMarket.tsx b/src/DevMenu/ui/StockMarket.tsx index c98e175c7..f624f68f8 100644 --- a/src/DevMenu/ui/StockMarket.tsx +++ b/src/DevMenu/ui/StockMarket.tsx @@ -8,7 +8,7 @@ import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import Button from "@mui/material/Button"; import TextField from "@mui/material/TextField"; import { Money } from "../../ui/React/Money"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { StockMarket as SM } from "../../StockMarket/StockMarket"; import { Stock } from "../../StockMarket/Stock"; diff --git a/src/Faction/Faction.ts b/src/Faction/Faction.ts index 0e295ff61..6604e8465 100644 --- a/src/Faction/Faction.ts +++ b/src/Faction/Faction.ts @@ -1,6 +1,6 @@ import { FactionInfo, FactionInfos } from "./FactionInfo"; import { favorToRep, repToFavor } from "./formulas/favor"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class Faction { /** diff --git a/src/Faction/FactionHelpers.tsx b/src/Faction/FactionHelpers.tsx index 72354b466..4038df855 100644 --- a/src/Faction/FactionHelpers.tsx +++ b/src/Faction/FactionHelpers.tsx @@ -17,7 +17,7 @@ import { } from "../PersonObjects/formulas/reputation"; import { SourceFileFlags } from "../SourceFile/SourceFileFlags"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; import { createPopup } from "../ui/React/createPopup"; import { InvitationPopup } from "./ui/InvitationPopup"; diff --git a/src/Faction/Factions.ts b/src/Faction/Factions.ts index c5874b5ae..7e0aa7a47 100644 --- a/src/Faction/Factions.ts +++ b/src/Faction/Factions.ts @@ -7,7 +7,7 @@ import { FactionInfos } from "./FactionInfo"; import { IMap } from "../types"; -import { Reviver } from "../../utils/JSONReviver"; +import { Reviver } from "../utils/JSONReviver"; export let Factions: IMap = {}; diff --git a/src/Faction/ui/DonateOption.tsx b/src/Faction/ui/DonateOption.tsx index d421e1ce5..4715c286e 100644 --- a/src/Faction/ui/DonateOption.tsx +++ b/src/Faction/ui/DonateOption.tsx @@ -14,7 +14,7 @@ import { Reputation } from "../../ui/React/Reputation"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { MathComponent } from "mathjax-react"; import Typography from "@mui/material/Typography"; diff --git a/src/Gang/AllGangs.ts b/src/Gang/AllGangs.ts index f2e1a502f..ef9366ad0 100644 --- a/src/Gang/AllGangs.ts +++ b/src/Gang/AllGangs.ts @@ -1,4 +1,4 @@ -import { Reviver } from "../../utils/JSONReviver"; +import { Reviver } from "../utils/JSONReviver"; interface GangTerritory { power: number; diff --git a/src/Gang/Gang.ts b/src/Gang/Gang.ts index 7d9f3d939..47bef1a5d 100644 --- a/src/Gang/Gang.ts +++ b/src/Gang/Gang.ts @@ -7,11 +7,11 @@ import { Faction } from "../Faction/Faction"; import { Factions } from "../Faction/Factions"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; -import { exceptionAlert } from "../../utils/helpers/exceptionAlert"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { exceptionAlert } from "../utils/helpers/exceptionAlert"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; import { GangMemberUpgrade } from "./GangMemberUpgrade"; import { GangConstants } from "./data/Constants"; diff --git a/src/Gang/GangMember.ts b/src/Gang/GangMember.ts index 42a8fd7e7..6449e440e 100644 --- a/src/Gang/GangMember.ts +++ b/src/Gang/GangMember.ts @@ -6,7 +6,7 @@ import { IAscensionResult } from "./IAscensionResult"; import { IPlayer } from "../PersonObjects/IPlayer"; import { AllGangs } from "./AllGangs"; import { IGang } from "./IGang"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; interface IMults { hack: number; diff --git a/src/Gang/ui/AscensionPopup.tsx b/src/Gang/ui/AscensionPopup.tsx index 3a144107c..09476dd6e 100644 --- a/src/Gang/ui/AscensionPopup.tsx +++ b/src/Gang/ui/AscensionPopup.tsx @@ -7,7 +7,7 @@ import { Gang } from "../Gang"; import { GangMember } from "../GangMember"; import { numeralWrapper } from "../../ui/numeralFormat"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; interface IProps { member: GangMember; diff --git a/src/Gang/ui/BonusTime.tsx b/src/Gang/ui/BonusTime.tsx index 55f2c787a..ec309ab4f 100644 --- a/src/Gang/ui/BonusTime.tsx +++ b/src/Gang/ui/BonusTime.tsx @@ -4,7 +4,7 @@ import * as React from "react"; import { Gang } from "../Gang"; import { CONSTANTS } from "../../Constants"; -import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; interface IProps { gang: Gang; diff --git a/src/Gang/ui/GangMemberStats.tsx b/src/Gang/ui/GangMemberStats.tsx index 19354ff6f..167b7dff8 100644 --- a/src/Gang/ui/GangMemberStats.tsx +++ b/src/Gang/ui/GangMemberStats.tsx @@ -3,8 +3,8 @@ * Contains skills and exp. */ import React from "react"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { numeralWrapper } from "../../ui/numeralFormat"; import { createPopup } from "../../ui/React/createPopup"; import { Gang } from "../Gang"; diff --git a/src/Gang/ui/GangMemberUpgradePopup.tsx b/src/Gang/ui/GangMemberUpgradePopup.tsx index e213a3471..0b615bac4 100644 --- a/src/Gang/ui/GangMemberUpgradePopup.tsx +++ b/src/Gang/ui/GangMemberUpgradePopup.tsx @@ -2,7 +2,7 @@ * React Component for the popup that manages gang members upgrades */ import React, { useState, useEffect } from "react"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { numeralWrapper } from "../../ui/numeralFormat"; import { GangMemberUpgrades } from "../GangMemberUpgrades"; import { GangMemberUpgrade } from "../GangMemberUpgrade"; diff --git a/src/Gang/ui/GangStats.tsx b/src/Gang/ui/GangStats.tsx index eb8ebad0b..0f53fea22 100644 --- a/src/Gang/ui/GangStats.tsx +++ b/src/Gang/ui/GangStats.tsx @@ -6,7 +6,7 @@ import React from "react"; import { Factions } from "../../Faction/Factions"; import { Gang } from "../Gang"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { numeralWrapper } from "../../ui/numeralFormat"; import { MoneyRate } from "../../ui/React/MoneyRate"; import { Reputation } from "../../ui/React/Reputation"; diff --git a/src/Gang/ui/RecruitButton.tsx b/src/Gang/ui/RecruitButton.tsx index eed9051fc..95a032f16 100644 --- a/src/Gang/ui/RecruitButton.tsx +++ b/src/Gang/ui/RecruitButton.tsx @@ -5,7 +5,7 @@ import React from "react"; import { Gang } from "../Gang"; import { RecruitPopup } from "./RecruitPopup"; import { GangConstants } from "../data/Constants"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { createPopup } from "../../ui/React/createPopup"; interface IProps { diff --git a/src/Gang/ui/RecruitPopup.tsx b/src/Gang/ui/RecruitPopup.tsx index 6af779280..0fa295577 100644 --- a/src/Gang/ui/RecruitPopup.tsx +++ b/src/Gang/ui/RecruitPopup.tsx @@ -4,7 +4,7 @@ import React, { useState } from "react"; import { Gang } from "../Gang"; import { removePopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; interface IRecruitPopupProps { gang: Gang; diff --git a/src/Gang/ui/TerritorySubpage.tsx b/src/Gang/ui/TerritorySubpage.tsx index 497020345..14b2159ec 100644 --- a/src/Gang/ui/TerritorySubpage.tsx +++ b/src/Gang/ui/TerritorySubpage.tsx @@ -3,8 +3,8 @@ */ import React from "react"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; -import { formatNumber } from "../../../utils/StringHelperFunctions"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; +import { formatNumber } from "../../utils/StringHelperFunctions"; import { AllGangs } from "../AllGangs"; import { Gang } from "../Gang"; diff --git a/src/Hacknet/HacknetNode.ts b/src/Hacknet/HacknetNode.ts index 06226bc97..73fcee017 100644 --- a/src/Hacknet/HacknetNode.ts +++ b/src/Hacknet/HacknetNode.ts @@ -16,8 +16,8 @@ import { } from "./formulas/HacknetNodes"; import { HacknetNodeConstants } from "./data/Constants"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class HacknetNode implements IHacknetNode { // Node's number of cores diff --git a/src/Hacknet/HacknetServer.ts b/src/Hacknet/HacknetServer.ts index 45e20f9ee..8da6f37e3 100644 --- a/src/Hacknet/HacknetServer.ts +++ b/src/Hacknet/HacknetServer.ts @@ -16,9 +16,9 @@ import { calculateCacheUpgradeCost, } from "./formulas/HacknetServers"; -import { createRandomIp } from "../../utils/IPAddress"; +import { createRandomIp } from "../utils/IPAddress"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; interface IConstructorParams { adminRights?: boolean; diff --git a/src/Hacknet/HashManager.ts b/src/Hacknet/HashManager.ts index b424a057d..a2fe238f8 100644 --- a/src/Hacknet/HashManager.ts +++ b/src/Hacknet/HashManager.ts @@ -10,7 +10,7 @@ import { HashUpgrades } from "./HashUpgrades"; import { HashUpgrade } from "./HashUpgrade"; import { IMap } from "../types"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class HashManager { // Max number of hashes this can hold. Equal to the sum of capacities of diff --git a/src/Hacknet/ui/HacknetUpgradeElem.tsx b/src/Hacknet/ui/HacknetUpgradeElem.tsx index fa42979df..f822b822e 100644 --- a/src/Hacknet/ui/HacknetUpgradeElem.tsx +++ b/src/Hacknet/ui/HacknetUpgradeElem.tsx @@ -8,7 +8,7 @@ import { IPlayer } from "../../PersonObjects/IPlayer"; import { ServerDropdown, ServerType } from "../../ui/React/ServerDropdown"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { CopyableText } from "../../ui/React/CopyableText"; import { Hashes } from "../../ui/React/Hashes"; diff --git a/src/Literature/LiteratureHelpers.ts b/src/Literature/LiteratureHelpers.ts index f091ec763..0eecc2551 100644 --- a/src/Literature/LiteratureHelpers.ts +++ b/src/Literature/LiteratureHelpers.ts @@ -1,5 +1,5 @@ import { Literatures } from "./Literatures"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; export function showLiterature(fn: string): void { const litObj = Literatures[fn]; diff --git a/src/Locations/LocationsHelpers.tsx b/src/Locations/LocationsHelpers.tsx index 86968ac5a..a11c8fc88 100644 --- a/src/Locations/LocationsHelpers.tsx +++ b/src/Locations/LocationsHelpers.tsx @@ -9,7 +9,7 @@ import { AddToAllServers, createUniqueRandomIp } from "../Server/AllServers"; import { safetlyCreateUniqueServer } from "../Server/ServerHelpers"; import { SpecialServerIps } from "../Server/SpecialServerIps"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; /** * Attempt to purchase a TOR router diff --git a/src/Locations/ui/HospitalLocation.tsx b/src/Locations/ui/HospitalLocation.tsx index 357bbf8f9..75536551b 100644 --- a/src/Locations/ui/HospitalLocation.tsx +++ b/src/Locations/ui/HospitalLocation.tsx @@ -11,7 +11,7 @@ import { getHospitalizationCost } from "../../Hospital/Hospital"; import { AutoupdatingStdButton } from "../../ui/React/AutoupdatingStdButton"; import { Money } from "../../ui/React/Money"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; type IProps = { p: IPlayer; diff --git a/src/Locations/ui/SpecialLocation.tsx b/src/Locations/ui/SpecialLocation.tsx index 57dad3d75..73ba0c717 100644 --- a/src/Locations/ui/SpecialLocation.tsx +++ b/src/Locations/ui/SpecialLocation.tsx @@ -22,7 +22,7 @@ import { use } from "../../ui/Context"; import { AutoupdatingStdButton } from "../../ui/React/AutoupdatingStdButton"; import { StdButton } from "../../ui/React/StdButton"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; type IProps = { loc: Location; diff --git a/src/Locations/ui/TravelAgencyRoot.tsx b/src/Locations/ui/TravelAgencyRoot.tsx index 26cb05b5e..de50df1a1 100644 --- a/src/Locations/ui/TravelAgencyRoot.tsx +++ b/src/Locations/ui/TravelAgencyRoot.tsx @@ -17,7 +17,7 @@ import { StdButton } from "../../ui/React/StdButton"; import { use } from "../../ui/Context"; import { Money } from "../../ui/React/Money"; import { WorldMap } from "../../ui/React/WorldMap"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; diff --git a/src/Message/Message.ts b/src/Message/Message.ts index ce8ad46a6..4e93c0b59 100644 --- a/src/Message/Message.ts +++ b/src/Message/Message.ts @@ -1,4 +1,4 @@ -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; export class Message { // Name of Message file diff --git a/src/Message/MessageHelpers.ts b/src/Message/MessageHelpers.ts index b79ae6a06..32da4fb94 100644 --- a/src/Message/MessageHelpers.ts +++ b/src/Message/MessageHelpers.ts @@ -7,8 +7,8 @@ import { Player } from "../Player"; import { redPillFlag } from "../RedPill"; import { GetServerByHostname } from "../Server/ServerHelpers"; import { Settings } from "../Settings/Settings"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { Reviver } from "../../utils/JSONReviver"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { Reviver } from "../utils/JSONReviver"; //Sends message to player, including a pop up function sendMessage(msg: Message, forced = false): void { diff --git a/src/Missions.jsx b/src/Missions.jsx index 92ff13ca1..73dac72c1 100644 --- a/src/Missions.jsx +++ b/src/Missions.jsx @@ -1,15 +1,15 @@ import { CONSTANTS } from "./Constants"; import { Player } from "./Player"; -import { dialogBoxCreate } from "../utils/DialogBox"; -import { formatNumber } from "../utils/StringHelperFunctions"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; +import { formatNumber } from "./utils/StringHelperFunctions"; import { Reputation } from "./ui/React/Reputation"; -import { addOffset } from "../utils/helpers/addOffset"; -import { getRandomInt } from "../utils/helpers/getRandomInt"; -import { isString } from "../utils/helpers/isString"; +import { addOffset } from "./utils/helpers/addOffset"; +import { getRandomInt } from "./utils/helpers/getRandomInt"; +import { isString } from "./utils/helpers/isString"; -import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners"; +import { clearEventListeners } from "./ui/uiHelpers/clearEventListeners"; import { Router } from "./ui/GameRoot"; // For some reason `jsplumb` needs to be imported exactly like this, diff --git a/src/Netscript/killWorkerScript.ts b/src/Netscript/killWorkerScript.ts index 73f541b69..77fb15466 100644 --- a/src/Netscript/killWorkerScript.ts +++ b/src/Netscript/killWorkerScript.ts @@ -9,8 +9,8 @@ import { WorkerScriptStartStopEventEmitter } from "./WorkerScriptStartStopEventE import { RunningScript } from "../Script/RunningScript"; import { AllServers } from "../Server/AllServers"; -import { compareArrays } from "../../utils/helpers/compareArrays"; -import { roundToTwo } from "../../utils/helpers/roundToTwo"; +import { compareArrays } from "../utils/helpers/compareArrays"; +import { roundToTwo } from "../utils/helpers/roundToTwo"; export function killWorkerScript(runningScriptObj: RunningScript, serverIp: string, rerenderUi?: boolean): boolean; export function killWorkerScript(workerScript: WorkerScript): boolean; diff --git a/src/NetscriptEvaluator.ts b/src/NetscriptEvaluator.ts index a2a6cd760..242dcdd5d 100644 --- a/src/NetscriptEvaluator.ts +++ b/src/NetscriptEvaluator.ts @@ -1,6 +1,6 @@ import { setTimeoutRef } from "./utils/SetTimeoutRef"; -import { isString } from "../utils/helpers/isString"; +import { isString } from "./utils/helpers/isString"; import { AllServers } from "./Server/AllServers"; import { WorkerScript } from "./Netscript/WorkerScript"; diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index dd149ffc2..1be026f79 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -144,15 +144,15 @@ import { Router } from "./ui/GameRoot"; import { numeralWrapper } from "./ui/numeralFormat"; import { setTimeoutRef } from "./utils/SetTimeoutRef"; import { is2DArray } from "./utils/helpers/is2DArray"; -import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "./utils/StringHelperFunctions"; -import { logBoxCreate } from "../utils/LogBox"; -import { arrayToString } from "../utils/helpers/arrayToString"; -import { isString } from "../utils/helpers/isString"; +import { logBoxCreate } from "./ui/React/LogBox"; +import { arrayToString } from "./utils/helpers/arrayToString"; +import { isString } from "./utils/helpers/isString"; -import { createElement } from "../utils/uiHelpers/createElement"; -import { createPopup } from "../utils/uiHelpers/createPopup"; -import { removeElementById } from "../utils/uiHelpers/removeElementById"; +import { createElement } from "./ui/uiHelpers/createElement"; +import { createPopup } from "./ui/uiHelpers/createPopup"; +import { removeElementById } from "./ui/uiHelpers/removeElementById"; import { OfficeSpace } from "./Corporation/OfficeSpace"; import { Employee } from "./Corporation/Employee"; diff --git a/src/NetscriptWorker.ts b/src/NetscriptWorker.ts index feaf7e333..b5c9d01e9 100644 --- a/src/NetscriptWorker.ts +++ b/src/NetscriptWorker.ts @@ -25,10 +25,10 @@ import { setTimeoutRef } from "./utils/SetTimeoutRef"; import { generate } from "escodegen"; -import { dialogBoxCreate } from "../utils/DialogBox"; -import { arrayToString } from "../utils/helpers/arrayToString"; -import { roundToTwo } from "../utils/helpers/roundToTwo"; -import { isString } from "../utils/helpers/isString"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; +import { arrayToString } from "./utils/helpers/arrayToString"; +import { roundToTwo } from "./utils/helpers/roundToTwo"; +import { isString } from "./utils/helpers/isString"; import { sprintf } from "sprintf-js"; import { parse } from "acorn"; diff --git a/src/PersonObjects/Player/PlayerObject.ts b/src/PersonObjects/Player/PlayerObject.ts index fff3ebb2c..1e4257327 100644 --- a/src/PersonObjects/Player/PlayerObject.ts +++ b/src/PersonObjects/Player/PlayerObject.ts @@ -32,7 +32,7 @@ import { HashManager } from "../../Hacknet/HashManager"; import { CityName } from "../../Locations/data/CityNames"; import { MoneySourceTracker } from "../../utils/MoneySourceTracker"; -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../../utils/JSONReviver"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; import Decimal from "decimal.js"; diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 23b7ab756..de5b6b334 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -50,8 +50,8 @@ import Decimal from "decimal.js"; import { numeralWrapper } from "../../ui/numeralFormat"; import { IRouter } from "../../ui/Router"; import { MoneySourceTracker } from "../../utils/MoneySourceTracker"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; -import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { Reputation } from "../../ui/React/Reputation"; import { Money } from "../../ui/React/Money"; diff --git a/src/PersonObjects/Resleeving/Resleeve.ts b/src/PersonObjects/Resleeving/Resleeve.ts index 30691e030..165ab2bda 100644 --- a/src/PersonObjects/Resleeving/Resleeve.ts +++ b/src/PersonObjects/Resleeving/Resleeve.ts @@ -7,7 +7,7 @@ import { Person } from "../Person"; import { Augmentation } from "../../Augmentation/Augmentation"; import { Augmentations } from "../../Augmentation/Augmentations"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; export class Resleeve extends Person { constructor() { diff --git a/src/PersonObjects/Resleeving/Resleeving.ts b/src/PersonObjects/Resleeving/Resleeving.ts index b1a9f8cb6..51aab1115 100644 --- a/src/PersonObjects/Resleeving/Resleeving.ts +++ b/src/PersonObjects/Resleeving/Resleeving.ts @@ -18,7 +18,7 @@ import { Augmentations } from "../../Augmentation/Augmentations"; import { IPlayerOwnedAugmentation, PlayerOwnedAugmentation } from "../../Augmentation/PlayerOwnedAugmentation"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { getRandomInt } from "../../../utils/helpers/getRandomInt"; +import { getRandomInt } from "../../utils/helpers/getRandomInt"; // Executes the actual re-sleeve when one is purchased export function purchaseResleeve(r: Resleeve, p: IPlayer): boolean { diff --git a/src/PersonObjects/Resleeving/ui/ResleeveElem.tsx b/src/PersonObjects/Resleeving/ui/ResleeveElem.tsx index e651af12f..aaac275e3 100644 --- a/src/PersonObjects/Resleeving/ui/ResleeveElem.tsx +++ b/src/PersonObjects/Resleeving/ui/ResleeveElem.tsx @@ -6,7 +6,7 @@ import { purchaseResleeve } from "../Resleeving"; import { Money } from "../../../ui/React/Money"; import { numeralWrapper } from "../../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../../ui/React/DialogBox"; interface IProps { resleeve: Resleeve; diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 7f288c6d6..8b2ee40be 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -32,7 +32,7 @@ import { FactionWorkType } from "../../Faction/FactionWorkTypeEnum"; import { CityName } from "../../Locations/data/CityNames"; import { LocationName } from "../../Locations/data/LocationNames"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; export class Sleeve extends Person { /** diff --git a/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx b/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx index 5411369a9..57c414cc7 100644 --- a/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx +++ b/src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx @@ -14,7 +14,7 @@ import { PopupCloseButton } from "../../../ui/React/PopupCloseButton"; import { StdButton } from "../../../ui/React/StdButton"; import { Money } from "../../../ui/React/Money"; -import { dialogBoxCreate } from "../../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../../ui/React/DialogBox"; interface IProps { closeFn: () => void; diff --git a/src/PersonObjects/Sleeve/ui/SleeveElem.tsx b/src/PersonObjects/Sleeve/ui/SleeveElem.tsx index c7b9529b3..caa82a625 100644 --- a/src/PersonObjects/Sleeve/ui/SleeveElem.tsx +++ b/src/PersonObjects/Sleeve/ui/SleeveElem.tsx @@ -10,9 +10,9 @@ import { Crimes } from "../../../Crime/Crimes"; import { numeralWrapper } from "../../../ui/numeralFormat"; -import { dialogBoxCreate } from "../../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../../ui/React/DialogBox"; -import { createProgressBarText } from "../../../../utils/helpers/createProgressBarText"; +import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; import { createPopup } from "../../../ui/React/createPopup"; diff --git a/src/PersonObjects/Sleeve/ui/StatsElement.tsx b/src/PersonObjects/Sleeve/ui/StatsElement.tsx index c447e47e6..e7d0e88da 100644 --- a/src/PersonObjects/Sleeve/ui/StatsElement.tsx +++ b/src/PersonObjects/Sleeve/ui/StatsElement.tsx @@ -1,7 +1,7 @@ import { Sleeve } from "../Sleeve"; import { numeralWrapper } from "../../../ui/numeralFormat"; import * as React from "react"; -import { convertTimeMsToTimeElapsedString } from "../../../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; import { CONSTANTS } from "../../../Constants"; interface IProps { diff --git a/src/PersonObjects/Sleeve/ui/TravelPopup.tsx b/src/PersonObjects/Sleeve/ui/TravelPopup.tsx index ceee520ce..f93a6e595 100644 --- a/src/PersonObjects/Sleeve/ui/TravelPopup.tsx +++ b/src/PersonObjects/Sleeve/ui/TravelPopup.tsx @@ -7,7 +7,7 @@ import { Money } from "../../../ui/React/Money"; import { WorldMap } from "../../../ui/React/WorldMap"; import { CityName } from "../../../Locations/data/CityNames"; import { Settings } from "../../../Settings/Settings"; -import { dialogBoxCreate } from "../../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../../ui/React/DialogBox"; interface IProps { popupId: string; diff --git a/src/Player.ts b/src/Player.ts index 852d757c5..854da4d32 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -2,7 +2,7 @@ import { Corporation } from "./Corporation/Corporation"; import { PlayerObject } from "./PersonObjects/Player/PlayerObject"; import { sanitizeExploits } from "./Exploits/Exploit"; -import { Reviver } from "../utils/JSONReviver"; +import { Reviver } from "./utils/JSONReviver"; import Decimal from "decimal.js"; diff --git a/src/Prestige.ts b/src/Prestige.ts index 587da996d..3196c38fb 100755 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -24,7 +24,7 @@ import { SpecialServerIps, prestigeSpecialServerIps, SpecialServerNames } from " import { deleteStockMarket, initStockMarket, initSymbolToStockMap } from "./StockMarket/StockMarket"; import { Terminal } from "./Terminal"; -import { dialogBoxCreate } from "../utils/DialogBox"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; import Decimal from "decimal.js"; diff --git a/src/Programs/data/ProgramsMetadata.ts b/src/Programs/data/ProgramsMetadata.ts index 09ea12820..f62dad63f 100644 --- a/src/Programs/data/ProgramsMetadata.ts +++ b/src/Programs/data/ProgramsMetadata.ts @@ -6,7 +6,7 @@ import { ITerminal } from "../../Terminal/ITerminal"; import { IRouter } from "../../ui/Router"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { HacknetServer } from "../../Hacknet/HacknetServer"; -import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { getServer } from "../../Server/ServerHelpers"; import { numeralWrapper } from "../../ui/numeralFormat"; import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; diff --git a/src/RedPill.tsx b/src/RedPill.tsx index addf63727..5dac707ae 100644 --- a/src/RedPill.tsx +++ b/src/RedPill.tsx @@ -7,7 +7,7 @@ import { PlayerOwnedSourceFile } from "./SourceFile/PlayerOwnedSourceFile"; import { SourceFileFlags } from "./SourceFile/SourceFileFlags"; import { SourceFiles } from "./SourceFile/SourceFiles"; -import { dialogBoxCreate } from "../utils/DialogBox"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; import { IRouter } from "./ui/Router"; export let redPillFlag = false; diff --git a/src/SaveObject.tsx b/src/SaveObject.tsx index 1abfb5e61..407a61574 100755 --- a/src/SaveObject.tsx +++ b/src/SaveObject.tsx @@ -16,8 +16,8 @@ import { GameSavedEvents } from "./ui/React/Snackbar"; import { setTimeoutRef } from "./utils/SetTimeoutRef"; import * as ExportBonus from "./ExportBonus"; -import { dialogBoxCreate } from "../utils/DialogBox"; -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "./utils/JSONReviver"; import { save } from "./db"; /* SaveObject.js diff --git a/src/Script/RunningScript.ts b/src/Script/RunningScript.ts index acf9c0f52..18e4456c4 100644 --- a/src/Script/RunningScript.ts +++ b/src/Script/RunningScript.ts @@ -7,8 +7,8 @@ import { Settings } from "../Settings/Settings"; import { IMap } from "../types"; import { Terminal } from "../Terminal"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { getTimestamp } from "../../utils/helpers/getTimestamp"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { getTimestamp } from "../utils/helpers/getTimestamp"; export class RunningScript { // Script arguments diff --git a/src/Script/Script.ts b/src/Script/Script.ts index fa92abf33..3ec97e715 100644 --- a/src/Script/Script.ts +++ b/src/Script/Script.ts @@ -8,8 +8,8 @@ import { calculateRamUsage } from "./RamCalculations"; import { ScriptUrl } from "./ScriptUrl"; import { setTimeoutRef } from "../utils/SetTimeoutRef"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { roundToTwo } from "../../utils/helpers/roundToTwo"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { roundToTwo } from "../utils/helpers/roundToTwo"; let globalModuleSequenceNumber = 0; diff --git a/src/Script/ScriptHelpers.ts b/src/Script/ScriptHelpers.ts index 31c67a643..cbf0d887b 100644 --- a/src/Script/ScriptHelpers.ts +++ b/src/Script/ScriptHelpers.ts @@ -8,7 +8,7 @@ import { processSingleServerGrowth } from "../Server/ServerHelpers"; import { numeralWrapper } from "../ui/numeralFormat"; -import { compareArrays } from "../../utils/helpers/compareArrays"; +import { compareArrays } from "../utils/helpers/compareArrays"; export function scriptCalculateOfflineProduction(runningScript: RunningScript): void { //The Player object stores the last update time from when we were online diff --git a/src/ScriptEditor/ui/Root.tsx b/src/ScriptEditor/ui/Root.tsx index fa3b42c0f..71b06e3b1 100644 --- a/src/ScriptEditor/ui/Root.tsx +++ b/src/ScriptEditor/ui/Root.tsx @@ -8,7 +8,7 @@ import { js_beautify as beautifyCode } from "js-beautify"; import { isValidFilePath } from "../../Terminal/DirectoryHelpers"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { IRouter } from "../../ui/Router"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; import { isScriptFilename } from "../../Script/isScriptFilename"; import { Script } from "../../Script/Script"; import { TextFile } from "../../TextFile"; diff --git a/src/Server/AllServers.ts b/src/Server/AllServers.ts index d5c6c5531..6bbe600b5 100644 --- a/src/Server/AllServers.ts +++ b/src/Server/AllServers.ts @@ -5,9 +5,9 @@ import { serverMetadata } from "./data/servers"; import { HacknetServer } from "../Hacknet/HacknetServer"; import { IMap } from "../types"; -import { createRandomIp } from "../../utils/IPAddress"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; -import { Reviver } from "../../utils/JSONReviver"; +import { createRandomIp } from "../utils/IPAddress"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; +import { Reviver } from "../utils/JSONReviver"; /** * Map of all Servers that exist in the game diff --git a/src/Server/BaseServer.ts b/src/Server/BaseServer.ts index 42ed00386..d756aeab2 100644 --- a/src/Server/BaseServer.ts +++ b/src/Server/BaseServer.ts @@ -11,8 +11,8 @@ import { IReturnStatus } from "../types"; import { isScriptFilename } from "../Script/isScriptFilename"; -import { createRandomIp } from "../../utils/IPAddress"; -import { compareArrays } from "../../utils/helpers/compareArrays"; +import { createRandomIp } from "../utils/IPAddress"; +import { compareArrays } from "../utils/helpers/compareArrays"; interface IConstructorParams { adminRights?: boolean; diff --git a/src/Server/Server.ts b/src/Server/Server.ts index 3d8e9b877..1de0cd81f 100644 --- a/src/Server/Server.ts +++ b/src/Server/Server.ts @@ -4,8 +4,8 @@ import { BaseServer } from "./BaseServer"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { createRandomString } from "../utils/helpers/createRandomString"; -import { createRandomIp } from "../../utils/IPAddress"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { createRandomIp } from "../utils/IPAddress"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export interface IConstructorParams { adminRights?: boolean; diff --git a/src/Server/ServerHelpers.ts b/src/Server/ServerHelpers.ts index 8390b3c14..bc6eaeffe 100644 --- a/src/Server/ServerHelpers.ts +++ b/src/Server/ServerHelpers.ts @@ -11,7 +11,7 @@ import { Programs } from "../Programs/Programs"; import { LiteratureNames } from "../Literature/data/LiteratureNames"; import { isValidNumber } from "../utils/helpers/isValidNumber"; -import { isValidIPAddress } from "../../utils/helpers/isValidIPAddress"; +import { isValidIPAddress } from "../utils/helpers/isValidIPAddress"; /** * Constructs a new server, while also ensuring that the new server diff --git a/src/Server/ServerPurchases.ts b/src/Server/ServerPurchases.ts index 70604fb3b..1861c09ae 100644 --- a/src/Server/ServerPurchases.ts +++ b/src/Server/ServerPurchases.ts @@ -9,8 +9,8 @@ import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { CONSTANTS } from "../Constants"; import { IPlayer } from "../PersonObjects/IPlayer"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { isPowerOfTwo } from "../../utils/helpers/isPowerOfTwo"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { isPowerOfTwo } from "../utils/helpers/isPowerOfTwo"; // Returns the cost of purchasing a server with the given RAM // Returns Infinity for invalid 'ram' arguments diff --git a/src/Server/SpecialServerIps.ts b/src/Server/SpecialServerIps.ts index 06bc9336e..8283bc191 100644 --- a/src/Server/SpecialServerIps.ts +++ b/src/Server/SpecialServerIps.ts @@ -1,5 +1,5 @@ import { IMap } from "../types"; -import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver"; +import { Reviver, Generic_toJSON, Generic_fromJSON } from "../utils/JSONReviver"; /* Holds IP of Special Servers */ export const SpecialServerNames: IMap = { diff --git a/src/Sidebar/ui/SidebarRoot.tsx b/src/Sidebar/ui/SidebarRoot.tsx index af9986c05..e314e6393 100644 --- a/src/Sidebar/ui/SidebarRoot.tsx +++ b/src/Sidebar/ui/SidebarRoot.tsx @@ -51,7 +51,7 @@ import { Settings } from "../../Settings/Settings"; import { redPillFlag } from "../../RedPill"; import { inMission } from "../../Missions"; -import { KEY } from "../../../utils/helpers/keyCodes"; +import { KEY } from "../../utils/helpers/keyCodes"; const openedMixin = (theme: Theme): CSSObject => ({ width: theme.spacing(31), diff --git a/src/StockMarket/BuyingAndSelling.tsx b/src/StockMarket/BuyingAndSelling.tsx index b8cd9657c..282f646ef 100644 --- a/src/StockMarket/BuyingAndSelling.tsx +++ b/src/StockMarket/BuyingAndSelling.tsx @@ -18,7 +18,7 @@ import { Player } from "../Player"; import { numeralWrapper } from "../ui/numeralFormat"; import { Money } from "../ui/React/Money"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; import * as React from "react"; diff --git a/src/StockMarket/Order.ts b/src/StockMarket/Order.ts index c82790ec7..b55d45e5b 100644 --- a/src/StockMarket/Order.ts +++ b/src/StockMarket/Order.ts @@ -5,7 +5,7 @@ import { OrderTypes } from "./data/OrderTypes"; import { PositionTypes } from "./data/PositionTypes"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; export class Order { readonly pos: PositionTypes; diff --git a/src/StockMarket/OrderProcessing.tsx b/src/StockMarket/OrderProcessing.tsx index e22024a40..a7f33924c 100644 --- a/src/StockMarket/OrderProcessing.tsx +++ b/src/StockMarket/OrderProcessing.tsx @@ -16,7 +16,7 @@ import { IMap } from "../types"; import { numeralWrapper } from "../ui/numeralFormat"; import { Money } from "../ui/React/Money"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; import * as React from "react"; diff --git a/src/StockMarket/Stock.ts b/src/StockMarket/Stock.ts index 96dcd56cd..47461ded9 100644 --- a/src/StockMarket/Stock.ts +++ b/src/StockMarket/Stock.ts @@ -1,6 +1,6 @@ import { IMinMaxRange } from "../types"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; export const StockForecastInfluenceLimit = 5; diff --git a/src/StockMarket/StockMarket.tsx b/src/StockMarket/StockMarket.tsx index 99631b5ad..054696fa1 100644 --- a/src/StockMarket/StockMarket.tsx +++ b/src/StockMarket/StockMarket.tsx @@ -16,8 +16,8 @@ import { EventEmitter } from "../utils/EventEmitter"; import { numeralWrapper } from ".././ui/numeralFormat"; -import { dialogBoxCreate } from "../../utils/DialogBox"; -import { Reviver } from "../../utils/JSONReviver"; +import { dialogBoxCreate } from "../ui/React/DialogBox"; +import { Reviver } from "../utils/JSONReviver"; export let StockMarket: IStockMarket = { lastUpdate: 0, diff --git a/src/StockMarket/ui/InfoAndPurchases.tsx b/src/StockMarket/ui/InfoAndPurchases.tsx index 01f662a41..a306f18d6 100644 --- a/src/StockMarket/ui/InfoAndPurchases.tsx +++ b/src/StockMarket/ui/InfoAndPurchases.tsx @@ -13,7 +13,7 @@ import { StdButton } from "../../ui/React/StdButton"; import { StdButtonPurchased } from "../../ui/React/StdButtonPurchased"; import { Money } from "../../ui/React/Money"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; type IProps = { initStockMarket: () => void; diff --git a/src/StockMarket/ui/StockTicker.tsx b/src/StockMarket/ui/StockTicker.tsx index f5617756b..ea12b0cce 100644 --- a/src/StockMarket/ui/StockTicker.tsx +++ b/src/StockMarket/ui/StockTicker.tsx @@ -22,7 +22,7 @@ import { BBAccordion } from "../../ui/React/BBAccordion"; import { Money } from "../../ui/React/Money"; import { createPopup } from "../../ui/React/createPopup"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; enum SelectorOrderType { Market = "Market Order", diff --git a/src/Terminal/ITerminal.ts b/src/Terminal/ITerminal.ts index 647e251ee..0673717e7 100644 --- a/src/Terminal/ITerminal.ts +++ b/src/Terminal/ITerminal.ts @@ -3,7 +3,7 @@ import { Script } from "../Script/Script"; import { IPlayer } from "../PersonObjects/IPlayer"; import { IRouter } from "../ui/Router"; import { Settings } from "../Settings/Settings"; -import { getTimestamp } from "../../utils/helpers/getTimestamp"; +import { getTimestamp } from "../utils/helpers/getTimestamp"; export class Output { text: string; diff --git a/src/Terminal/Terminal.ts b/src/Terminal/Terminal.ts index 789c3b4e6..f2d47b9e7 100644 --- a/src/Terminal/Terminal.ts +++ b/src/Terminal/Terminal.ts @@ -21,7 +21,7 @@ import { GetServerByHostname, getServer, getServerOnNetwork } from "../Server/Se import { ParseCommand, ParseCommands } from "./Parser"; import { SpecialServerIps, SpecialServerNames } from "../Server/SpecialServerIps"; import { Settings } from "../Settings/Settings"; -import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; +import { createProgressBarText } from "../utils/helpers/createProgressBarText"; import { calculateHackingChance, calculateHackingExpGain, @@ -29,7 +29,7 @@ import { calculateHackingTime, } from "../Hacking"; import { numeralWrapper } from "../ui/numeralFormat"; -import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; import { alias } from "./commands/alias"; import { analyze } from "./commands/analyze"; diff --git a/src/Terminal/commands/runScript.ts b/src/Terminal/commands/runScript.ts index 10b5896ed..dce0d11c1 100644 --- a/src/Terminal/commands/runScript.ts +++ b/src/Terminal/commands/runScript.ts @@ -2,7 +2,7 @@ import { ITerminal } from "../ITerminal"; import { IRouter } from "../../ui/Router"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { BaseServer } from "../../Server/BaseServer"; -import { logBoxCreate } from "../../../utils/LogBox"; +import { logBoxCreate } from "../../ui/React/LogBox"; import { startWorkerScript } from "../../NetscriptWorker"; import { RunningScript } from "../../Script/RunningScript"; import { findRunningScript } from "../../Script/ScriptHelpers"; diff --git a/src/Terminal/commands/tail.ts b/src/Terminal/commands/tail.ts index 0506ca58b..34169be6d 100644 --- a/src/Terminal/commands/tail.ts +++ b/src/Terminal/commands/tail.ts @@ -2,10 +2,10 @@ import { ITerminal } from "../ITerminal"; import { IRouter } from "../../ui/Router"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { BaseServer } from "../../Server/BaseServer"; -import { logBoxCreate } from "../../../utils/LogBox"; +import { logBoxCreate } from "../../ui/React/LogBox"; import { findRunningScriptByPid } from "../../Script/ScriptHelpers"; import { isScriptFilename } from "../../Script/isScriptFilename"; -import { compareArrays } from "../../../utils/helpers/compareArrays"; +import { compareArrays } from "../../utils/helpers/compareArrays"; export function tail( terminal: ITerminal, diff --git a/src/Terminal/tabCompletion.ts b/src/Terminal/tabCompletion.ts index 0cbc3a00d..cfeea5bd6 100644 --- a/src/Terminal/tabCompletion.ts +++ b/src/Terminal/tabCompletion.ts @@ -1,4 +1,4 @@ -import { containsAllStrings, longestCommonStart } from "../../utils/StringHelperFunctions"; +import { containsAllStrings, longestCommonStart } from "../utils/StringHelperFunctions"; /** * Implements tab completion for the Terminal diff --git a/src/Terminal/ui/TerminalInput.tsx b/src/Terminal/ui/TerminalInput.tsx index 4c360a0b6..3324f9132 100644 --- a/src/Terminal/ui/TerminalInput.tsx +++ b/src/Terminal/ui/TerminalInput.tsx @@ -6,7 +6,7 @@ import createStyles from "@mui/styles/createStyles"; import TextField from "@mui/material/TextField"; import Paper from "@mui/material/Paper"; -import { KEY } from "../../../utils/helpers/keyCodes"; +import { KEY } from "../../utils/helpers/keyCodes"; import { ITerminal } from "../ITerminal"; import { IRouter } from "../../ui/Router"; import { IPlayer } from "../../PersonObjects/IPlayer"; diff --git a/src/TextFile.ts b/src/TextFile.ts index c220686b8..da165cc56 100644 --- a/src/TextFile.ts +++ b/src/TextFile.ts @@ -1,7 +1,7 @@ import { setTimeoutRef } from "./utils/SetTimeoutRef"; -import { dialogBoxCreate } from "../utils/DialogBox"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; import { BaseServer } from "./Server/BaseServer"; -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "./utils/JSONReviver"; /** * Represents a plain text file that is typically stored on a server. diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index b7e2eaedd..80bc42790 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -1,4 +1,4 @@ -import { getRandomInt } from "../../utils/helpers/getRandomInt"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; /* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */ diff --git a/src/engine.tsx b/src/engine.tsx index e1be45dfd..7923809d4 100644 --- a/src/engine.tsx +++ b/src/engine.tsx @@ -1,7 +1,7 @@ /** * Game engine. Handles the main game loop. */ -import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "./utils/StringHelperFunctions"; import { Augmentations } from "./Augmentation/Augmentations"; import { initAugmentations } from "./Augmentation/AugmentationHelpers"; import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; @@ -42,8 +42,8 @@ import { Money } from "./ui/React/Money"; import { Hashes } from "./ui/React/Hashes"; import { Reputation } from "./ui/React/Reputation"; -import { dialogBoxCreate } from "../utils/DialogBox"; -import { exceptionAlert } from "../utils/helpers/exceptionAlert"; +import { dialogBoxCreate } from "./ui/React/DialogBox"; +import { exceptionAlert } from "./utils/helpers/exceptionAlert"; import { startTampering } from "./Exploits/tampering"; diff --git a/src/ui/ActiveScripts/ServerAccordion.tsx b/src/ui/ActiveScripts/ServerAccordion.tsx index 0a2e3d8a9..5eb61af8a 100644 --- a/src/ui/ActiveScripts/ServerAccordion.tsx +++ b/src/ui/ActiveScripts/ServerAccordion.tsx @@ -19,7 +19,7 @@ import { ServerAccordionContent } from "./ServerAccordionContent"; import { BaseServer } from "../../Server/BaseServer"; import { WorkerScript } from "../../Netscript/WorkerScript"; -import { createProgressBarText } from "../../../utils/helpers/createProgressBarText"; +import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; type IProps = { server: BaseServer; diff --git a/src/ui/ActiveScripts/WorkerScriptAccordion.tsx b/src/ui/ActiveScripts/WorkerScriptAccordion.tsx index 39d8b8285..a8bb0b7be 100644 --- a/src/ui/ActiveScripts/WorkerScriptAccordion.tsx +++ b/src/ui/ActiveScripts/WorkerScriptAccordion.tsx @@ -27,10 +27,10 @@ import ExpandMore from "@mui/icons-material/ExpandMore"; import { killWorkerScript } from "../../Netscript/killWorkerScript"; import { WorkerScript } from "../../Netscript/WorkerScript"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; -import { logBoxCreate } from "../../../utils/LogBox"; -import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions"; -import { arrayToString } from "../../../utils/helpers/arrayToString"; +import { dialogBoxCreate } from "../React/DialogBox"; +import { logBoxCreate } from "../React/LogBox"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; +import { arrayToString } from "../../utils/helpers/arrayToString"; import { Money } from "../React/Money"; import { MoneyRate } from "../React/MoneyRate"; diff --git a/src/ui/CharacterStats.tsx b/src/ui/CharacterStats.tsx index 1c19ffa4a..933abf286 100644 --- a/src/ui/CharacterStats.tsx +++ b/src/ui/CharacterStats.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import { numeralWrapper } from "../ui/numeralFormat"; -import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { SourceFileFlags } from "../SourceFile/SourceFileFlags"; import { getPurchaseServerLimit } from "../Server/ServerPurchases"; diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index b0410614f..370bab0f4 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -15,7 +15,7 @@ import { ITutorialEvents } from "./InteractiveTutorial/ITutorialEvents"; import { Faction } from "../Faction/Faction"; import { prestigeAugmentation } from "../Prestige"; -import { dialogBoxCreate } from "../../utils/DialogBox"; +import { dialogBoxCreate } from "./React/DialogBox"; import { AllServers } from "../Server/AllServers"; import { Factions } from "../Faction/Factions"; import { buyStock, sellStock, shortStock, sellShort } from "../StockMarket/BuyingAndSelling"; diff --git a/src/ui/React/CodingContractPopup.tsx b/src/ui/React/CodingContractPopup.tsx index ac75b891f..5930d2314 100644 --- a/src/ui/React/CodingContractPopup.tsx +++ b/src/ui/React/CodingContractPopup.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { KEY } from "../../../utils/helpers/keyCodes"; +import { KEY } from "../../utils/helpers/keyCodes"; import { CodingContract, CodingContractType, CodingContractTypes } from "../../CodingContracts"; import { ClickableTag, CopyableText } from "./CopyableText"; diff --git a/utils/DialogBox.tsx b/src/ui/React/DialogBox.tsx similarity index 89% rename from utils/DialogBox.tsx rename to src/ui/React/DialogBox.tsx index 061fe0f5b..1e72842d1 100644 --- a/utils/DialogBox.tsx +++ b/src/ui/React/DialogBox.tsx @@ -1,5 +1,5 @@ -import { createPopup } from "../src/ui/React/createPopup"; -import { getRandomInt } from "./helpers/getRandomInt"; +import { createPopup } from "./createPopup"; +import { getRandomInt } from "../../utils/helpers/getRandomInt"; import React from "react"; diff --git a/src/ui/React/GameOptionsRoot.tsx b/src/ui/React/GameOptionsRoot.tsx index e62d4e45b..53def414d 100644 --- a/src/ui/React/GameOptionsRoot.tsx +++ b/src/ui/React/GameOptionsRoot.tsx @@ -24,7 +24,7 @@ import DownloadIcon from "@mui/icons-material/Download"; import UploadIcon from "@mui/icons-material/Upload"; import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal"; -import { dialogBoxCreate } from "../../../utils/DialogBox"; +import { dialogBoxCreate } from "./DialogBox"; import { ConfirmationModal } from "./ConfirmationModal"; import { ThemeEditorModal } from "./ThemeEditorModal"; diff --git a/utils/LogBox.tsx b/src/ui/React/LogBox.tsx similarity index 93% rename from utils/LogBox.tsx rename to src/ui/React/LogBox.tsx index b1688ccc3..3c467d316 100644 --- a/utils/LogBox.tsx +++ b/src/ui/React/LogBox.tsx @@ -1,10 +1,10 @@ import React, { useState, useEffect } from "react"; import ReactDOM from "react-dom"; -import { killWorkerScript } from "../src/Netscript/killWorkerScript"; -import { RunningScript } from "../src/Script/RunningScript"; +import { killWorkerScript } from "../../Netscript/killWorkerScript"; +import { RunningScript } from "../../Script/RunningScript"; -import { createElement } from "./uiHelpers/createElement"; -import { removeElementById } from "./uiHelpers/removeElementById"; +import { createElement } from "../uiHelpers/createElement"; +import { removeElementById } from "../uiHelpers/removeElementById"; let gameContainer: HTMLElement; diff --git a/src/ui/React/PopupButton.tsx b/src/ui/React/PopupButton.tsx index 750c721f7..0782d025c 100644 --- a/src/ui/React/PopupButton.tsx +++ b/src/ui/React/PopupButton.tsx @@ -8,8 +8,8 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import { KEY } from "../../../utils/helpers/keyCodes"; -import { removeElement } from "../../../utils/uiHelpers/removeElement"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { removeElement } from "../uiHelpers/removeElement"; export interface IPopupButtonProps { class?: string; diff --git a/src/ui/React/PopupCloseButton.tsx b/src/ui/React/PopupCloseButton.tsx index c486d2763..26791c7de 100644 --- a/src/ui/React/PopupCloseButton.tsx +++ b/src/ui/React/PopupCloseButton.tsx @@ -8,7 +8,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import { removeElement } from "../../../utils/uiHelpers/removeElement"; +import { removeElement } from "../uiHelpers/removeElement"; import { IPopupButtonProps, PopupButton } from "./PopupButton"; export interface IPopupCloseButtonProps extends IPopupButtonProps { diff --git a/src/ui/React/createPopup.tsx b/src/ui/React/createPopup.tsx index d5da418b6..2ebf7e66c 100644 --- a/src/ui/React/createPopup.tsx +++ b/src/ui/React/createPopup.tsx @@ -11,8 +11,8 @@ import * as ReactDOM from "react-dom"; import { Popup } from "./Popup"; -import { createElement } from "../../../utils/uiHelpers/createElement"; -import { removeElementById } from "../../../utils/uiHelpers/removeElementById"; +import { createElement } from "../uiHelpers/createElement"; +import { removeElementById } from "../uiHelpers/removeElementById"; let gameContainer: HTMLElement; diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index eb6c81a54..e40787e3c 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -6,7 +6,7 @@ import { Reputation } from "./React/Reputation"; import { ReputationRate } from "./React/ReputationRate"; import { MoneyRate } from "./React/MoneyRate"; import { Money } from "./React/Money"; -import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; import { Factions } from "../Faction/Factions"; import { Company } from "../Company/Company"; import { Companies } from "../Company/Companies"; @@ -17,7 +17,7 @@ import Typography from "@mui/material/Typography"; import Grid from "@mui/material/Grid"; import Button from "@mui/material/Button"; -import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; +import { createProgressBarText } from "../utils/helpers/createProgressBarText"; const CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle; diff --git a/src/ui/createStatusText.ts b/src/ui/createStatusText.ts index 173d3880c..5249a1d2a 100644 --- a/src/ui/createStatusText.ts +++ b/src/ui/createStatusText.ts @@ -1,5 +1,5 @@ import { setTimeoutRef } from "../utils/SetTimeoutRef"; -import { getElementById } from "../../utils/uiHelpers/getElementById"; +import { getElementById } from "./uiHelpers/getElementById"; import { Action } from "../types"; const threeSeconds = 3000; diff --git a/utils/uiHelpers/clearEventListeners.ts b/src/ui/uiHelpers/clearEventListeners.ts similarity index 100% rename from utils/uiHelpers/clearEventListeners.ts rename to src/ui/uiHelpers/clearEventListeners.ts diff --git a/utils/uiHelpers/createElement.ts b/src/ui/uiHelpers/createElement.ts similarity index 100% rename from utils/uiHelpers/createElement.ts rename to src/ui/uiHelpers/createElement.ts diff --git a/utils/uiHelpers/createPopup.ts b/src/ui/uiHelpers/createPopup.ts similarity index 100% rename from utils/uiHelpers/createPopup.ts rename to src/ui/uiHelpers/createPopup.ts diff --git a/utils/uiHelpers/getElementById.ts b/src/ui/uiHelpers/getElementById.ts similarity index 100% rename from utils/uiHelpers/getElementById.ts rename to src/ui/uiHelpers/getElementById.ts diff --git a/utils/uiHelpers/getSelectData.ts b/src/ui/uiHelpers/getSelectData.ts similarity index 100% rename from utils/uiHelpers/getSelectData.ts rename to src/ui/uiHelpers/getSelectData.ts diff --git a/utils/uiHelpers/removeChildrenFromElement.ts b/src/ui/uiHelpers/removeChildrenFromElement.ts similarity index 93% rename from utils/uiHelpers/removeChildrenFromElement.ts rename to src/ui/uiHelpers/removeChildrenFromElement.ts index 0c37b771e..014ae3e5b 100644 --- a/utils/uiHelpers/removeChildrenFromElement.ts +++ b/src/ui/uiHelpers/removeChildrenFromElement.ts @@ -1,4 +1,4 @@ -import { isString } from "../helpers/isString"; +import { isString } from "../../utils/helpers/isString"; import { getElementById } from "./getElementById"; /** diff --git a/utils/uiHelpers/removeElement.ts b/src/ui/uiHelpers/removeElement.ts similarity index 100% rename from utils/uiHelpers/removeElement.ts rename to src/ui/uiHelpers/removeElement.ts diff --git a/utils/uiHelpers/removeElementById.ts b/src/ui/uiHelpers/removeElementById.ts similarity index 100% rename from utils/uiHelpers/removeElementById.ts rename to src/ui/uiHelpers/removeElementById.ts diff --git a/utils/IPAddress.ts b/src/utils/IPAddress.ts similarity index 100% rename from utils/IPAddress.ts rename to src/utils/IPAddress.ts diff --git a/utils/JSONReviver.ts b/src/utils/JSONReviver.ts similarity index 100% rename from utils/JSONReviver.ts rename to src/utils/JSONReviver.ts diff --git a/src/utils/MoneySourceTracker.ts b/src/utils/MoneySourceTracker.ts index d648be892..969e098b7 100644 --- a/src/utils/MoneySourceTracker.ts +++ b/src/utils/MoneySourceTracker.ts @@ -2,7 +2,7 @@ * This is an object that is used to keep track of where all of the player's * money is coming from (or going to) */ -import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver"; +import { Generic_fromJSON, Generic_toJSON, Reviver } from "./JSONReviver"; export class MoneySourceTracker { // eslint-disable-next-line @typescript-eslint/ban-types diff --git a/utils/StringHelperFunctions.ts b/src/utils/StringHelperFunctions.ts similarity index 98% rename from utils/StringHelperFunctions.ts rename to src/utils/StringHelperFunctions.ts index 33288372e..391cebeea 100644 --- a/utils/StringHelperFunctions.ts +++ b/src/utils/StringHelperFunctions.ts @@ -1,4 +1,4 @@ -import { EqualityFunc } from "../src/types"; +import { EqualityFunc } from "../types"; import { isString } from "./helpers/isString"; // Netburner String helper functions diff --git a/utils/helpers/addOffset.ts b/src/utils/helpers/addOffset.ts similarity index 100% rename from utils/helpers/addOffset.ts rename to src/utils/helpers/addOffset.ts diff --git a/utils/helpers/arrayToString.ts b/src/utils/helpers/arrayToString.ts similarity index 100% rename from utils/helpers/arrayToString.ts rename to src/utils/helpers/arrayToString.ts diff --git a/utils/helpers/clearObject.ts b/src/utils/helpers/clearObject.ts similarity index 100% rename from utils/helpers/clearObject.ts rename to src/utils/helpers/clearObject.ts diff --git a/utils/helpers/compareArrays.ts b/src/utils/helpers/compareArrays.ts similarity index 100% rename from utils/helpers/compareArrays.ts rename to src/utils/helpers/compareArrays.ts diff --git a/utils/helpers/createProgressBarText.ts b/src/utils/helpers/createProgressBarText.ts similarity index 100% rename from utils/helpers/createProgressBarText.ts rename to src/utils/helpers/createProgressBarText.ts diff --git a/utils/helpers/exceptionAlert.ts b/src/utils/helpers/exceptionAlert.ts similarity index 92% rename from utils/helpers/exceptionAlert.ts rename to src/utils/helpers/exceptionAlert.ts index 8269ddd6a..5ec74f019 100644 --- a/utils/helpers/exceptionAlert.ts +++ b/src/utils/helpers/exceptionAlert.ts @@ -1,4 +1,4 @@ -import { dialogBoxCreate } from "../DialogBox"; +import { dialogBoxCreate } from "../../ui/React/DialogBox"; interface IError { fileName?: string; diff --git a/utils/helpers/getRandomByte.ts b/src/utils/helpers/getRandomByte.ts similarity index 100% rename from utils/helpers/getRandomByte.ts rename to src/utils/helpers/getRandomByte.ts diff --git a/utils/helpers/getRandomInt.ts b/src/utils/helpers/getRandomInt.ts similarity index 100% rename from utils/helpers/getRandomInt.ts rename to src/utils/helpers/getRandomInt.ts diff --git a/utils/helpers/getTimestamp.ts b/src/utils/helpers/getTimestamp.ts similarity index 100% rename from utils/helpers/getTimestamp.ts rename to src/utils/helpers/getTimestamp.ts diff --git a/utils/helpers/isPowerOfTwo.ts b/src/utils/helpers/isPowerOfTwo.ts similarity index 100% rename from utils/helpers/isPowerOfTwo.ts rename to src/utils/helpers/isPowerOfTwo.ts diff --git a/utils/helpers/isString.ts b/src/utils/helpers/isString.ts similarity index 100% rename from utils/helpers/isString.ts rename to src/utils/helpers/isString.ts diff --git a/utils/helpers/isValidIPAddress.ts b/src/utils/helpers/isValidIPAddress.ts similarity index 100% rename from utils/helpers/isValidIPAddress.ts rename to src/utils/helpers/isValidIPAddress.ts diff --git a/utils/helpers/keyCodes.ts b/src/utils/helpers/keyCodes.ts similarity index 92% rename from utils/helpers/keyCodes.ts rename to src/utils/helpers/keyCodes.ts index 1c939dbc2..7fc89f380 100644 --- a/utils/helpers/keyCodes.ts +++ b/src/utils/helpers/keyCodes.ts @@ -1,4 +1,4 @@ -import { IMap } from "../../src/types"; +import { IMap } from "../../types"; /** * Keyboard key codes diff --git a/utils/helpers/roundToTwo.ts b/src/utils/helpers/roundToTwo.ts similarity index 100% rename from utils/helpers/roundToTwo.ts rename to src/utils/helpers/roundToTwo.ts diff --git a/test/StringHelperFunctions.test.ts b/test/StringHelperFunctions.test.ts index 80ccdbdcd..96400bc75 100644 --- a/test/StringHelperFunctions.test.ts +++ b/test/StringHelperFunctions.test.ts @@ -1,4 +1,4 @@ -import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; +import { convertTimeMsToTimeElapsedString } from "../src/utils/StringHelperFunctions"; describe("StringHelperFunctions Tests", function () { it("transforms strings", () => {