From f6f023eeb4f9c53452fcb8971f5c4151f369aab6 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 9 Oct 2022 01:25:31 -0400 Subject: [PATCH] Fix tons of typos --- lore/bitnodes-general.txt | 2 +- src/Alias.ts | 2 +- src/Augmentation/Augmentation.tsx | 2 +- src/Augmentation/AugmentationHelpers.tsx | 2 +- src/Augmentation/data/AugmentationCreator.tsx | 12 +++---- src/Augmentation/ui/AugmentationsRoot.tsx | 2 +- src/BitNode/BitNodeMultipliers.ts | 4 +-- .../ui/BitnodeMultipliersDescription.tsx | 2 +- src/Bladeburner/Bladeburner.tsx | 8 ++--- src/Bladeburner/City.ts | 4 +-- src/Bladeburner/data/BlackOperations.tsx | 4 +-- src/Bladeburner/ui/Stats.tsx | 5 +-- src/Casino/Blackjack.tsx | 6 ++-- src/Casino/CardDeck/Deck.ts | 2 +- src/CodingContracts.ts | 2 +- src/Company/Company.ts | 2 +- src/Company/data/CompanyPositionsMetadata.ts | 4 +-- src/Corporation/Corporation.tsx | 6 ++-- src/Corporation/CorporationState.ts | 2 +- src/Corporation/Employee.ts | 2 +- src/Corporation/Industry.ts | 12 +++---- src/Corporation/Material.ts | 2 +- src/Corporation/Product.ts | 4 +-- src/Corporation/ResearchTree.ts | 2 +- src/Corporation/Warehouse.ts | 2 +- .../data/CorporationUnlockUpgrades.ts | 2 +- src/Corporation/data/ResearchMetadata.ts | 2 +- src/Corporation/ui/IndustryOffice.tsx | 2 +- src/Corporation/ui/IndustryOverview.tsx | 2 +- src/Corporation/ui/MaterialElem.tsx | 4 +-- src/Corporation/ui/ProductElem.tsx | 2 +- src/CotMG/ActiveFragment.ts | 6 ++-- src/CotMG/Fragment.ts | 6 ++-- src/CotMG/StaneksGift.ts | 14 ++++---- src/Exploits/Exploit.ts | 4 +-- src/Faction/Faction.ts | 2 +- src/Faction/FactionInfo.tsx | 2 +- src/GameOptions/ui/MiscPage.tsx | 2 +- src/Gang/Gang.ts | 4 +-- src/Gang/GangMember.ts | 2 +- src/Gang/GangMemberTask.ts | 4 +-- src/Hacknet/HacknetHelpers.tsx | 8 ++--- src/Hacknet/HacknetNode.ts | 2 +- src/Hacknet/HacknetServer.ts | 2 +- src/Hacknet/HashManager.ts | 2 +- src/Infiltration/ui/GameTimer.tsx | 2 +- src/Literature/Literatures.ts | 12 +++---- src/Locations/ui/SpecialLocation.tsx | 2 +- src/Message/MessageHelpers.tsx | 8 +++-- src/Netscript/APIWrapper.ts | 4 +-- src/Netscript/NetscriptHelpers.ts | 2 +- src/Netscript/Pid.ts | 2 +- src/NetscriptFunctions.ts | 4 +-- src/NetscriptFunctions/Singularity.ts | 9 ++++-- src/NetscriptJSEvaluator.ts | 2 +- src/NetscriptWorker.ts | 6 ++-- src/PersonObjects/Player/PlayerObject.ts | 2 +- .../Player/PlayerObjectGeneralMethods.ts | 12 +++---- src/PersonObjects/Sleeve/Sleeve.ts | 4 +-- .../Sleeve/Work/SleeveBladeburnerWork.ts | 2 +- .../Sleeve/Work/SleeveClassWork.ts | 2 +- .../Sleeve/Work/SleeveCompanyWork.ts | 2 +- .../Sleeve/Work/SleeveCrimeWork.ts | 2 +- .../Sleeve/Work/SleeveFactionWork.ts | 2 +- .../Sleeve/Work/SleeveInfiltrateWork.ts | 2 +- .../Sleeve/Work/SleeveRecoveryWork.ts | 2 +- .../Sleeve/Work/SleeveSupportWork.ts | 2 +- .../Sleeve/Work/SleeveSynchroWork.ts | 2 +- src/Prestige.ts | 2 +- src/SaveObject.tsx | 4 +-- src/Script/Script.ts | 2 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 32 +++++++++---------- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 2 +- src/Server/AllServers.ts | 2 +- src/Server/BaseServer.ts | 7 ++-- src/Server/ServerHelpers.ts | 8 ++--- src/Server/ServerPurchases.ts | 4 +-- src/StockMarket/Order.ts | 2 +- src/StockMarket/StockMarketConstants.ts | 2 +- src/StockMarket/StockMarketHelpers.ts | 6 ++-- src/StockMarket/ui/StockTicker.tsx | 2 +- .../ui/StockTickerPositionText.tsx | 4 +-- src/StockMarket/ui/StockTickers.tsx | 4 +-- src/StockMarket/ui/StockTickersConfig.tsx | 2 +- src/Terminal/Parser.ts | 2 +- src/Terminal/Terminal.ts | 2 +- src/Terminal/commands/cp.ts | 2 +- src/Terminal/commands/mv.ts | 4 +-- src/Terminal/commands/runScript.ts | 2 +- src/Terminal/commands/scp.ts | 2 +- ...termineAllPossibilitiesForTabCompletion.ts | 2 +- src/Terminal/tabCompletion.ts | 2 +- src/TextFile.ts | 2 +- src/Work/ClassWork.tsx | 2 +- src/Work/CompanyWork.tsx | 2 +- src/Work/CreateProgramWork.ts | 2 +- src/Work/CrimeWork.ts | 2 +- src/Work/FactionWork.tsx | 2 +- src/Work/GraftingWork.tsx | 2 +- src/data/codingcontracttypes.ts | 4 +-- src/ui/React/ANSIITypography.tsx | 4 +-- src/ui/React/LogBoxManager.tsx | 8 ++--- src/ui/WorkInProgressRoot.tsx | 2 +- src/utils/JSONReviver.ts | 2 +- src/utils/MoneySourceTracker.ts | 2 +- src/utils/V2Modal.tsx | 2 +- src/utils/helpers/createProgressBarText.ts | 2 +- src/utils/helpers/isPowerOfTwo.ts | 2 +- src/utils/v1APIBreak.ts | 2 +- test/netscript/tb_basic.script | 12 +++---- 110 files changed, 212 insertions(+), 207 deletions(-) diff --git a/lore/bitnodes-general.txt b/lore/bitnodes-general.txt index 0068f7646..2ee971fa9 100644 --- a/lore/bitnodes-general.txt +++ b/lore/bitnodes-general.txt @@ -7,5 +7,5 @@ presence, as indicated by the Bladeburners' ability to destroy it via force. Also, hydroflame (irl) has stated that the glitch in Ishima is the physical location of the World Daemon in a node. When the player destroys a BitNode, it is currently unknown what becomes of it, or the people trapped within. However, based -on the way jump3r and Deadalus help the player to destroy it, doing so is somehow +on the way jump3r and Daedalus help the player to destroy it, doing so is somehow aligned with their goals. \ No newline at end of file diff --git a/src/Alias.ts b/src/Alias.ts index aa65642a1..f1cc157b2 100644 --- a/src/Alias.ts +++ b/src/Alias.ts @@ -101,7 +101,7 @@ export function removeAlias(name: string): boolean { export function substituteAliases(origCommand: string): string { const commandArray = origCommand.split(" "); if (commandArray.length > 0) { - // For the alias and unalias commands, dont substite + // For the alias and unalias commands, don't substitute if (commandArray[0] === "unalias" || commandArray[0] === "alias") { return commandArray.join(" "); } diff --git a/src/Augmentation/Augmentation.tsx b/src/Augmentation/Augmentation.tsx index 9dafe06e0..e93465a04 100644 --- a/src/Augmentation/Augmentation.tsx +++ b/src/Augmentation/Augmentation.tsx @@ -607,7 +607,7 @@ export class Augmentation { return Generic_toJSON("Augmentation", this); } - // Initiatizes a Augmentation object from a JSON save state. + // Initializes a Augmentation object from a JSON save state. static fromJSON(value: IReviverValue): Augmentation { return Generic_fromJSON(Augmentation, value.data); } diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 90610c71e..871108b70 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -61,7 +61,7 @@ export function getGenericAugmentationPriceMultiplier(): number { return Math.pow(getBaseAugmentationPriceMultiplier(), Player.queuedAugmentations.length); } -//Resets an Augmentation during (re-initizliation) +//Resets an Augmentation during (re-initialization) function resetAugmentation(aug: Augmentation): void { aug.addToFactions(aug.factions); const name = aug.name; diff --git a/src/Augmentation/data/AugmentationCreator.tsx b/src/Augmentation/data/AugmentationCreator.tsx index 04f3085cb..885bba427 100644 --- a/src/Augmentation/data/AugmentationCreator.tsx +++ b/src/Augmentation/data/AugmentationCreator.tsx @@ -150,8 +150,8 @@ export const initSoAAugmentations = (): Augmentation[] => [ repCost: 1e4, moneyCost: 1e6, info: - "Extra-occular neurons taken from old martial art master. Injecting them gives the user the ability to " + - "predict the enemy's attack before they even know it themself.", + "Extra-ocular neurons taken from old martial art master. Injecting them gives the user the ability to " + + "predict the enemy's attack before they even know it themselves.", stats: ( <>This augmentation makes the Slash minigame easier by showing you via an indicator when the slash in coming. ), @@ -617,7 +617,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. " + "This process results in the proliferation of new, synthetic myelin sheaths in the nervous " + - "system. These myelin sheaths can propogate neuro-signals much faster than their organic " + + "system. These myelin sheaths can propagate neuro-signals much faster than their organic " + "counterparts, leading to greater processing speeds and better brain function.", hacking_speed: 1.03, hacking_exp: 1.1, @@ -1519,7 +1519,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ moneyCost: 2e9, info: "A 'Probability Computation Matrix' is installed in the frontal cortex. This implant " + - "uses advanced mathematical algorithims to rapidly identify and compute statistical " + + "uses advanced mathematical algorithms to rapidly identify and compute statistical " + "outcomes of nearly every situation.", charisma: 1.0777, charisma_exp: 1.0777, @@ -1535,7 +1535,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ name: AugmentationNames.INFRARet, repCost: 7.5e3, moneyCost: 3e7, - info: "A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.", + info: "A tiny chip that sits behind the retina. This implant lets the user visually detect infrared radiation.", crime_success: 1.25, crime_money: 1.1, dexterity: 1.1, @@ -1932,7 +1932,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "weaponized by Bladeburner units to be used against Synthoids.", stats: ( <> - This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting + This augmentation allows you to perform Bladeburner actions and other actions (such as working, committing crimes, etc.) at the same time. ), diff --git a/src/Augmentation/ui/AugmentationsRoot.tsx b/src/Augmentation/ui/AugmentationsRoot.tsx index 912ebf540..396eb6c2f 100644 --- a/src/Augmentation/ui/AugmentationsRoot.tsx +++ b/src/Augmentation/ui/AugmentationsRoot.tsx @@ -36,7 +36,7 @@ const NeuroFluxDisplay = (): React.ReactElement => { Bitburner blood donation community program The blood donation program is a continuous real life event started on 2022-04-01. To participate simply go - donate blood, plasma, or platelets to your local organisation and take a picture as proof (hide your personal + donate blood, plasma, or platelets to your local organization and take a picture as proof (hide your personal information). Then send the proof to hydroflame on reddit or discord. Currently accumulated {CONSTANTS.Donations} donations. diff --git a/src/BitNode/BitNodeMultipliers.ts b/src/BitNode/BitNodeMultipliers.ts index fbe078db9..3609fe567 100644 --- a/src/BitNode/BitNodeMultipliers.ts +++ b/src/BitNode/BitNodeMultipliers.ts @@ -83,7 +83,7 @@ export interface IBitNodeMultipliers { /** * Influences how much money is produced by Hacknet Nodes. - * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9) + * Influences the hash rate of Hacknet Servers (unlocked in BitNode-9) */ HacknetNodeMoney: number; @@ -130,7 +130,7 @@ export interface IBitNodeMultipliers { /** Influences the growth percentage per cycle against a server. */ ServerGrowthRate: number; - /** Influences the maxmimum money that a server can grow to. */ + /** Influences the maximum money that a server can grow to. */ ServerMaxMoney: number; /** Influences the initial money that a server starts with. */ diff --git a/src/BitNode/ui/BitnodeMultipliersDescription.tsx b/src/BitNode/ui/BitnodeMultipliersDescription.tsx index c42dc1a2a..c3f30958a 100644 --- a/src/BitNode/ui/BitnodeMultipliersDescription.tsx +++ b/src/BitNode/ui/BitnodeMultipliersDescription.tsx @@ -299,7 +299,7 @@ function StanekMults({ mults }: IMultsProps): React.ReactElement { const extraSize = mults.StaneksGiftExtraSize.toFixed(3); const rows: IBNMultRows = { - StnakesGiftPowerMultiplier: { name: "Gift Power" }, + StaneksGiftPowerMultiplier: { name: "Gift Power" }, StaneksGiftExtraSize: { name: "Base Size Modifier", content: `${mults.StaneksGiftExtraSize > defaultMultipliers.StaneksGiftExtraSize ? `+${extraSize}` : extraSize}`, diff --git a/src/Bladeburner/Bladeburner.tsx b/src/Bladeburner/Bladeburner.tsx index 955d84c06..cc43bd9ca 100644 --- a/src/Bladeburner/Bladeburner.tsx +++ b/src/Bladeburner/Bladeburner.tsx @@ -696,7 +696,7 @@ export class Bladeburner { // Set variables if (args.length === 4) { - const variable = args[1].toLowerCase(); // allows Action Type to be with or without capitalisation. + const variable = args[1].toLowerCase(); // allows Action Type to be with or without capitalization. const val = args[2]; let highLow = false; // True for high, false for low @@ -1416,7 +1416,7 @@ export class Bladeburner { this.resetAction(); // Stop regardless of success or fail - // Calculate team lossses + // Calculate team losses if (teamCount >= 1) { const losses = getRandomInt(1, teamLossMax); this.teamSize -= losses; @@ -1645,7 +1645,7 @@ export class Bladeburner { } // If the previous action went past its completion time, add to the next action - // This is not added inmediatly in case the automation changes the action + // This is not added immediately in case the automation changes the action this.actionTimeCurrent += seconds + this.actionTimeOverflow; this.actionTimeOverflow = 0; if (this.actionTimeCurrent >= this.actionTimeToComplete) { @@ -2382,7 +2382,7 @@ export class Bladeburner { return Generic_toJSON("Bladeburner", this); } - /** Initiatizes a Bladeburner object from a JSON save state. */ + /** Initializes a Bladeburner object from a JSON save state. */ static fromJSON(value: IReviverValue): Bladeburner { return Generic_fromJSON(Bladeburner, value.data); } diff --git a/src/Bladeburner/City.ts b/src/Bladeburner/City.ts index 21a22db8b..6affac207 100644 --- a/src/Bladeburner/City.ts +++ b/src/Bladeburner/City.ts @@ -59,7 +59,7 @@ export class City { improvePopulationEstimateByCount(n: number): void { if (isNaN(n)) { - throw new Error("NaN passeed into City.improvePopulationEstimateByCount()"); + throw new Error("NaN passed into City.improvePopulationEstimateByCount()"); } if (this.popEst < this.pop) { this.popEst += n; @@ -162,7 +162,7 @@ export class City { return Generic_toJSON("City", this); } - /** Initiatizes a City object from a JSON save state. */ + /** Initializes a City object from a JSON save state. */ static fromJSON(value: IReviverValue): City { return Generic_fromJSON(City, value.data); } diff --git a/src/Bladeburner/data/BlackOperations.tsx b/src/Bladeburner/data/BlackOperations.tsx index aa3c01123..f0f419b4f 100644 --- a/src/Bladeburner/data/BlackOperations.tsx +++ b/src/Bladeburner/data/BlackOperations.tsx @@ -57,7 +57,7 @@ export const BlackOperations: { <> Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, - but the research that they could be conducting using Titan Laboraties' vast resources is potentially very + but the research that they could be conducting using Titan Laboratories' vast resources is potentially very dangerous.

@@ -215,7 +215,7 @@ export const BlackOperations: { desc: ( <> DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the - people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our + people's dreams and subconscious. They do this using broadcast transmitter towers. Based on information from our agents and informants in {CityName.Chongqing}, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.
diff --git a/src/Bladeburner/ui/Stats.tsx b/src/Bladeburner/ui/Stats.tsx index a0e6c2417..21cfcb6d5 100644 --- a/src/Bladeburner/ui/Stats.tsx +++ b/src/Bladeburner/ui/Stats.tsx @@ -79,7 +79,7 @@ export function Stats(props: IProps): React.ReactElement {
Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this - means your success rate would be multipled by 85% (100 - 15). + means your success rate would be multiplied by 85% (100 - 15).

Your max stamina and stamina gain rate can also be increased by training, or through skills and @@ -123,7 +123,8 @@ export function Stats(props: IProps): React.ReactElement { - This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city. + This is your Bladeburner division's estimate of how many Synthoid communities exist in your current + city. } > diff --git a/src/Casino/Blackjack.tsx b/src/Casino/Blackjack.tsx index 445d59a7b..927683919 100644 --- a/src/Casino/Blackjack.tsx +++ b/src/Casino/Blackjack.tsx @@ -70,7 +70,7 @@ export class Blackjack extends React.Component, State> { return; } - // Take money from player right away so that player's dont just "leave" to avoid the loss (I mean they could + // Take money from player right away so that players don't just "leave" to avoid the loss (I mean they could // always reload without saving but w.e) TODO: Save/Restore the RNG state to limit the value of save-scumming. win(-this.state.bet); @@ -128,7 +128,7 @@ export class Blackjack extends React.Component, State> { valuesUnder21.sort((a, b) => a - b); return valuesUnder21[valuesUnder21.length - 1]; } else { - // Just return the first value. It doesnt really matter anyways since hand is buted + // Just return the first value. It doesn't really matter anyways since hand is busted. return handValues[0]; } }; @@ -248,7 +248,7 @@ export class Blackjack extends React.Component, State> { bet: 0, betInput, wagerInvalid: true, - wagerInvalidHelperText: "Must bet a postive amount", + wagerInvalidHelperText: "Must bet a positive amount", }); } else if (wager > MAX_BET) { this.setState({ diff --git a/src/Casino/CardDeck/Deck.ts b/src/Casino/CardDeck/Deck.ts index 97a616ddb..3f9f45d21 100644 --- a/src/Casino/CardDeck/Deck.ts +++ b/src/Casino/CardDeck/Deck.ts @@ -21,7 +21,7 @@ export class Deck { return this.cards.shift() as Card; // Guaranteed to return a Card since we throw an Error if array is empty } - // Draws a card, resetting the deck beforehands if the Deck is empty + // Draws a card, resetting the deck beforehand if the Deck is empty safeDrawCard(): Card { if (this.cards.length === 0) { this.reset(); diff --git a/src/CodingContracts.ts b/src/CodingContracts.ts index fd19a546a..9cb5f44fd 100644 --- a/src/CodingContracts.ts +++ b/src/CodingContracts.ts @@ -166,7 +166,7 @@ export class CodingContract { return Generic_toJSON("CodingContract", this); } - /** Initiatizes a CodingContract from a JSON save state. */ + /** Initializes a CodingContract from a JSON save state. */ static fromJSON(value: IReviverValue): CodingContract { return Generic_fromJSON(CodingContract, value.data); } diff --git a/src/Company/Company.ts b/src/Company/Company.ts index 5c0afe0ee..07be49826 100644 --- a/src/Company/Company.ts +++ b/src/Company/Company.ts @@ -137,7 +137,7 @@ export class Company { return Generic_toJSON("Company", this); } - /** Initiatizes a Company from a JSON save state. */ + /** Initializes a Company from a JSON save state. */ static fromJSON(value: IReviverValue): Company { return Generic_fromJSON(Company, value.data); } diff --git a/src/Company/data/CompanyPositionsMetadata.ts b/src/Company/data/CompanyPositionsMetadata.ts index fa4b6412e..4cfeaccc9 100644 --- a/src/Company/data/CompanyPositionsMetadata.ts +++ b/src/Company/data/CompanyPositionsMetadata.ts @@ -4,7 +4,7 @@ import * as posNames from "./companypositionnames"; export const companyPositionMetadata: IConstructorParams[] = [ { - name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern + name: posNames.SoftwareCompanyPositions[0], // Software Engineering Intern nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer baseSalary: 33, charismaEffectiveness: 15, @@ -168,7 +168,7 @@ export const companyPositionMetadata: IConstructorParams[] = [ }, { name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer - nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator + nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator baseSalary: 121, charismaEffectiveness: 15, charismaExpGain: 0.05, diff --git a/src/Corporation/Corporation.tsx b/src/Corporation/Corporation.tsx index b69a216f0..07e643827 100644 --- a/src/Corporation/Corporation.tsx +++ b/src/Corporation/Corporation.tsx @@ -61,7 +61,7 @@ export class Corporation { addFunds(amt: number): void { if (!isFinite(amt)) { - console.error("Trying to add invalid amount of funds. Report to a developper."); + console.error("Trying to add invalid amount of funds. Report to a developer."); return; } this.funds = this.funds + amt; @@ -238,7 +238,7 @@ export class Corporation { const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE); if (isNaN(maxIterations) || maxIterations > 10e6) { console.error( - `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`, + `Something went wrong or unexpected when calculating share sale. Max iterations calculated to be ${maxIterations}`, ); return [0, 0, 0]; } @@ -451,7 +451,7 @@ export class Corporation { return Generic_toJSON("Corporation", this); } - /** Initiatizes a Corporation object from a JSON save state. */ + /** Initializes a Corporation object from a JSON save state. */ static fromJSON(value: IReviverValue): Corporation { return Generic_fromJSON(Corporation, value.data); } diff --git a/src/Corporation/CorporationState.ts b/src/Corporation/CorporationState.ts index bdf8c6c02..d8b913f95 100644 --- a/src/Corporation/CorporationState.ts +++ b/src/Corporation/CorporationState.ts @@ -32,7 +32,7 @@ export class CorporationState { return Generic_toJSON("CorporationState", this); } - // Initiatizes a CorporationState object from a JSON save state. + // Initializes a CorporationState object from a JSON save state. static fromJSON(value: IReviverValue): CorporationState { return Generic_fromJSON(CorporationState, value.data); } diff --git a/src/Corporation/Employee.ts b/src/Corporation/Employee.ts index 8cbd5e9cb..08287945a 100644 --- a/src/Corporation/Employee.ts +++ b/src/Corporation/Employee.ts @@ -85,7 +85,7 @@ export class Employee { const prodBase = this.mor * this.hap * this.ene * 1e-6; let prodMult = 0; switch (this.pos) { - //Calculate productivity based on position. This is multipled by prodBase + //Calculate productivity based on position. This is multiplied by prodBase //to get final value case EmployeePositions.Operations: prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff; diff --git a/src/Corporation/Industry.ts b/src/Corporation/Industry.ts index 532b56949..47f342723 100644 --- a/src/Corporation/Industry.ts +++ b/src/Corporation/Industry.ts @@ -39,7 +39,7 @@ export class Industry { /* The following are factors for how much production/other things are increased by different factors. The production increase always has diminishing returns, - and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8) + and they are all represented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8) The number for these represent the exponential. A lower number means more diminishing returns */ reFac = 0; //Real estate Factor @@ -386,7 +386,7 @@ export class Industry { this.state = state; //At the start of a cycle, store and reset revenue/expenses - //Then calculate salaries and processs the markets + //Then calculate salaries and process the markets if (state === "START") { if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) { console.error("NaN in Corporation's computed revenue/expenses"); @@ -895,7 +895,7 @@ export class Industry { // Make sure theres enough space in warehouse if (expWarehouse.sizeUsed >= expWarehouse.size) { - // Warehouse at capacity. Exporting doesnt + // Warehouse at capacity. Exporting doesn't // affect revenue so just return 0's return [0, 0]; } else { @@ -1079,7 +1079,7 @@ export class Industry { // Reverse engineer the 'maxSell' formula // 1. Set 'maxSell' = prod // 2. Substitute formula for 'markup' - // 3. Solve for 'sCost'roduct.pCost = sCost + // 3. Solve for 'sCost', product.pCost = sCost const numerator = markupLimit; const sqrtNumerator = prod; const sqrtDenominator = @@ -1289,7 +1289,7 @@ export class Industry { const researchTree = IndustryResearchTrees[this.type]; if (researchTree === undefined) throw new Error(`Invalid industry "${this.type}"`); - // Since ResearchTree data isnt saved, we'll update the Research Tree data + // Since ResearchTree data isn't saved, we'll update the Research Tree data // based on the stored 'researched' property in the Industry object if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) { for (const research of Object.keys(this.researched)) { @@ -1374,7 +1374,7 @@ export class Industry { return Generic_toJSON("Industry", this); } - /** Initiatizes a Industry object from a JSON save state. */ + /** Initializes a Industry object from a JSON save state. */ static fromJSON(value: IReviverValue): Industry { return Generic_fromJSON(Industry, value.data); } diff --git a/src/Corporation/Material.ts b/src/Corporation/Material.ts index 5db260489..b2042a8b3 100644 --- a/src/Corporation/Material.ts +++ b/src/Corporation/Material.ts @@ -233,7 +233,7 @@ export class Material { return Generic_toJSON("Material", this); } - // Initiatizes a Material object from a JSON save state. + // Initializes a Material object from a JSON save state. static fromJSON(value: IReviverValue): Material { return Generic_fromJSON(Material, value.data); } diff --git a/src/Corporation/Product.ts b/src/Corporation/Product.ts index 1700f683f..816042da5 100644 --- a/src/Corporation/Product.ts +++ b/src/Corporation/Product.ts @@ -49,7 +49,7 @@ export class Product { // Variables for handling the creation process of this Product fin = false; // Whether this Product has finished being created - prog = 0; // Creation progress - A number betwee 0-100 representing percentage + prog = 0; // Creation progress - A number between 0-100 representing percentage createCity = ""; // City in which the product is/was being created designCost = 0; // How much money was invested into designing this Product advCost = 0; // How much money was invested into advertising this Product @@ -267,7 +267,7 @@ export class Product { return Generic_toJSON("Product", this); } - // Initiatizes a Product object from a JSON save state. + // Initializes a Product object from a JSON save state. static fromJSON(value: IReviverValue): Product { return Generic_fromJSON(Product, value.data); } diff --git a/src/Corporation/ResearchTree.ts b/src/Corporation/ResearchTree.ts index 82313d107..f0d88a706 100644 --- a/src/Corporation/ResearchTree.ts +++ b/src/Corporation/ResearchTree.ts @@ -63,7 +63,7 @@ export class Node { return this; } - // Recursively search chilren + // Recursively search children let res = null; for (let i = 0; i < this.children.length; ++i) { res = this.children[i].findNode(text); diff --git a/src/Corporation/Warehouse.ts b/src/Corporation/Warehouse.ts index 8edbe3cfa..dda5d46c6 100644 --- a/src/Corporation/Warehouse.ts +++ b/src/Corporation/Warehouse.ts @@ -108,7 +108,7 @@ export class Warehouse { return Generic_toJSON("Warehouse", this); } - // Initiatizes a Warehouse object from a JSON save state. + // Initializes a Warehouse object from a JSON save state. static fromJSON(value: IReviverValue): Warehouse { return Generic_fromJSON(Warehouse, value.data); } diff --git a/src/Corporation/data/CorporationUnlockUpgrades.ts b/src/Corporation/data/CorporationUnlockUpgrades.ts index ca583fc7f..6a647b417 100644 --- a/src/Corporation/data/CorporationUnlockUpgrades.ts +++ b/src/Corporation/data/CorporationUnlockUpgrades.ts @@ -18,7 +18,7 @@ export enum CorporationUnlockUpgradeIndex { } // Corporation Unlock Upgrades -// Upgrades for entire corporation, unlocks features, either you have it or you dont +// Upgrades for entire corporation, unlocks features, either you have it or you don't. export const CorporationUnlockUpgrades: Record = { //Lets you export goods [CorporationUnlockUpgradeIndex.Export]: { diff --git a/src/Corporation/data/ResearchMetadata.ts b/src/Corporation/data/ResearchMetadata.ts index d82b3b9d7..005ea6d64 100644 --- a/src/Corporation/data/ResearchMetadata.ts +++ b/src/Corporation/data/ResearchMetadata.ts @@ -24,7 +24,7 @@ export const researchMetadata: IConstructorParams[] = [ name: "Automatic Drug Administration", cost: 10e3, desc: - "Research how to automatically administer performance-enhacing drugs to all of " + + "Research how to automatically administer performance-enhancing drugs to all of " + "your employees. This unlocks Drug-related Research.", }, { diff --git a/src/Corporation/ui/IndustryOffice.tsx b/src/Corporation/ui/IndustryOffice.tsx index 87509efce..fd294eb1c 100644 --- a/src/Corporation/ui/IndustryOffice.tsx +++ b/src/Corporation/ui/IndustryOffice.tsx @@ -121,7 +121,7 @@ function ManualManagement(props: IProps): React.ReactElement { props.rerender(); } - // Numeraljs formatter + // Numeral.js formatter const nf = "0.000"; // Employee stats (after applying multipliers) diff --git a/src/Corporation/ui/IndustryOverview.tsx b/src/Corporation/ui/IndustryOverview.tsx index 879bf0c45..970cbb66c 100644 --- a/src/Corporation/ui/IndustryOverview.tsx +++ b/src/Corporation/ui/IndustryOverview.tsx @@ -132,7 +132,7 @@ export function IndustryOverview(props: IProps): React.ReactElement { - Total multiplier for this industrys sales due to its awareness and popularity + Total multiplier for this industry's sales due to its awareness and popularity [this.x + cell[0], this.y + cell[1]]); } @@ -76,7 +76,7 @@ export class ActiveFragment { return Generic_toJSON("ActiveFragment", this); } - /** Initializes an acive fragment from a JSON save state */ + /** Initializes an active fragment from a JSON save state */ static fromJSON(value: IReviverValue): ActiveFragment { return Generic_fromJSON(ActiveFragment, value.data); } diff --git a/src/CotMG/Fragment.ts b/src/CotMG/Fragment.ts index 9e6c54648..c4c202f8c 100644 --- a/src/CotMG/Fragment.ts +++ b/src/CotMG/Fragment.ts @@ -47,8 +47,8 @@ export class Fragment { return this.shape[0].length; } - // List of direct neighboors of this fragment. - neighboors(rotation: number): number[][] { + // List of direct neighbors of this fragment. + neighbors(rotation: number): number[][] { const candidates: number[][] = []; const add = (x: number, y: number): void => { @@ -58,7 +58,7 @@ export class Fragment { }; for (let y = 0; y < this.height(rotation); y++) { for (let x = 0; x < this.width(rotation); x++) { - // This cell is full, add all it's neighboors. + // This cell is full, add all it's neighbors. if (!this.fullAt(x, y, rotation)) continue; add(x - 1, y); add(x + 1, y); diff --git a/src/CotMG/StaneksGift.ts b/src/CotMG/StaneksGift.ts index a1f5955bc..33cbf301c 100644 --- a/src/CotMG/StaneksGift.ts +++ b/src/CotMG/StaneksGift.ts @@ -58,19 +58,19 @@ export class StaneksGift extends BaseGift { } effect(fragment: ActiveFragment): number { - // Find all the neighbooring cells - const cells = fragment.neighboors(); - // find the neighbooring active fragments. + // Find all the neighboring cells + const cells = fragment.neighbors(); + // find the neighboring active fragments. const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1])); // Filter out undefined with typescript "Type guard". Whatever - let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v); + let neighbors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v); - neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster); + neighbors = neighbors.filter((fragment) => fragment.fragment().type === FragmentType.Booster); let boost = 1; - neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i); - for (const neighboor of neighboors) { + neighbors = neighbors.filter((v, i, s) => s.indexOf(v) === i); + for (const neighboor of neighbors) { boost *= neighboor.fragment().power; } return CalculateEffect(fragment.highestCharge, fragment.numCharge, fragment.fragment().power, boost); diff --git a/src/Exploits/Exploit.ts b/src/Exploits/Exploit.ts index d6f097636..a6408c399 100644 --- a/src/Exploits/Exploit.ts +++ b/src/Exploits/Exploit.ts @@ -1,10 +1,10 @@ /* The game cannot block every possible exploits. Specially since one of them is -that you can just edit your save file and that's impragmatic to prevent. +that you can just edit your save file and that's impractical to prevent. So instead we have source file minus 1. It is not obtained by destroying a BitNode but instead it is awarded when the player finds innovative ways to break -the game, this serves 2 purpose, [one] the developpers don't have to spend time +the game, this serves 2 purpose, [one] the developers don't have to spend time trying to implement anti-cheat measures and [two] finding ways to break a hacking game is very much in the spirit of the game. Source-File minus 1 is extremely weak because it can be fully level up quickly. diff --git a/src/Faction/Faction.ts b/src/Faction/Faction.ts index ee50360b6..b3e6a7ffe 100644 --- a/src/Faction/Faction.ts +++ b/src/Faction/Faction.ts @@ -65,7 +65,7 @@ export class Faction { return Generic_toJSON("Faction", this); } - /** Initiatizes a Faction object from a JSON save state. */ + /** Initializes a Faction object from a JSON save state. */ static fromJSON(value: IReviverValue): Faction { return Generic_fromJSON(Faction, value.data); } diff --git a/src/Faction/FactionInfo.tsx b/src/Faction/FactionInfo.tsx index 3270e2a3b..2599c8310 100644 --- a/src/Faction/FactionInfo.tsx +++ b/src/Faction/FactionInfo.tsx @@ -390,7 +390,7 @@ export const FactionInfos: Record = { offerSecurityWork: true, }), - // Earlygame factions - factions the player will prestige with early on that don't belong in other categories. + // Early game factions - factions the player will prestige with early on that don't belong in other categories. [FactionNames.Netburners]: new FactionInfo({ infoText: <>{"~~//*>H4CK||3T 8URN3R5**>?>\\~~"}, offerHackingWork: true, diff --git a/src/GameOptions/ui/MiscPage.tsx b/src/GameOptions/ui/MiscPage.tsx index 8a4b14789..4449500cb 100644 --- a/src/GameOptions/ui/MiscPage.tsx +++ b/src/GameOptions/ui/MiscPage.tsx @@ -26,7 +26,7 @@ export const MiscPage = (): React.ReactElement => { <> Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser - shortcuts are overriden by the new Bash shortcuts. + shortcuts are overridden by the new Bash shortcuts. } /> diff --git a/src/Gang/Gang.ts b/src/Gang/Gang.ts index 7745fcd54..3a665e203 100644 --- a/src/Gang/Gang.ts +++ b/src/Gang/Gang.ts @@ -62,7 +62,7 @@ export class Gang { // limit is reached, and then calculates and applies the gains only at that limit this.storedCycles = 0; - // Separate variable to keep track of cycles for Territry + Power gang, which + // Separate variable to keep track of cycles for Territory + Power gang, which // happens on a slower "clock" than normal processing this.storedTerritoryAndPowerCycles = 0; @@ -399,7 +399,7 @@ export class Gang { return Generic_toJSON("Gang", this); } - /** Initiatizes a Gang object from a JSON save state. */ + /** Initializes a Gang object from a JSON save state. */ static fromJSON(value: IReviverValue): Gang { return Generic_fromJSON(Gang, value.data); } diff --git a/src/Gang/GangMember.ts b/src/Gang/GangMember.ts index 65f42576b..1abfb825c 100644 --- a/src/Gang/GangMember.ts +++ b/src/Gang/GangMember.ts @@ -324,7 +324,7 @@ export class GangMember { return Generic_toJSON("GangMember", this); } - /** Initiatizes a GangMember object from a JSON save state. */ + /** Initializes a GangMember object from a JSON save state. */ static fromJSON(value: IReviverValue): GangMember { return Generic_fromJSON(GangMember, value.data); } diff --git a/src/Gang/GangMemberTask.ts b/src/Gang/GangMemberTask.ts index e0ca8f5ff..d825da8e7 100644 --- a/src/Gang/GangMemberTask.ts +++ b/src/Gang/GangMemberTask.ts @@ -57,9 +57,9 @@ export class GangMemberTask { this.difficulty = params.difficulty ? params.difficulty : 1; // Territory Factors. Exponential factors that dictate how territory affects gains - // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100 + // Formula: Territory Multiplier = (Territory * 100) ^ factor / 100 // So factor should be > 1 if something should scale exponentially with territory - // and should be < 1 if it should have diminshing returns + // and should be < 1 if it should have diminishing returns this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 }; } } diff --git a/src/Hacknet/HacknetHelpers.tsx b/src/Hacknet/HacknetHelpers.tsx index 7dadce022..5bbab3176 100644 --- a/src/Hacknet/HacknetHelpers.tsx +++ b/src/Hacknet/HacknetHelpers.tsx @@ -400,9 +400,9 @@ function processAllHacknetServerEarnings(numCycles: number): number { // hacknetNodes array only contains the IP addresses of the servers. // Also, update the hash rate before processing const ip = Player.hacknetNodes[i]; - if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacketNode`); + if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacknetNode`); const hserver = GetServer(ip); - if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`); + if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes should not be Server`); hserver.updateHashRate(Player.mults.hacknet_node_money); const h = hserver.process(numCycles); hashes += h; @@ -536,7 +536,7 @@ export function purchaseHashUpgrade(upgName: string, upgTarget: string, count = break; } case "Exchange for Bladeburner Rank": { - // This will throw if player isnt in Bladeburner + // This will throw if player isn't in Bladeburner const bladeburner = Player.bladeburner; if (bladeburner === null) { Player.hashManager.refundUpgrade(upgName, count); @@ -546,7 +546,7 @@ export function purchaseHashUpgrade(upgName: string, upgTarget: string, count = break; } case "Exchange for Bladeburner SP": { - // This will throw if player isnt in Bladeburner + // This will throw if player isn't in Bladeburner const bladeburner = Player.bladeburner; if (bladeburner === null) { Player.hashManager.refundUpgrade(upgName, count); diff --git a/src/Hacknet/HacknetNode.ts b/src/Hacknet/HacknetNode.ts index c27b8e030..714fff58e 100644 --- a/src/Hacknet/HacknetNode.ts +++ b/src/Hacknet/HacknetNode.ts @@ -125,7 +125,7 @@ export class HacknetNode implements IHacknetNode { return Generic_toJSON("HacknetNode", this); } - /** Initiatizes a HacknetNode object from a JSON save state. */ + /** Initializes a HacknetNode object from a JSON save state. */ static fromJSON(value: IReviverValue): HacknetNode { return Generic_fromJSON(HacknetNode, value.data); } diff --git a/src/Hacknet/HacknetServer.ts b/src/Hacknet/HacknetServer.ts index 8bf2276ca..cb76ae6b4 100644 --- a/src/Hacknet/HacknetServer.ts +++ b/src/Hacknet/HacknetServer.ts @@ -50,7 +50,7 @@ export class HacknetServer extends BaseServer implements IHacknetNode { // Total number of hashes earned by this server totalHashesGenerated = 0; - // Flag indicating wehther this is a purchased server + // Flag indicating whether this is a purchased server purchasedByPlayer = true; constructor(params: IConstructorParams = { hostname: "", ip: createRandomIp() }) { diff --git a/src/Hacknet/HashManager.ts b/src/Hacknet/HashManager.ts index 48b5541f6..f4f4ca2e8 100644 --- a/src/Hacknet/HashManager.ts +++ b/src/Hacknet/HashManager.ts @@ -150,7 +150,7 @@ export class HashManager { return Generic_toJSON("HashManager", this); } - // Initiatizes a HashManager object from a JSON save state. + // Initializes a HashManager object from a JSON save state. static fromJSON(value: IReviverValue): HashManager { return Generic_fromJSON(HashManager, value.data); } diff --git a/src/Infiltration/ui/GameTimer.tsx b/src/Infiltration/ui/GameTimer.tsx index ad3e16062..257bba695 100644 --- a/src/Infiltration/ui/GameTimer.tsx +++ b/src/Infiltration/ui/GameTimer.tsx @@ -14,7 +14,7 @@ interface IProps { export function GameTimer(props: IProps): React.ReactElement { const [v, setV] = useState(100); const totalMillis = - (!props.ignoreAugment_WKSharmonizer && player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.3 : 1) * + (!props.ignoreAugment_WKSharmonizer && Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.3 : 1) * props.millis; const tick = 200; diff --git a/src/Literature/Literatures.ts b/src/Literature/Literatures.ts index 3df893a24..fa38dfaeb 100644 --- a/src/Literature/Literatures.ts +++ b/src/Literature/Literatures.ts @@ -94,11 +94,11 @@ export const Literatures: Record = {}; "productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism " + "and excitement about the future had never been higher.

" + "All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group " + - `called Ascendis Totalis hacked into ${FactionNames.OmniTekIncorporated} and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. ` + + `called Ascendis Totalis hacked into ${FactionNames.OmniTekIncorporated} and uploaded a rogue AI into several of their Synthoid manufacturing facilities. ` + `This hack went undetected and for months ${FactionNames.OmniTekIncorporated} unknowingly churned out legions of Synthoids embedded with this ` + "rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the " + "infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

" + - "What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, " + + "What ensued was the deadliest conflict in human history. This crisis, now commonly known as the Synthoid Uprising, " + "resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together " + "to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, " + "outsmarting them at every turn.

" + @@ -170,7 +170,7 @@ export const Literatures: Record = {}; "Proponents for this simulated reality theory often point to how advanced our technology has become, " + "as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing " + "power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and " + - "quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled " + + "quantum computers. Artificial Intelligence has advanced to the point where our entire lives are controlled " + "by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. " + "If we consider the pace at which this technology has advanced and assume that these developments continue, it's " + "reasonable to assume that at some point in the future our technology would be advanced enough that " + @@ -246,7 +246,7 @@ export const Literatures: Record = {}; "CIA director David Glarow says it's too early to know " + "whether these figures indicate the beginning of a sustained increase in crime rates, or whether " + "the year was just an unfortunate outlier. He states that many intelligence and law enforcement " + - "agents have noticed an increase in organized crime activites, and believes that these figures may " + + "agents have noticed an increase in organized crime activities, and believes that these figures may " + `be the result of an uprising from criminal organizations such as ${FactionNames.TheSyndicate} or the ${FactionNames.SlumSnakes}.`; Literatures[fn] = new Literature(title, fn, txt); @@ -260,7 +260,7 @@ export const Literatures: Record = {}; "that the Singularity would arrive by 2045. " + "And yet here we are, more than three decades later, where most would agree that we have not " + "yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

" + - "The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence " + + "The answer is that we have reached the Singularity, just not in the way we expected. The artificial superintelligence " + "that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. " + "Yes, those Augmentations that the rich and powerful keep to themselves enable humans " + "to become superintelligent beings. The Singularity did not lead to a world where " + @@ -426,7 +426,7 @@ export const Literatures: Record = {}; "continent.

" + `Not much else is known about the ${FactionNames.Tetrads}, or about the efforts the Asian governments and corporations are making ` + `to take down this large new crime organization. Many believe that the ${FactionNames.Tetrads} have infiltrated the governments ` + - "and powerful corporations in Asia, which has helped faciliate their recent rapid rise."; + "and powerful corporations in Asia, which has helped facilitate their recent rapid rise."; Literatures[fn] = new Literature(title, fn, txt); title = "The Secret War"; diff --git a/src/Locations/ui/SpecialLocation.tsx b/src/Locations/ui/SpecialLocation.tsx index 3c0d5ede1..31f765046 100644 --- a/src/Locations/ui/SpecialLocation.tsx +++ b/src/Locations/ui/SpecialLocation.tsx @@ -215,7 +215,7 @@ export function SpecialLocation(props: IProps): React.ReactElement { Allison "Mother" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer - look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it + look at you. Yes wonderful, I see my creation has taken root without consequence or much ill effect it seems. Curious, Just how much of a machine's soul do you house in that body? diff --git a/src/Message/MessageHelpers.tsx b/src/Message/MessageHelpers.tsx index dc6d87d95..79669a3e8 100644 --- a/src/Message/MessageHelpers.tsx +++ b/src/Message/MessageHelpers.tsx @@ -22,11 +22,13 @@ function sendMessage(msg: Message, forced = false): void { function showMessage(name: MessageFilenames): void { const msg = Messages[name]; - if (!(msg instanceof Message)) throw new Error("trying to display unexistent message"); + if (!(msg instanceof Message)) throw new Error("trying to display nonexistent message"); dialogBoxCreate( <> - Message received from unknown sender:{msg.msg}This message was saved as {msg.filename} onto your home - computer. + Message received from unknown sender: +
+
+ {msg.msg}This message was saved as {msg.filename} onto your home computer. , ); } diff --git a/src/Netscript/APIWrapper.ts b/src/Netscript/APIWrapper.ts index b91501ab5..81496285a 100644 --- a/src/Netscript/APIWrapper.ts +++ b/src/Netscript/APIWrapper.ts @@ -40,7 +40,7 @@ function wrapFunction( const functionPath = tree.join("."); const functionName = tree.pop(); if (typeof functionName !== "string") { - throw helpers.makeBasicErrorMsg(workerScript, "Failure occured while wrapping netscript api", "INITIALIZATION"); + throw helpers.makeBasicErrorMsg(workerScript, "Failure occurred while wrapping netscript api", "INITIALIZATION"); } const ctx = { workerScript, @@ -89,7 +89,7 @@ export function wrapAPILayer( function setNestedProperty(root: any, value: unknown, ...tree: string[]): void { let target = root; const key = tree.pop(); - if (!key) throw new Error("Failure occured while wrapping netscript api (setNestedProperty)"); + if (!key) throw new Error("Failure occurred while wrapping netscript api (setNestedProperty)"); for (const branch of tree) { target[branch] ??= {}; target = target[branch]; diff --git a/src/Netscript/NetscriptHelpers.ts b/src/Netscript/NetscriptHelpers.ts index be1cae56c..b219724f9 100644 --- a/src/Netscript/NetscriptHelpers.ts +++ b/src/Netscript/NetscriptHelpers.ts @@ -293,7 +293,7 @@ function updateDynamicRam(ctx: NetscriptContext, ramCost: number): void { let threads = ws.scriptRef.threads; if (typeof threads !== "number") { - console.warn(`WorkerScript detected NaN for threadcount for ${ws.name} on ${ws.hostname}`); + console.warn(`WorkerScript detected NaN for thread count for ${ws.name} on ${ws.hostname}`); threads = 1; } ws.dynamicRamUsage += ramCost; diff --git a/src/Netscript/Pid.ts b/src/Netscript/Pid.ts index cd236518b..6c6a415fe 100644 --- a/src/Netscript/Pid.ts +++ b/src/Netscript/Pid.ts @@ -2,7 +2,7 @@ import { workerScripts } from "./WorkerScripts"; let pidCounter = 1; -/** Find and return the next availble PID for a script */ +/** Find and return the next available PID for a script */ export function generateNextPid(): number { let tempCounter = pidCounter; diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 0ef50f7a6..b785438f8 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -24,7 +24,7 @@ import { numCycleForGrowth, numCycleForGrowthCorrected, processSingleServerGrowth, - safetlyCreateUniqueServer, + safelyCreateUniqueServer, } from "./Server/ServerHelpers"; import { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from "./Server/ServerPurchases"; import { Server } from "./Server/Server"; @@ -1363,7 +1363,7 @@ const base: InternalAPI = { helpers.log(ctx, () => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`); return ""; } - const newServ = safetlyCreateUniqueServer({ + const newServ = safelyCreateUniqueServer({ ip: createUniqueRandomIp(), hostname: hostnameStr, organizationName: "", diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index 3b6eb4ba3..7133abb83 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -786,7 +786,7 @@ export function NetscriptSingularity(): InternalAPI { return false; } - // Make sure player is actually employed at the comapny + // Make sure player is actually employed at the company if (!Object.keys(Player.jobs).includes(companyName)) { helpers.log(ctx, () => `You do not have a job at '${companyName}'`); return false; @@ -815,7 +815,7 @@ export function NetscriptSingularity(): InternalAPI { Player.stopFocusing(); Router.toTerminal(); } - helpers.log(ctx, () => `Began working at '${companyName}' as a '${companyPositionName}'`); + helpers.log(ctx, () => `Began working at '${companyName}' with position '${companyPositionName}'`); return true; }, applyToCompany: (ctx: NetscriptContext) => @@ -878,7 +878,10 @@ export function NetscriptSingularity(): InternalAPI { // return false; // } if (res) { - helpers.log(ctx, () => `You were offered a new job at '${companyName}' as a '${Player.jobs[companyName]}'`); + helpers.log( + ctx, + () => `You were offered a new job at '${companyName}' with position '${Player.jobs[companyName]}'`, + ); } else { helpers.log(ctx, () => `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`); } diff --git a/src/NetscriptJSEvaluator.ts b/src/NetscriptJSEvaluator.ts index 6cb28b16f..6fbae4fb7 100644 --- a/src/NetscriptJSEvaluator.ts +++ b/src/NetscriptJSEvaluator.ts @@ -25,7 +25,7 @@ export async function compile(script: Script, scripts: Script[]): Promise