mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Improved module import styling for all top-level src files
This commit is contained in:
parent
3b6b37f8a6
commit
df89cc5002
@ -1,24 +1,27 @@
|
|||||||
import {workerScripts,
|
// TODO - Convert this to React
|
||||||
killWorkerScript} from "./NetscriptWorker";
|
import { workerScripts, killWorkerScript } from "./NetscriptWorker";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { getServer } from "./Server/ServerHelpers";
|
import { getServer } from "./Server/ServerHelpers";
|
||||||
import {numeralWrapper} from "./ui/numeralFormat";
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
|
||||||
import {createAccordionElement} from "../utils/uiHelpers/createAccordionElement";
|
|
||||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
|
||||||
import {createElement} from "../utils/uiHelpers/createElement";
|
|
||||||
import {createProgressBarText} from "../utils/helpers/createProgressBarText";
|
|
||||||
import {exceptionAlert} from "../utils/helpers/exceptionAlert";
|
|
||||||
import {getElementById} from "../utils/uiHelpers/getElementById";
|
|
||||||
import {logBoxCreate} from "../utils/LogBox";
|
|
||||||
import {formatNumber,
|
|
||||||
convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
|
|
||||||
import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement";
|
|
||||||
import {removeElement} from "../utils/uiHelpers/removeElement";
|
|
||||||
import {roundToTwo} from "../utils/helpers/roundToTwo";
|
|
||||||
import {Page, routing} from "./ui/navigationTracking";
|
|
||||||
|
|
||||||
/* {
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
|
|
||||||
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
|
import { logBoxCreate } from "../utils/LogBox";
|
||||||
|
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
|
||||||
|
import { arrayToString } from "../utils/helpers/arrayToString";
|
||||||
|
import { createProgressBarText } from "../utils/helpers/createProgressBarText";
|
||||||
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
|
import { roundToTwo } from "../utils/helpers/roundToTwo";
|
||||||
|
import { createAccordionElement } from "../utils/uiHelpers/createAccordionElement";
|
||||||
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
|
import { getElementById } from "../utils/uiHelpers/getElementById";
|
||||||
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
|
import { removeElement } from "../utils/uiHelpers/removeElement";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {
|
||||||
* serverName: {
|
* serverName: {
|
||||||
* header: Server Header Element
|
* header: Server Header Element
|
||||||
* panel: Server Panel List (ul) element
|
* panel: Server Panel List (ul) element
|
||||||
@ -28,8 +31,8 @@ import {Page, routing} from "./ui/navigationTracking";
|
|||||||
* }
|
* }
|
||||||
* ...
|
* ...
|
||||||
*/
|
*/
|
||||||
let ActiveScriptsUI = {};
|
const ActiveScriptsUI = {};
|
||||||
let ActiveScriptsTasks = []; //Sequentially schedule the creation/deletion of UI elements
|
const ActiveScriptsTasks = []; //Sequentially schedule the creation/deletion of UI elements
|
||||||
|
|
||||||
const getHeaderHtml = (server) => {
|
const getHeaderHtml = (server) => {
|
||||||
// TODO: calculate the longest hostname length rather than hard coding it
|
// TODO: calculate the longest hostname length rather than hard coding it
|
||||||
|
@ -8,25 +8,31 @@ import { Factions, factionExists } from "./Faction/Factions";
|
|||||||
import { joinFaction, displayFactionContent } from "./Faction/FactionHelpers";
|
import { joinFaction, displayFactionContent } from "./Faction/FactionHelpers";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { hackWorldDaemon, redPillFlag } from "./RedPill";
|
import { hackWorldDaemon, redPillFlag } from "./RedPill";
|
||||||
import { numeralWrapper } from "./ui/numeralFormat";
|
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
|
||||||
import { KEY } from "../utils/helpers/keyCodes";
|
|
||||||
|
|
||||||
import { createProgressBarText } from "../utils/helpers/createProgressBarText";
|
|
||||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
|
||||||
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
|
||||||
import { Reviver, Generic_toJSON,
|
|
||||||
Generic_fromJSON } from "../utils/JSONReviver";
|
|
||||||
import { addOffset } from "../utils/helpers/addOffset";
|
|
||||||
import { appendLineBreaks } from "../utils/uiHelpers/appendLineBreaks";
|
|
||||||
import { clearObject } from "../utils/helpers/clearObject";
|
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
|
||||||
import { createPopup } from "../utils/uiHelpers/createPopup";
|
|
||||||
import { Page, routing } from "./ui/navigationTracking";
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
|
|
||||||
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
|
import {
|
||||||
|
Reviver,
|
||||||
|
Generic_toJSON,
|
||||||
|
Generic_fromJSON
|
||||||
|
} from "../utils/JSONReviver";
|
||||||
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
import { formatNumber } from "../utils/StringHelperFunctions";
|
import { formatNumber } from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
import { addOffset } from "../utils/helpers/addOffset";
|
||||||
|
import { clearObject } from "../utils/helpers/clearObject";
|
||||||
|
import { createProgressBarText } from "../utils/helpers/createProgressBarText";
|
||||||
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||||
import { getTimestamp } from "../utils/helpers/getTimestamp";
|
import { getTimestamp } from "../utils/helpers/getTimestamp";
|
||||||
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
|
|
||||||
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
|
import { appendLineBreaks } from "../utils/uiHelpers/appendLineBreaks";
|
||||||
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
import { removeElement } from "../utils/uiHelpers/removeElement";
|
import { removeElement } from "../utils/uiHelpers/removeElement";
|
||||||
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
import {Engine} from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
|
|
||||||
import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement";
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
import {createElement} from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import {exceptionAlert} from "../utils/helpers/exceptionAlert";
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
import {isString} from "../utils/helpers/isString";
|
import { isString } from "../utils/helpers/isString";
|
||||||
|
|
||||||
var cinematicTextFlag = false;
|
export let cinematicTextFlag = false;
|
||||||
|
|
||||||
//Lines must be an array of strings
|
// Lines must be an array of strings
|
||||||
function writeCinematicText(lines) {
|
export function writeCinematicText(lines) {
|
||||||
cinematicTextFlag = true;
|
cinematicTextFlag = true;
|
||||||
|
|
||||||
if (lines.constructor !== Array) {
|
if (lines.constructor !== Array) {
|
||||||
throw new Error("Invalid non-array argument passed into writeCinematicText()");
|
throw new Error("Invalid non-array argument passed into writeCinematicText()");
|
||||||
}
|
}
|
||||||
|
|
||||||
//We'll reuse the 'Red Pill' content
|
// Reuse the 'Red Pill' content
|
||||||
Engine.loadCinematicTextContent();
|
Engine.loadCinematicTextContent();
|
||||||
var container = document.getElementById("cinematic-text-container");
|
const container = document.getElementById("cinematic-text-container");
|
||||||
container.style.width = "75%";
|
container.style.width = "75%";
|
||||||
if (container == null) {throw new Error("Could not find cinematic-text-container for writeCinematicText()");}
|
if (container == null) {throw new Error("Could not find cinematic-text-container for writeCinematicText()");}
|
||||||
removeChildrenFromElement(container);
|
removeChildrenFromElement(container);
|
||||||
|
|
||||||
for (var i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
if (!isString(lines[i])) {
|
if (!isString(lines[i])) {
|
||||||
throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");
|
throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");
|
||||||
}
|
}
|
||||||
@ -45,11 +45,11 @@ function writeCinematicTextRecurse(lines, lineNumber=0) {
|
|||||||
|
|
||||||
function writeCinematicTextLine(line) {
|
function writeCinematicTextLine(line) {
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
var container = document.getElementById("cinematic-text-container");
|
const container = document.getElementById("cinematic-text-container");
|
||||||
var pElem = document.createElement("p");
|
const pElem = document.createElement("p");
|
||||||
container.appendChild(pElem);
|
container.appendChild(pElem);
|
||||||
|
|
||||||
var promise = writeCinematicTextLetter(pElem, line, 0);
|
const promise = writeCinematicTextLetter(pElem, line, 0);
|
||||||
promise.then(function(res) {
|
promise.then(function(res) {
|
||||||
resolve(res);
|
resolve(res);
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
@ -61,14 +61,15 @@ function writeCinematicTextLine(line) {
|
|||||||
function writeCinematicTextLetter(pElem, line, i=0) {
|
function writeCinematicTextLetter(pElem, line, i=0) {
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
setTimeoutRef(function() {
|
setTimeoutRef(function() {
|
||||||
|
const textToShow = line.substring(0, i);
|
||||||
|
|
||||||
if (i >= line.length) {
|
if (i >= line.length) {
|
||||||
var textToShow = line.substring(0, i);
|
|
||||||
pElem.innerHTML = textToShow;
|
pElem.innerHTML = textToShow;
|
||||||
return resolve(true);
|
return resolve(true);
|
||||||
}
|
}
|
||||||
var textToShow = line.substring(0, i);
|
|
||||||
pElem.innerHTML = textToShow + "<span class='typed-cursor'> █ </span>";
|
pElem.innerHTML = textToShow + "<span class='typed-cursor'> █ </span>";
|
||||||
var promise = writeCinematicTextLetter(pElem, line, i+1);
|
const promise = writeCinematicTextLetter(pElem, line, i+1);
|
||||||
promise.then(function(res) {
|
promise.then(function(res) {
|
||||||
resolve(res);
|
resolve(res);
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
@ -96,5 +97,3 @@ function cinematicTextEnd() {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export {cinematicTextFlag, writeCinematicText};
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { CodingContract,
|
import {
|
||||||
|
CodingContract,
|
||||||
CodingContractRewardType,
|
CodingContractRewardType,
|
||||||
CodingContractTypes } from "./CodingContracts";
|
CodingContractTypes
|
||||||
|
} from "./CodingContracts";
|
||||||
import { Factions } from "./Faction/Factions";
|
import { Factions } from "./Faction/Factions";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { AllServers } from "./Server/AllServers";
|
import { AllServers } from "./Server/AllServers";
|
||||||
@ -8,6 +10,7 @@ import { GetServerByHostname } from "./Server/ServerHelpers";
|
|||||||
|
|
||||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||||
|
|
||||||
|
|
||||||
export function generateRandomContract() {
|
export function generateRandomContract() {
|
||||||
// First select a random problem type
|
// First select a random problem type
|
||||||
let problemType = getRandomProblemType();
|
let problemType = getRandomProblemType();
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
import { codingContractTypesMetadata,
|
import {
|
||||||
|
codingContractTypesMetadata,
|
||||||
DescriptionFunc,
|
DescriptionFunc,
|
||||||
GeneratorFunc,
|
GeneratorFunc,
|
||||||
SolverFunc } from "./data/codingcontracttypes";
|
SolverFunc
|
||||||
|
} from "./data/codingcontracttypes";
|
||||||
|
|
||||||
import { IMap } from "./types";
|
import { IMap } from "./types";
|
||||||
|
|
||||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
import {
|
||||||
|
Generic_fromJSON,
|
||||||
|
Generic_toJSON,
|
||||||
|
Reviver
|
||||||
|
} from "../utils/JSONReviver";
|
||||||
import { KEY } from "../utils/helpers/keyCodes";
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import { createPopup } from "../utils/uiHelpers/createPopup";
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
@ -13,6 +19,7 @@ import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */
|
/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */
|
||||||
|
|
||||||
/* Represents different types of problems that a Coding Contract can have */
|
/* Represents different types of problems that a Coding Contract can have */
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Constants for specific mechanics or features will NOT be here.
|
* Constants for specific mechanics or features will NOT be here.
|
||||||
*/
|
*/
|
||||||
import {IMap} from "./types";
|
import { IMap } from "./types";
|
||||||
|
|
||||||
export let CONSTANTS: IMap<any> = {
|
export let CONSTANTS: IMap<any> = {
|
||||||
Version: "0.46.1",
|
Version: "0.46.1",
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||||
import { CodingContractTypes } from "./CodingContracts";
|
import { CodingContractTypes } from "./CodingContracts";
|
||||||
import { generateContract,
|
import {
|
||||||
|
generateContract,
|
||||||
generateRandomContract,
|
generateRandomContract,
|
||||||
generateRandomContractOnHome } from "./CodingContractGenerator";
|
generateRandomContractOnHome
|
||||||
|
} from "./CodingContractGenerator";
|
||||||
import { Companies } from "./Company/Companies";
|
import { Companies } from "./Company/Companies";
|
||||||
import { Company } from "./Company/Company";
|
import { Company } from "./Company/Company";
|
||||||
import { Programs } from "./Programs/Programs";
|
import { Programs } from "./Programs/Programs";
|
||||||
@ -12,8 +14,7 @@ import { PlayerOwnedSourceFile } from "./SourceFile/PlayerOwnedSourceFile
|
|||||||
import { AllServers } from "./Server/AllServers";
|
import { AllServers } from "./Server/AllServers";
|
||||||
import { GetServerByHostname } from "./Server/ServerHelpers";
|
import { GetServerByHostname } from "./Server/ServerHelpers";
|
||||||
import { hackWorldDaemon } from "./RedPill";
|
import { hackWorldDaemon } from "./RedPill";
|
||||||
import { StockMarket,
|
import { StockMarket, SymbolToStockMap } from "./StockMarket/StockMarket";
|
||||||
SymbolToStockMap } from "./StockMarket/StockMarket";
|
|
||||||
import { Stock } from "./StockMarket/Stock";
|
import { Stock } from "./StockMarket/Stock";
|
||||||
import { Terminal } from "./Terminal";
|
import { Terminal } from "./Terminal";
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ import { removeElementById } from "../utils/uiHelpers/removeElementBy
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
|
|
||||||
|
|
||||||
const Component = React.Component;
|
const Component = React.Component;
|
||||||
|
|
||||||
const validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12];
|
const validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12];
|
||||||
|
21
src/Gang.js
21
src/Gang.js
@ -10,23 +10,30 @@ import { Engine } from "./engine";
|
|||||||
import { Faction } from "./Faction/Faction";
|
import { Faction } from "./Faction/Faction";
|
||||||
import { Factions } from "./Faction/Factions";
|
import { Factions } from "./Faction/Factions";
|
||||||
import { displayFactionContent } from "./Faction/FactionHelpers";
|
import { displayFactionContent } from "./Faction/FactionHelpers";
|
||||||
|
|
||||||
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
import { numeralWrapper } from "./ui/numeralFormat";
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
|
|
||||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import { Reviver, Generic_toJSON,
|
import {
|
||||||
Generic_fromJSON } from "../utils/JSONReviver";
|
Reviver,
|
||||||
|
Generic_toJSON,
|
||||||
|
Generic_fromJSON
|
||||||
|
} from "../utils/JSONReviver";
|
||||||
|
import { formatNumber } from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
|
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||||
import { KEY } from "../utils/helpers/keyCodes";
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
|
|
||||||
import { createAccordionElement } from "../utils/uiHelpers/createAccordionElement";
|
import { createAccordionElement } from "../utils/uiHelpers/createAccordionElement";
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import { createPopup } from "../utils/uiHelpers/createPopup";
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
import { Page,
|
|
||||||
routing } from "./ui/navigationTracking";
|
|
||||||
import { formatNumber } from "../utils/StringHelperFunctions";
|
|
||||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
|
||||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
|
||||||
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
import { removeElement } from "../utils/uiHelpers/removeElement";
|
import { removeElement } from "../utils/uiHelpers/removeElement";
|
||||||
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const GangRespectToReputationRatio = 5; // Respect is divided by this to get rep gain
|
const GangRespectToReputationRatio = 5; // Respect is divided by this to get rep gain
|
||||||
const MaximumGangMembers = 30;
|
const MaximumGangMembers = 30;
|
||||||
|
@ -8,24 +8,6 @@ import { getRandomInt } from "../utils/helpers/getRandom
|
|||||||
import { infiltrationBoxCreate } from "../utils/InfiltrationBox";
|
import { infiltrationBoxCreate } from "../utils/InfiltrationBox";
|
||||||
import { formatNumber } from "../utils/StringHelperFunctions";
|
import { formatNumber } from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
/* Infiltration.js
|
|
||||||
*
|
|
||||||
* Kill
|
|
||||||
* Knockout (nonlethal)
|
|
||||||
* Stealth Knockout (nonlethal)
|
|
||||||
* Assassinate
|
|
||||||
*
|
|
||||||
* Hack Security
|
|
||||||
* Destroy Security
|
|
||||||
* Sneak past Security
|
|
||||||
*
|
|
||||||
* Pick the locked door
|
|
||||||
*
|
|
||||||
* Bribe security
|
|
||||||
*
|
|
||||||
* Escape
|
|
||||||
*/
|
|
||||||
|
|
||||||
let InfiltrationScenarios = {
|
let InfiltrationScenarios = {
|
||||||
Guards: "You see an armed security guard patrolling the area.",
|
Guards: "You see an armed security guard patrolling the area.",
|
||||||
TechOnly: "The area is equipped with a state-of-the-art security system: cameras, laser tripwires, and sentry turrets.",
|
TechOnly: "The area is equipped with a state-of-the-art security system: cameras, laser tripwires, and sentry turrets.",
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
import { Engine } from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { Settings } from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
|
|
||||||
import { initializeMainMenuLinks } from "./ui/MainMenu/Links";
|
import { initializeMainMenuLinks } from "./ui/MainMenu/Links";
|
||||||
|
|
||||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import { createPopup } from "../utils/uiHelpers/createPopup";
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
|
||||||
|
|
||||||
//Ordered array of keys to Interactive Tutorial Steps
|
//Ordered array of keys to Interactive Tutorial Steps
|
||||||
const orderedITutorialSteps = [
|
const orderedITutorialSteps = [
|
||||||
"Start",
|
"Start",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
|
|
||||||
/* Literature.js
|
/* Literature.js
|
||||||
* Lore / world building literature that can be found on servers
|
* Lore / world building literature that can be found on servers
|
||||||
|
@ -2,13 +2,18 @@ import { CONSTANTS } from "./Constants";
|
|||||||
import { Engine } from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { displayFactionContent } from "./Faction/FactionHelpers";
|
import { displayFactionContent } from "./Faction/FactionHelpers";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
|
|
||||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
|
||||||
import { addOffset } from "../utils/helpers/addOffset";
|
|
||||||
import { formatNumber } from "../utils/StringHelperFunctions";
|
import { formatNumber } from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
import { addOffset } from "../utils/helpers/addOffset";
|
||||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||||
import { isString } from "../utils/helpers/isString";
|
import { isString } from "../utils/helpers/isString";
|
||||||
import jsplumb from 'jsplumb'
|
|
||||||
|
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||||
|
|
||||||
|
import jsplumb from "jsplumb";
|
||||||
|
|
||||||
|
|
||||||
let inMission = false; //Flag to denote whether a mission is running
|
let inMission = false; //Flag to denote whether a mission is running
|
||||||
let currMission = null;
|
let currMission = null;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Player} from "./Player";
|
import { Player } from "./Player";
|
||||||
import {Bladeburner} from "./Bladeburner";
|
import { Bladeburner } from "./Bladeburner";
|
||||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
|
import { makeRuntimeRejectMsg } from "./NetscriptEvaluator";
|
||||||
|
|
||||||
function unknownBladeburnerActionErrorMessage(functionName, actionType, actionName) {
|
function unknownBladeburnerActionErrorMessage(functionName, actionType, actionName) {
|
||||||
return `ERROR: bladeburner.${functionName}() failed due to an invalid action specified. ` +
|
return `ERROR: bladeburner.${functionName}() failed due to an invalid action specified. ` +
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {NetscriptFunctions} from "./NetscriptFunctions";
|
import { NetscriptFunctions } from "./NetscriptFunctions";
|
||||||
import {NetscriptPort} from "./NetscriptPort";
|
import { NetscriptPort } from "./NetscriptPort";
|
||||||
|
|
||||||
/* Environment
|
/* Environment
|
||||||
* NetScript program environment
|
* NetScript program environment
|
||||||
|
@ -2,7 +2,7 @@ import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
|
|||||||
import { CONSTANTS } from "./Constants";
|
import { CONSTANTS } from "./Constants";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { Environment } from "./NetscriptEnvironment";
|
import { Environment } from "./NetscriptEnvironment";
|
||||||
import { WorkerScript, addWorkerScript} from "./NetscriptWorker";
|
import { WorkerScript, addWorkerScript } from "./NetscriptWorker";
|
||||||
import { Server } from "./Server/Server";
|
import { Server } from "./Server/Server";
|
||||||
import { getServer } from "./Server/ServerHelpers";
|
import { getServer } from "./Server/ServerHelpers";
|
||||||
import { Settings } from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
@ -11,11 +11,11 @@ import { Script } from "./Script/Script";
|
|||||||
import { findRunningScript } from "./Script/ScriptHelpers";
|
import { findRunningScript } from "./Script/ScriptHelpers";
|
||||||
|
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
|
import { parse, Node } from "../utils/acorn";
|
||||||
|
|
||||||
import {parse, Node} from "../utils/acorn";
|
import { arrayToString } from "../utils/helpers/arrayToString";
|
||||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
import { isValidIPAddress } from "../utils/helpers/isValidIPAddress";
|
||||||
import {isValidIPAddress} from "../utils/helpers/isValidIPAddress";
|
import { isString } from "../utils/helpers/isString";
|
||||||
import {isString} from "../utils/helpers/isString";
|
|
||||||
|
|
||||||
export function evaluateImport(exp, workerScript, checkingRam=false) {
|
export function evaluateImport(exp, workerScript, checkingRam=false) {
|
||||||
//When its checking RAM, it exports an array of nodes for each imported function
|
//When its checking RAM, it exports an array of nodes for each imported function
|
||||||
|
@ -1,117 +1,149 @@
|
|||||||
var sprintf = require('sprintf-js').sprintf,
|
const sprintf = require("sprintf-js").sprintf;
|
||||||
vsprintf = require('sprintf-js').vsprintf
|
const vsprintf = require("sprintf-js").vsprintf;
|
||||||
|
|
||||||
import {updateActiveScriptsItems} from "./ActiveScriptsUI";
|
import { updateActiveScriptsItems } from "./ActiveScriptsUI";
|
||||||
import { Augmentation } from "./Augmentation/Augmentation";
|
import { Augmentation } from "./Augmentation/Augmentation";
|
||||||
import { Augmentations } from "./Augmentation/Augmentations";
|
import { Augmentations } from "./Augmentation/Augmentations";
|
||||||
import { augmentationExists,
|
import {
|
||||||
installAugmentations } from "./Augmentation/AugmentationHelpers";
|
augmentationExists,
|
||||||
|
installAugmentations
|
||||||
|
} from "./Augmentation/AugmentationHelpers";
|
||||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||||
import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
|
import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
|
||||||
import { findCrime } from "./Crime/CrimeHelpers";
|
import { findCrime } from "./Crime/CrimeHelpers";
|
||||||
import {Bladeburner} from "./Bladeburner";
|
import { Bladeburner } from "./Bladeburner";
|
||||||
import {Company} from "./Company/Company";
|
import { Company } from "./Company/Company";
|
||||||
import {Companies, companyExists} from "./Company/Companies";
|
import { Companies, companyExists } from "./Company/Companies";
|
||||||
import {CompanyPosition} from "./Company/CompanyPosition";
|
import { CompanyPosition } from "./Company/CompanyPosition";
|
||||||
import {CompanyPositions} from "./Company/CompanyPositions";
|
import { CompanyPositions } from "./Company/CompanyPositions";
|
||||||
import {CONSTANTS} from "./Constants";
|
import { CONSTANTS } from "./Constants";
|
||||||
import { DarkWebItems } from "./DarkWeb/DarkWebItems";
|
import { DarkWebItems } from "./DarkWeb/DarkWebItems";
|
||||||
import {calculateHackingChance,
|
import {
|
||||||
|
calculateHackingChance,
|
||||||
calculateHackingExpGain,
|
calculateHackingExpGain,
|
||||||
calculatePercentMoneyHacked,
|
calculatePercentMoneyHacked,
|
||||||
calculateHackingTime,
|
calculateHackingTime,
|
||||||
calculateGrowTime,
|
calculateGrowTime,
|
||||||
calculateWeakenTime} from "./Hacking";
|
calculateWeakenTime
|
||||||
import {AllGangs} from "./Gang";
|
} from "./Hacking";
|
||||||
|
import { AllGangs } from "./Gang";
|
||||||
import { Faction } from "./Faction/Faction";
|
import { Faction } from "./Faction/Faction";
|
||||||
import { Factions,
|
import { Factions, factionExists } from "./Faction/Factions";
|
||||||
factionExists } from "./Faction/Factions";
|
import { joinFaction, purchaseAugmentation } from "./Faction/FactionHelpers";
|
||||||
import { joinFaction,
|
|
||||||
purchaseAugmentation } from "./Faction/FactionHelpers";
|
|
||||||
import { FactionWorkType } from "./Faction/FactionWorkTypeEnum";
|
import { FactionWorkType } from "./Faction/FactionWorkTypeEnum";
|
||||||
import { netscriptCanGrow,
|
import {
|
||||||
|
netscriptCanGrow,
|
||||||
netscriptCanHack,
|
netscriptCanHack,
|
||||||
netscriptCanWeaken } from "./Hacking/netscriptCanHack";
|
netscriptCanWeaken
|
||||||
|
} from "./Hacking/netscriptCanHack";
|
||||||
|
|
||||||
import { getCostOfNextHacknetNode,
|
import {
|
||||||
|
getCostOfNextHacknetNode,
|
||||||
getCostOfNextHacknetServer,
|
getCostOfNextHacknetServer,
|
||||||
purchaseHacknet,
|
purchaseHacknet,
|
||||||
hasHacknetServers,
|
hasHacknetServers,
|
||||||
purchaseHashUpgrade } from "./Hacknet/HacknetHelpers";
|
purchaseHashUpgrade
|
||||||
|
} from "./Hacknet/HacknetHelpers";
|
||||||
import { CityName } from "./Locations/data/CityNames";
|
import { CityName } from "./Locations/data/CityNames";
|
||||||
import { LocationName } from "./Locations/data/LocationNames";
|
import { LocationName } from "./Locations/data/LocationNames";
|
||||||
|
|
||||||
import { HacknetServer } from "./Hacknet/HacknetServer";
|
import { HacknetServer } from "./Hacknet/HacknetServer";
|
||||||
import { Message } from "./Message/Message";
|
import { Message } from "./Message/Message";
|
||||||
import { Messages } from "./Message/MessageHelpers";
|
import { Messages } from "./Message/MessageHelpers";
|
||||||
import {inMission} from "./Missions";
|
import { inMission } from "./Missions";
|
||||||
import {Player} from "./Player";
|
import { Player } from "./Player";
|
||||||
import { Programs } from "./Programs/Programs";
|
import { Programs } from "./Programs/Programs";
|
||||||
import { Script } from "./Script/Script";
|
import { Script } from "./Script/Script";
|
||||||
import { findRunningScript } from "./Script/ScriptHelpers";
|
import { findRunningScript } from "./Script/ScriptHelpers";
|
||||||
import { isScriptFilename } from "./Script/ScriptHelpersTS";
|
import { isScriptFilename } from "./Script/ScriptHelpersTS";
|
||||||
import { AllServers,
|
import { AllServers, AddToAllServers } from "./Server/AllServers";
|
||||||
AddToAllServers } from "./Server/AllServers";
|
|
||||||
import { Server } from "./Server/Server";
|
import { Server } from "./Server/Server";
|
||||||
import { GetServerByHostname,
|
import {
|
||||||
|
GetServerByHostname,
|
||||||
getServer,
|
getServer,
|
||||||
getServerOnNetwork,
|
getServerOnNetwork,
|
||||||
numCycleForGrowth,
|
numCycleForGrowth,
|
||||||
processSingleServerGrowth } from "./Server/ServerHelpers";
|
processSingleServerGrowth
|
||||||
import { getPurchaseServerCost,
|
} from "./Server/ServerHelpers";
|
||||||
|
import {
|
||||||
|
getPurchaseServerCost,
|
||||||
getPurchaseServerLimit,
|
getPurchaseServerLimit,
|
||||||
getPurchaseServerMaxRam } from "./Server/ServerPurchases";
|
getPurchaseServerMaxRam
|
||||||
import {Settings} from "./Settings/Settings";
|
} from "./Server/ServerPurchases";
|
||||||
import {SpecialServerIps} from "./Server/SpecialServerIps";
|
import { Settings } from "./Settings/Settings";
|
||||||
import {Stock} from "./StockMarket/Stock";
|
import { SpecialServerIps } from "./Server/SpecialServerIps";
|
||||||
import {StockMarket, StockSymbols, SymbolToStockMap,
|
import { Stock } from "./StockMarket/Stock";
|
||||||
initStockMarket, initSymbolToStockMap, buyStock,
|
import {
|
||||||
sellStock, updateStockPlayerPosition,
|
StockMarket,
|
||||||
shortStock, sellShort, OrderTypes,
|
StockSymbols,
|
||||||
PositionTypes, placeOrder, cancelOrder} from "./StockMarket/StockMarket";
|
SymbolToStockMap,
|
||||||
import { getStockmarket4SDataCost,
|
initStockMarket,
|
||||||
getStockMarket4STixApiCost } from "./StockMarket/StockMarketCosts";
|
initSymbolToStockMap,
|
||||||
import { SourceFileFlags } from "./SourceFile/SourceFileFlags"
|
buyStock,
|
||||||
import {TextFile, getTextFile, createTextFile} from "./TextFile";
|
sellStock,
|
||||||
|
updateStockPlayerPosition,
|
||||||
|
shortStock,
|
||||||
|
sellShort,
|
||||||
|
OrderTypes,
|
||||||
|
PositionTypes,
|
||||||
|
placeOrder,
|
||||||
|
cancelOrder
|
||||||
|
} from "./StockMarket/StockMarket";
|
||||||
|
import {
|
||||||
|
getStockmarket4SDataCost,
|
||||||
|
getStockMarket4STixApiCost
|
||||||
|
} from "./StockMarket/StockMarketCosts";
|
||||||
|
import { SourceFileFlags } from "./SourceFile/SourceFileFlags";
|
||||||
|
import { TextFile, getTextFile, createTextFile } from "./TextFile";
|
||||||
|
|
||||||
import {unknownBladeburnerActionErrorMessage,
|
import {
|
||||||
|
unknownBladeburnerActionErrorMessage,
|
||||||
unknownBladeburnerExceptionMessage,
|
unknownBladeburnerExceptionMessage,
|
||||||
checkBladeburnerAccess} from "./NetscriptBladeburner";
|
checkBladeburnerAccess
|
||||||
|
} from "./NetscriptBladeburner";
|
||||||
import * as nsGang from "./NetscriptGang";
|
import * as nsGang from "./NetscriptGang";
|
||||||
import {WorkerScript, workerScripts,
|
import {
|
||||||
killWorkerScript, NetscriptPorts} from "./NetscriptWorker";
|
WorkerScript,
|
||||||
import {makeRuntimeRejectMsg, netscriptDelay,
|
workerScripts,
|
||||||
runScriptFromScript} from "./NetscriptEvaluator";
|
killWorkerScript,
|
||||||
import {NetscriptPort} from "./NetscriptPort";
|
NetscriptPorts
|
||||||
|
} from "./NetscriptWorker";
|
||||||
|
import {
|
||||||
|
makeRuntimeRejectMsg,
|
||||||
|
netscriptDelay,
|
||||||
|
runScriptFromScript
|
||||||
|
} from "./NetscriptEvaluator";
|
||||||
|
import { NetscriptPort } from "./NetscriptPort";
|
||||||
import { SleeveTaskType } from "./PersonObjects/Sleeve/SleeveTaskTypesEnum";
|
import { SleeveTaskType } from "./PersonObjects/Sleeve/SleeveTaskTypesEnum";
|
||||||
import { findSleevePurchasableAugs } from "./PersonObjects/Sleeve/Sleeve";
|
import { findSleevePurchasableAugs } from "./PersonObjects/Sleeve/Sleeve";
|
||||||
|
|
||||||
import {Page, routing} from "./ui/navigationTracking";
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
import {numeralWrapper} from "./ui/numeralFormat";
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
import {post} from "./ui/postToTerminal";
|
import { post } from "./ui/postToTerminal";
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
import { is2DArray } from "./utils/helpers/is2DArray";
|
import { is2DArray } from "./utils/helpers/is2DArray";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import {isPowerOfTwo} from "../utils/helpers/isPowerOfTwo";
|
import { isPowerOfTwo } from "../utils/helpers/isPowerOfTwo";
|
||||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
import { arrayToString } from "../utils/helpers/arrayToString";
|
||||||
import {createRandomIp} from "../utils/IPAddress";
|
import { createRandomIp } from "../utils/IPAddress";
|
||||||
import {formatNumber, isHTML} from "../utils/StringHelperFunctions";
|
import { formatNumber, isHTML } from "../utils/StringHelperFunctions";
|
||||||
import {isString} from "../utils/helpers/isString";
|
import { isString } from "../utils/helpers/isString";
|
||||||
|
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import { createPopup } from "../utils/uiHelpers/createPopup";
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
|
||||||
var hasCorporationSF = false, //Source-File 3
|
let hasCorporationSF = false; //Source-File 3
|
||||||
hasSingularitySF = false, //Source-File 4
|
let hasSingularitySF = false; //Source-File 4
|
||||||
hasAISF = false, //Source-File 5
|
let hasAISF = false; //Source-File 5
|
||||||
hasBladeburnerSF = false, //Source-File 6
|
let hasBladeburnerSF = false; //Source-File 6
|
||||||
hasBladeburner2079SF = false, //Source-File 7
|
let hasBladeburner2079SF = false; //Source-File 7
|
||||||
hasWallStreetSF = false, //Source-File 8
|
let hasWallStreetSF = false; //Source-File 8
|
||||||
hasBn11SF = false; //Source-File 11
|
let hasBn11SF = false; //Source-File 11
|
||||||
|
|
||||||
var singularitySFLvl=1, wallStreetSFLvl=1;
|
let singularitySFLvl = 1;
|
||||||
|
let wallStreetSFLvl = 1;
|
||||||
|
|
||||||
var possibleLogs = {
|
var possibleLogs = {
|
||||||
ALL: true,
|
ALL: true,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Player} from "./Player";
|
import { Player } from "./Player";
|
||||||
import {Gang} from "./Gang";
|
import { Gang } from "./Gang";
|
||||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
|
import { makeRuntimeRejectMsg } from "./NetscriptEvaluator";
|
||||||
|
|
||||||
export function unknownGangApiExceptionMessage(functionName, err) {
|
export function unknownGangApiExceptionMessage(functionName, err) {
|
||||||
return `gang.${functionName}() failed with exception: ` + err;
|
return `gang.${functionName}() failed with exception: ` + err;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
|
import { makeRuntimeRejectMsg } from "./NetscriptEvaluator";
|
||||||
|
|
||||||
// Makes a blob that contains the code of a given script.
|
// Makes a blob that contains the code of a given script.
|
||||||
export function makeScriptBlob(code) {
|
export function makeScriptBlob(code) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Settings} from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
|
|
||||||
function NetscriptPort() {
|
function NetscriptPort() {
|
||||||
this.data = [];
|
this.data = [];
|
||||||
|
@ -1,28 +1,34 @@
|
|||||||
import {addActiveScriptsItem,
|
import {
|
||||||
|
addActiveScriptsItem,
|
||||||
deleteActiveScriptsItem,
|
deleteActiveScriptsItem,
|
||||||
updateActiveScriptsItems} from "./ActiveScriptsUI";
|
updateActiveScriptsItems
|
||||||
import {CONSTANTS} from "./Constants";
|
} from "./ActiveScriptsUI";
|
||||||
import {Engine} from "./engine";
|
import { CONSTANTS } from "./Constants";
|
||||||
import {Interpreter} from "./JSInterpreter";
|
import { Engine } from "./engine";
|
||||||
import {Environment} from "./NetscriptEnvironment";
|
import { Interpreter } from "./JSInterpreter";
|
||||||
import {evaluate, isScriptErrorMessage,
|
import { Environment } from "./NetscriptEnvironment";
|
||||||
|
import {
|
||||||
|
evaluate,
|
||||||
|
isScriptErrorMessage,
|
||||||
makeRuntimeRejectMsg,
|
makeRuntimeRejectMsg,
|
||||||
killNetscriptDelay} from "./NetscriptEvaluator";
|
killNetscriptDelay
|
||||||
import {NetscriptFunctions} from "./NetscriptFunctions";
|
} from "./NetscriptEvaluator";
|
||||||
import {executeJSScript} from "./NetscriptJSEvaluator";
|
import { NetscriptFunctions } from "./NetscriptFunctions";
|
||||||
import {NetscriptPort} from "./NetscriptPort";
|
import { executeJSScript } from "./NetscriptJSEvaluator";
|
||||||
|
import { NetscriptPort } from "./NetscriptPort";
|
||||||
import { AllServers } from "./Server/AllServers";
|
import { AllServers } from "./Server/AllServers";
|
||||||
import {Settings} from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
|
|
||||||
import {generate} from 'escodegen';
|
import { generate } from "escodegen";
|
||||||
|
|
||||||
|
import { parse, Node } from "../utils/acorn";
|
||||||
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
|
import { compareArrays } from "../utils/helpers/compareArrays";
|
||||||
|
import { arrayToString } from "../utils/helpers/arrayToString";
|
||||||
|
import { roundToTwo } from "../utils/helpers/roundToTwo";
|
||||||
|
import { isString } from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
import {parse, Node} from "../utils/acorn";
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
|
||||||
import {compareArrays} from "../utils/helpers/compareArrays";
|
|
||||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
|
||||||
import {roundToTwo} from "../utils/helpers/roundToTwo";
|
|
||||||
import {isString} from "../utils/StringHelperFunctions";
|
|
||||||
|
|
||||||
const walk = require("acorn/dist/walk");
|
const walk = require("acorn/dist/walk");
|
||||||
|
|
||||||
|
@ -1,55 +1,68 @@
|
|||||||
import {deleteActiveScriptsItem} from "./ActiveScriptsUI";
|
import { deleteActiveScriptsItem } from "./ActiveScriptsUI";
|
||||||
import { Augmentations } from "./Augmentation/Augmentations";
|
import { Augmentations } from "./Augmentation/Augmentations";
|
||||||
import { augmentationExists,
|
import {
|
||||||
initAugmentations } from "./Augmentation/AugmentationHelpers";
|
augmentationExists,
|
||||||
|
initAugmentations
|
||||||
|
} from "./Augmentation/AugmentationHelpers";
|
||||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||||
import { initBitNodeMultipliers } from "./BitNode/BitNode";
|
import { initBitNodeMultipliers } from "./BitNode/BitNode";
|
||||||
import {Bladeburner} from "./Bladeburner";
|
import { Bladeburner } from "./Bladeburner";
|
||||||
import {writeCinematicText} from "./CinematicText";
|
import { writeCinematicText } from "./CinematicText";
|
||||||
import {Companies, initCompanies} from "./Company/Companies";
|
import { Companies, initCompanies } from "./Company/Companies";
|
||||||
import { resetIndustryResearchTrees } from "./Corporation/IndustryData";
|
import { resetIndustryResearchTrees } from "./Corporation/IndustryData";
|
||||||
import { Programs } from "./Programs/Programs";
|
import { Programs } from "./Programs/Programs";
|
||||||
import {Engine} from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { Faction } from "./Faction/Faction";
|
import { Faction } from "./Faction/Faction";
|
||||||
import { Factions,
|
import { Factions, initFactions } from "./Faction/Factions";
|
||||||
initFactions } from "./Faction/Factions";
|
|
||||||
import { joinFaction } from "./Faction/FactionHelpers";
|
import { joinFaction } from "./Faction/FactionHelpers";
|
||||||
import {deleteGangDisplayContent} from "./Gang";
|
import { deleteGangDisplayContent } from "./Gang";
|
||||||
import { Message } from "./Message/Message";
|
import { Message } from "./Message/Message";
|
||||||
import { initMessages,
|
import { initMessages, Messages } from "./Message/MessageHelpers";
|
||||||
Messages } from "./Message/MessageHelpers";
|
import { initSingularitySFFlags, hasWallStreetSF } from "./NetscriptFunctions";
|
||||||
import {initSingularitySFFlags, hasWallStreetSF}from "./NetscriptFunctions";
|
import {
|
||||||
import {WorkerScript, workerScripts,
|
WorkerScript,
|
||||||
prestigeWorkerScripts} from "./NetscriptWorker";
|
workerScripts,
|
||||||
import {Player} from "./Player";
|
prestigeWorkerScripts
|
||||||
|
} from "./NetscriptWorker";
|
||||||
|
import { Player } from "./Player";
|
||||||
|
|
||||||
import { AllServers,
|
import {
|
||||||
|
AllServers,
|
||||||
AddToAllServers,
|
AddToAllServers,
|
||||||
initForeignServers,
|
initForeignServers,
|
||||||
prestigeAllServers } from "./Server/AllServers";
|
prestigeAllServers
|
||||||
import { Server } from "./Server/Server"
|
} from "./Server/AllServers";
|
||||||
|
import { Server } from "./Server/Server";
|
||||||
import { prestigeHomeComputer } from "./Server/ServerHelpers";
|
import { prestigeHomeComputer } from "./Server/ServerHelpers";
|
||||||
import { SourceFileFlags,
|
import {
|
||||||
updateSourceFileFlags } from "./SourceFile/SourceFileFlags";
|
SourceFileFlags,
|
||||||
import { SpecialServerIps,
|
updateSourceFileFlags
|
||||||
|
} from "./SourceFile/SourceFileFlags";
|
||||||
|
import {
|
||||||
|
SpecialServerIps,
|
||||||
SpecialServerIpsMap,
|
SpecialServerIpsMap,
|
||||||
prestigeSpecialServerIps,
|
prestigeSpecialServerIps,
|
||||||
SpecialServerNames} from "./Server/SpecialServerIps";
|
SpecialServerNames
|
||||||
import {initStockMarket, initSymbolToStockMap,
|
} from "./Server/SpecialServerIps";
|
||||||
|
import {
|
||||||
|
initStockMarket,
|
||||||
|
initSymbolToStockMap,
|
||||||
stockMarketContentCreated,
|
stockMarketContentCreated,
|
||||||
setStockMarketContentCreated} from "./StockMarket/StockMarket";
|
setStockMarketContentCreated
|
||||||
import {Terminal, postNetburnerText} from "./Terminal";
|
} from "./StockMarket/StockMarket";
|
||||||
|
import { Terminal, postNetburnerText } from "./Terminal";
|
||||||
|
|
||||||
import {Page, routing} from "./ui/navigationTracking";
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
|
|
||||||
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
|
||||||
import {removeElementById} from "../utils/uiHelpers/removeElementById";
|
|
||||||
import {createElement} from "../utils/uiHelpers/createElement";
|
|
||||||
import {createPopup} from "../utils/uiHelpers/createPopup";
|
|
||||||
import {exceptionAlert} from "../utils/helpers/exceptionAlert";
|
|
||||||
|
|
||||||
let BitNode8StartingMoney = 250e6;
|
const BitNode8StartingMoney = 250e6;
|
||||||
|
|
||||||
//Prestige by purchasing augmentation
|
//Prestige by purchasing augmentation
|
||||||
function prestigeAugmentation() {
|
function prestigeAugmentation() {
|
||||||
|
@ -2,17 +2,21 @@ import { BitNodes } from "./BitNode/BitNode";
|
|||||||
import { Engine } from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { Player } from "./Player";
|
import { Player } from "./Player";
|
||||||
import { prestigeSourceFile } from "./Prestige";
|
import { prestigeSourceFile } from "./Prestige";
|
||||||
import { SourceFiles,
|
import { SourceFiles, SourceFile } from "./SourceFile";
|
||||||
SourceFile } from "./SourceFile";
|
|
||||||
import { PlayerOwnedSourceFile } from "./SourceFile/PlayerOwnedSourceFile";
|
import { PlayerOwnedSourceFile } from "./SourceFile/PlayerOwnedSourceFile";
|
||||||
import { Terminal } from "./Terminal";
|
import { Terminal } from "./Terminal";
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
|
|
||||||
import {clearEventListeners} from "../utils/uiHelpers/clearEventListeners";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
import {
|
||||||
import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement";
|
yesNoBoxCreate,
|
||||||
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
yesNoBoxGetNoButton,
|
||||||
|
yesNoBoxClose
|
||||||
|
} from "../utils/YesNoBox";
|
||||||
|
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||||
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
|
|
||||||
|
|
||||||
/* RedPill.js
|
/* RedPill.js
|
||||||
* Implements what happens when you have Red Pill augmentation and then hack the world daemon */
|
* Implements what happens when you have Red Pill augmentation and then hack the world daemon */
|
||||||
|
@ -1,39 +1,50 @@
|
|||||||
import {loadAliases, loadGlobalAliases,
|
import {
|
||||||
Aliases, GlobalAliases} from "./Alias";
|
loadAliases,
|
||||||
import {Companies, loadCompanies} from "./Company/Companies";
|
loadGlobalAliases,
|
||||||
import {CompanyPosition} from "./Company/CompanyPosition";
|
Aliases,
|
||||||
import {CONSTANTS} from "./Constants";
|
GlobalAliases
|
||||||
import {Engine} from "./engine";
|
} from "./Alias";
|
||||||
import { Factions,
|
import { Companies, loadCompanies } from "./Company/Companies";
|
||||||
loadFactions } from "./Faction/Factions";
|
import { CompanyPosition } from "./Company/CompanyPosition";
|
||||||
|
import { CONSTANTS } from "./Constants";
|
||||||
|
import { Engine } from "./engine";
|
||||||
|
import { Factions, loadFactions } from "./Faction/Factions";
|
||||||
import { processPassiveFactionRepGain } from "./Faction/FactionHelpers";
|
import { processPassiveFactionRepGain } from "./Faction/FactionHelpers";
|
||||||
import { loadFconf } from "./Fconf/Fconf";
|
import { loadFconf } from "./Fconf/Fconf";
|
||||||
import { FconfSettings } from "./Fconf/FconfSettings";
|
import { FconfSettings } from "./Fconf/FconfSettings";
|
||||||
import {loadAllGangs, AllGangs} from "./Gang";
|
import { loadAllGangs, AllGangs } from "./Gang";
|
||||||
import { hasHacknetServers,
|
import {
|
||||||
processHacknetEarnings } from "./Hacknet/HacknetHelpers";
|
hasHacknetServers,
|
||||||
|
processHacknetEarnings
|
||||||
|
} from "./Hacknet/HacknetHelpers";
|
||||||
import { loadMessages, initMessages, Messages } from "./Message/MessageHelpers";
|
import { loadMessages, initMessages, Messages } from "./Message/MessageHelpers";
|
||||||
import {Player, loadPlayer} from "./Player";
|
import { Player, loadPlayer } from "./Player";
|
||||||
import { loadAllRunningScripts } from "./Script/ScriptHelpers";
|
import { loadAllRunningScripts } from "./Script/ScriptHelpers";
|
||||||
import { AllServers,
|
import { AllServers, loadAllServers } from "./Server/AllServers";
|
||||||
loadAllServers } from "./Server/AllServers";
|
|
||||||
import { Settings } from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
import { loadSpecialServerIps,
|
import {
|
||||||
SpecialServerIps } from "./Server/SpecialServerIps";
|
loadSpecialServerIps,
|
||||||
import {loadStockMarket, StockMarket} from "./StockMarket/StockMarket";
|
SpecialServerIps
|
||||||
|
} from "./Server/SpecialServerIps";
|
||||||
|
import { loadStockMarket, StockMarket } from "./StockMarket/StockMarket";
|
||||||
|
|
||||||
|
import { createStatusText } from "./ui/createStatusText";
|
||||||
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
|
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import {gameOptionsBoxClose} from "../utils/GameOptions";
|
import { gameOptionsBoxClose } from "../utils/GameOptions";
|
||||||
import {clearEventListeners} from "../utils/uiHelpers/clearEventListeners";
|
|
||||||
import {Reviver, Generic_toJSON,
|
|
||||||
Generic_fromJSON} from "../utils/JSONReviver";
|
|
||||||
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
|
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
|
||||||
import {createElement} from "../utils/uiHelpers/createElement";
|
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||||
import {createPopup} from "../utils/uiHelpers/createPopup";
|
import {
|
||||||
import {createStatusText} from "./ui/createStatusText";
|
Reviver,
|
||||||
import {numeralWrapper} from "./ui/numeralFormat";
|
Generic_toJSON,
|
||||||
import {removeElementById} from "../utils/uiHelpers/removeElementById";
|
Generic_fromJSON
|
||||||
|
} from "../utils/JSONReviver";
|
||||||
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
|
import { createPopup } from "../utils/uiHelpers/createPopup";
|
||||||
|
import { removeElementById } from "../utils/uiHelpers/removeElementById";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
|
|
||||||
|
107
src/Terminal.js
107
src/Terminal.js
@ -8,77 +8,85 @@ import {
|
|||||||
removeLeadingSlash,
|
removeLeadingSlash,
|
||||||
removeTrailingSlash
|
removeTrailingSlash
|
||||||
} from "./Terminal/DirectoryHelpers";
|
} from "./Terminal/DirectoryHelpers";
|
||||||
|
import { determineAllPossibilitiesForTabCompletion } from "./Terminal/determineAllPossibilitiesForTabCompletion";
|
||||||
|
import { TerminalHelpText, HelpTexts } from "./Terminal/HelpText";
|
||||||
|
import { tabCompletion } from "./Terminal/tabCompletion";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
determineAllPossibilitiesForTabCompletion
|
Aliases,
|
||||||
} from "./Terminal/determineAllPossibilitiesForTabCompletion";
|
|
||||||
|
|
||||||
import {
|
|
||||||
TerminalHelpText,
|
|
||||||
HelpTexts
|
|
||||||
} from "./Terminal/HelpText";
|
|
||||||
|
|
||||||
import {
|
|
||||||
tabCompletion
|
|
||||||
} from "./Terminal/tabCompletion";
|
|
||||||
|
|
||||||
import { Aliases,
|
|
||||||
GlobalAliases,
|
GlobalAliases,
|
||||||
parseAliasDeclaration,
|
parseAliasDeclaration,
|
||||||
printAliases,
|
printAliases,
|
||||||
removeAlias,
|
removeAlias,
|
||||||
substituteAliases } from "./Alias";
|
substituteAliases
|
||||||
|
} from "./Alias";
|
||||||
import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
|
import { BitNodeMultipliers } from "./BitNode/BitNodeMultipliers";
|
||||||
import {CodingContract, CodingContractResult,
|
import {
|
||||||
CodingContractRewardType} from "./CodingContracts";
|
CodingContract,
|
||||||
import {CONSTANTS} from "./Constants";
|
CodingContractResult,
|
||||||
|
CodingContractRewardType
|
||||||
|
} from "./CodingContracts";
|
||||||
|
import { CONSTANTS } from "./Constants";
|
||||||
import { Programs } from "./Programs/Programs";
|
import { Programs } from "./Programs/Programs";
|
||||||
import { executeDarkwebTerminalCommand,
|
import {
|
||||||
checkIfConnectedToDarkweb } from "./DarkWeb/DarkWeb";
|
executeDarkwebTerminalCommand,
|
||||||
|
checkIfConnectedToDarkweb
|
||||||
|
} from "./DarkWeb/DarkWeb";
|
||||||
import { DarkWebItems } from "./DarkWeb/DarkWebItems";
|
import { DarkWebItems } from "./DarkWeb/DarkWebItems";
|
||||||
import {Engine} from "./engine";
|
import { Engine } from "./engine";
|
||||||
import { parseFconfSettings,
|
import { parseFconfSettings, createFconf } from "./Fconf/Fconf";
|
||||||
createFconf } from "./Fconf/Fconf";
|
|
||||||
import { FconfSettings } from "./Fconf/FconfSettings";
|
import { FconfSettings } from "./Fconf/FconfSettings";
|
||||||
import {calculateHackingChance,
|
import {
|
||||||
|
calculateHackingChance,
|
||||||
calculateHackingExpGain,
|
calculateHackingExpGain,
|
||||||
calculatePercentMoneyHacked,
|
calculatePercentMoneyHacked,
|
||||||
calculateHackingTime,
|
calculateHackingTime,
|
||||||
calculateGrowTime,
|
calculateGrowTime,
|
||||||
calculateWeakenTime} from "./Hacking";
|
calculateWeakenTime
|
||||||
|
} from "./Hacking";
|
||||||
import { HacknetServer } from "./Hacknet/HacknetServer";
|
import { HacknetServer } from "./Hacknet/HacknetServer";
|
||||||
import {iTutorialNextStep, iTutorialSteps,
|
import {
|
||||||
ITutorial} from "./InteractiveTutorial";
|
iTutorialNextStep,
|
||||||
import {showLiterature} from "./Literature";
|
iTutorialSteps,
|
||||||
|
ITutorial
|
||||||
|
} from "./InteractiveTutorial";
|
||||||
|
import { showLiterature } from "./Literature";
|
||||||
import { Message } from "./Message/Message";
|
import { Message } from "./Message/Message";
|
||||||
import { showMessage } from "./Message/MessageHelpers";
|
import { showMessage } from "./Message/MessageHelpers";
|
||||||
import {killWorkerScript, addWorkerScript} from "./NetscriptWorker";
|
import { killWorkerScript, addWorkerScript } from "./NetscriptWorker";
|
||||||
import {Player} from "./Player";
|
import { Player } from "./Player";
|
||||||
import {hackWorldDaemon} from "./RedPill";
|
import { hackWorldDaemon } from "./RedPill";
|
||||||
import { RunningScript } from "./Script/RunningScript";
|
import { RunningScript } from "./Script/RunningScript";
|
||||||
import { findRunningScript } from "./Script/ScriptHelpers";
|
import { findRunningScript } from "./Script/ScriptHelpers";
|
||||||
import { isScriptFilename } from "./Script/ScriptHelpersTS";
|
import { isScriptFilename } from "./Script/ScriptHelpersTS";
|
||||||
import { AllServers } from "./Server/AllServers";
|
import { AllServers } from "./Server/AllServers";
|
||||||
import { Server } from "./Server/Server";
|
import { Server } from "./Server/Server";
|
||||||
import { GetServerByHostname,
|
import {
|
||||||
|
GetServerByHostname,
|
||||||
getServer,
|
getServer,
|
||||||
getServerOnNetwork } from "./Server/ServerHelpers";
|
getServerOnNetwork
|
||||||
import {Settings} from "./Settings/Settings";
|
} from "./Server/ServerHelpers";
|
||||||
import { SpecialServerIps,
|
import { Settings } from "./Settings/Settings";
|
||||||
SpecialServerNames } from "./Server/SpecialServerIps";
|
import {
|
||||||
import {getTextFile} from "./TextFile";
|
SpecialServerIps,
|
||||||
|
SpecialServerNames
|
||||||
|
} from "./Server/SpecialServerIps";
|
||||||
|
import { getTextFile } from "./TextFile";
|
||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
import {Page, routing} from "./ui/navigationTracking";
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
import {numeralWrapper} from "./ui/numeralFormat";
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
import {KEY} from "../utils/helpers/keyCodes";
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
import {addOffset} from "../utils/helpers/addOffset";
|
import { addOffset } from "../utils/helpers/addOffset";
|
||||||
import {isString} from "../utils/helpers/isString";
|
import { isString } from "../utils/helpers/isString";
|
||||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
import { arrayToString } from "../utils/helpers/arrayToString";
|
||||||
import {getTimestamp} from "../utils/helpers/getTimestamp";
|
import { getTimestamp } from "../utils/helpers/getTimestamp";
|
||||||
import {logBoxCreate} from "../utils/LogBox";
|
import { logBoxCreate } from "../utils/LogBox";
|
||||||
import {yesNoBoxCreate,
|
import {
|
||||||
|
yesNoBoxCreate,
|
||||||
yesNoBoxGetYesButton,
|
yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
yesNoBoxGetNoButton,
|
||||||
|
yesNoBoxClose
|
||||||
|
} from "../utils/YesNoBox";
|
||||||
import {
|
import {
|
||||||
post,
|
post,
|
||||||
postContent,
|
postContent,
|
||||||
@ -87,9 +95,10 @@ import {
|
|||||||
hackProgressPost
|
hackProgressPost
|
||||||
} from "./ui/postToTerminal";
|
} from "./ui/postToTerminal";
|
||||||
|
|
||||||
import autosize from 'autosize';
|
import autosize from "autosize";
|
||||||
import * as JSZip from 'jszip';
|
import * as JSZip from "jszip";
|
||||||
import * as FileSaver from 'file-saver';
|
import * as FileSaver from "file-saver";
|
||||||
|
|
||||||
|
|
||||||
function postNetburnerText() {
|
function postNetburnerText() {
|
||||||
post("Bitburner v" + CONSTANTS.Version);
|
post("Bitburner v" + CONSTANTS.Version);
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
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.
|
* Represents a plain text file that is typically stored on a server.
|
||||||
|
143
src/engine.jsx
143
src/engine.jsx
@ -1,105 +1,130 @@
|
|||||||
import {formatNumber,
|
import {
|
||||||
|
formatNumber,
|
||||||
convertTimeMsToTimeElapsedString,
|
convertTimeMsToTimeElapsedString,
|
||||||
replaceAt} from "../utils/StringHelperFunctions";
|
replaceAt
|
||||||
import {loxBoxCreate, logBoxUpdateText,
|
} from "../utils/StringHelperFunctions";
|
||||||
logBoxOpened} from "../utils/LogBox";
|
import { loxBoxCreate, logBoxUpdateText, logBoxOpened } from "../utils/LogBox";
|
||||||
import {updateActiveScriptsItems} from "./ActiveScriptsUI";
|
import { updateActiveScriptsItems } from "./ActiveScriptsUI";
|
||||||
import { Augmentations } from "./Augmentation/Augmentations";
|
import { Augmentations } from "./Augmentation/Augmentations";
|
||||||
import { installAugmentations,
|
import {
|
||||||
|
installAugmentations,
|
||||||
initAugmentations,
|
initAugmentations,
|
||||||
displayAugmentationsContent,
|
displayAugmentationsContent,
|
||||||
PlayerOwnedAugmentation } from "./Augmentation/AugmentationHelpers";
|
PlayerOwnedAugmentation
|
||||||
|
} from "./Augmentation/AugmentationHelpers";
|
||||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||||
|
|
||||||
import {BitNodes, initBitNodes,
|
import {
|
||||||
initBitNodeMultipliers} from "./BitNode/BitNode";
|
BitNodes,
|
||||||
import {Bladeburner} from "./Bladeburner";
|
initBitNodes,
|
||||||
|
initBitNodeMultipliers
|
||||||
|
} from "./BitNode/BitNode";
|
||||||
|
import { Bladeburner } from "./Bladeburner";
|
||||||
import { CharacterOverviewComponent } from "./ui/React/CharacterOverview";
|
import { CharacterOverviewComponent } from "./ui/React/CharacterOverview";
|
||||||
import {cinematicTextFlag} from "./CinematicText";
|
import { cinematicTextFlag } from "./CinematicText";
|
||||||
import {generateRandomContract} from "./CodingContractGenerator";
|
import { generateRandomContract } from "./CodingContractGenerator";
|
||||||
import {CompanyPositions} from "./Company/CompanyPositions";
|
import { CompanyPositions } from "./Company/CompanyPositions";
|
||||||
import {initCompanies} from "./Company/Companies";
|
import { initCompanies } from "./Company/Companies";
|
||||||
import { Corporation } from "./Corporation/Corporation";
|
import { Corporation } from "./Corporation/Corporation";
|
||||||
import {CONSTANTS} from "./Constants";
|
import { CONSTANTS } from "./Constants";
|
||||||
import {createDevMenu, closeDevMenu} from "./DevMenu";
|
import { createDevMenu, closeDevMenu } from "./DevMenu";
|
||||||
import { Factions, initFactions } from "./Faction/Factions";
|
import { Factions, initFactions } from "./Faction/Factions";
|
||||||
import { displayFactionContent, joinFaction,
|
import {
|
||||||
|
displayFactionContent,
|
||||||
|
joinFaction,
|
||||||
processPassiveFactionRepGain,
|
processPassiveFactionRepGain,
|
||||||
inviteToFaction } from "./Faction/FactionHelpers";
|
inviteToFaction
|
||||||
|
} from "./Faction/FactionHelpers";
|
||||||
import { FconfSettings } from "./Fconf/FconfSettings";
|
import { FconfSettings } from "./Fconf/FconfSettings";
|
||||||
import { hasHacknetServers,
|
import {
|
||||||
|
hasHacknetServers,
|
||||||
renderHacknetNodesUI,
|
renderHacknetNodesUI,
|
||||||
clearHacknetNodesUI,
|
clearHacknetNodesUI,
|
||||||
processHacknetEarnings } from "./Hacknet/HacknetHelpers";
|
processHacknetEarnings
|
||||||
import {iTutorialStart} from "./InteractiveTutorial";
|
} from "./Hacknet/HacknetHelpers";
|
||||||
import {initLiterature} from "./Literature";
|
import { iTutorialStart } from "./InteractiveTutorial";
|
||||||
|
import { initLiterature } from "./Literature";
|
||||||
import { LocationName } from "./Locations/data/LocationNames";
|
import { LocationName } from "./Locations/data/LocationNames";
|
||||||
import { LocationRoot } from "./Locations/ui/Root";
|
import { LocationRoot } from "./Locations/ui/Root";
|
||||||
import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers";
|
import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers";
|
||||||
import {inMission, currMission} from "./Missions";
|
import { inMission, currMission } from "./Missions";
|
||||||
import {initSingularitySFFlags,
|
import {
|
||||||
hasSingularitySF, hasCorporationSF} from "./NetscriptFunctions";
|
initSingularitySFFlags,
|
||||||
import {updateOnlineScriptTimes,
|
hasSingularitySF,
|
||||||
runScriptsLoop} from "./NetscriptWorker";
|
hasCorporationSF
|
||||||
import {Player} from "./Player";
|
} from "./NetscriptFunctions";
|
||||||
import {prestigeAugmentation,
|
import { updateOnlineScriptTimes, runScriptsLoop } from "./NetscriptWorker";
|
||||||
prestigeSourceFile} from "./Prestige";
|
import { Player } from "./Player";
|
||||||
|
import { prestigeAugmentation, prestigeSourceFile } from "./Prestige";
|
||||||
import { Programs } from "./Programs/Programs";
|
import { Programs } from "./Programs/Programs";
|
||||||
import { displayCreateProgramContent,
|
import {
|
||||||
|
displayCreateProgramContent,
|
||||||
getNumAvailableCreateProgram,
|
getNumAvailableCreateProgram,
|
||||||
initCreateProgramButtons } from "./Programs/ProgramHelpers";
|
initCreateProgramButtons
|
||||||
import {redPillFlag, hackWorldDaemon} from "./RedPill";
|
} from "./Programs/ProgramHelpers";
|
||||||
import {saveObject, loadGame} from "./SaveObject";
|
import { redPillFlag, hackWorldDaemon } from "./RedPill";
|
||||||
import { getCurrentEditor,
|
import { saveObject, loadGame } from "./SaveObject";
|
||||||
|
import {
|
||||||
|
getCurrentEditor,
|
||||||
loadAllRunningScripts,
|
loadAllRunningScripts,
|
||||||
scriptEditorInit,
|
scriptEditorInit,
|
||||||
updateScriptEditorContent } from "./Script/ScriptHelpers";
|
updateScriptEditorContent
|
||||||
import { AllServers,
|
} from "./Script/ScriptHelpers";
|
||||||
initForeignServers } from "./Server/AllServers";
|
import { AllServers, initForeignServers } from "./Server/AllServers";
|
||||||
|
|
||||||
import { Server } from "./Server/Server";
|
import { Server } from "./Server/Server";
|
||||||
import {Settings} from "./Settings/Settings";
|
import { Settings } from "./Settings/Settings";
|
||||||
import { initSourceFiles, SourceFiles } from "./SourceFile";
|
import { initSourceFiles, SourceFiles } from "./SourceFile";
|
||||||
import { updateSourceFileFlags } from "./SourceFile/SourceFileFlags";
|
import { updateSourceFileFlags } from "./SourceFile/SourceFileFlags";
|
||||||
import {SpecialServerIps, initSpecialServerIps} from "./Server/SpecialServerIps";
|
import {
|
||||||
import {StockMarket, StockSymbols,
|
SpecialServerIps,
|
||||||
SymbolToStockMap, initStockSymbols,
|
initSpecialServerIps
|
||||||
initSymbolToStockMap, stockMarketCycle,
|
} from "./Server/SpecialServerIps";
|
||||||
|
import {
|
||||||
|
StockMarket,
|
||||||
|
StockSymbols,
|
||||||
|
SymbolToStockMap,
|
||||||
|
initStockSymbols,
|
||||||
|
initSymbolToStockMap,
|
||||||
|
stockMarketCycle,
|
||||||
processStockPrices,
|
processStockPrices,
|
||||||
displayStockMarketContent} from "./StockMarket/StockMarket";
|
displayStockMarketContent
|
||||||
import {Terminal, postNetburnerText} from "./Terminal";
|
} from "./StockMarket/StockMarket";
|
||||||
|
import { Terminal, postNetburnerText } from "./Terminal";
|
||||||
|
|
||||||
import { Sleeve } from "./PersonObjects/Sleeve/Sleeve";
|
import { Sleeve } from "./PersonObjects/Sleeve/Sleeve";
|
||||||
import { clearSleevesPage,
|
import {
|
||||||
|
clearSleevesPage,
|
||||||
createSleevesPage,
|
createSleevesPage,
|
||||||
updateSleevesPage } from "./PersonObjects/Sleeve/SleeveUI";
|
updateSleevesPage
|
||||||
import { clearResleevesPage,
|
} from "./PersonObjects/Sleeve/SleeveUI";
|
||||||
createResleevesPage } from "./PersonObjects/Resleeving/ResleevingUI";
|
import {
|
||||||
|
clearResleevesPage,
|
||||||
|
createResleevesPage
|
||||||
|
} from "./PersonObjects/Resleeving/ResleevingUI";
|
||||||
|
|
||||||
import { createStatusText } from "./ui/createStatusText";
|
import { createStatusText } from "./ui/createStatusText";
|
||||||
import { displayCharacterInfo } from "./ui/displayCharacterInfo";
|
import { displayCharacterInfo } from "./ui/displayCharacterInfo";
|
||||||
import {Page, routing} from "./ui/navigationTracking";
|
import { Page, routing } from "./ui/navigationTracking";
|
||||||
import {numeralWrapper} from "./ui/numeralFormat";
|
import { numeralWrapper } from "./ui/numeralFormat";
|
||||||
import {setSettingsLabels} from "./ui/setSettingsLabels";
|
import { setSettingsLabels } from "./ui/setSettingsLabels";
|
||||||
import { initializeMainMenuHeaders } from "./ui/MainMenu/Headers";
|
import { initializeMainMenuHeaders } from "./ui/MainMenu/Headers";
|
||||||
import { initializeMainMenuLinks,
|
import { initializeMainMenuLinks, MainMenuLinks } from "./ui/MainMenu/Links";
|
||||||
MainMenuLinks } from "./ui/MainMenu/Links";
|
|
||||||
|
|
||||||
|
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||||
import { dialogBoxCreate} from "../utils/DialogBox";
|
import { gameOptionsBoxClose, gameOptionsBoxOpen } from "../utils/GameOptions";
|
||||||
import { gameOptionsBoxClose,
|
|
||||||
gameOptionsBoxOpen } from "../utils/GameOptions";
|
|
||||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||||
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
import { removeChildrenFromElement } from "../utils/uiHelpers/removeChildrenFromElement";
|
||||||
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||||
import { createElement } from "../utils/uiHelpers/createElement";
|
import { createElement } from "../utils/uiHelpers/createElement";
|
||||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||||
import { removeLoadingScreen } from "../utils/uiHelpers/removeLoadingScreen";
|
import { removeLoadingScreen } from "../utils/uiHelpers/removeLoadingScreen";
|
||||||
import {KEY} from "../utils/helpers/keyCodes";
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
|
|
||||||
|
|
||||||
// These should really be imported with the module that is presenting that UI, but because they very much depend on the
|
// These should really be imported with the module that is presenting that UI, but because they very much depend on the
|
||||||
// cascade order, we'll pull them all in here.
|
// cascade order, we'll pull them all in here.
|
||||||
import 'normalize.css';
|
import 'normalize.css';
|
||||||
|
Loading…
Reference in New Issue
Block a user