mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
remove all .js from all appplicable imports
This commit is contained in:
parent
13dbd9f26c
commit
6bdf946790
@ -1,14 +1,14 @@
|
|||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {workerScripts,
|
import {workerScripts,
|
||||||
addWorkerScript,
|
addWorkerScript,
|
||||||
killWorkerScript} from "./NetscriptWorker.js";
|
killWorkerScript} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {getServer} from "./Server.js";
|
import {getServer} from "./Server";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {printArray, createElement,
|
import {printArray, createElement,
|
||||||
createAccordionElement, removeElement,
|
createAccordionElement, removeElement,
|
||||||
removeChildrenFromElement, exceptionAlert} from "../utils/HelperFunctions.js";
|
removeChildrenFromElement, exceptionAlert} from "../utils/HelperFunctions";
|
||||||
import {logBoxCreate} from "../utils/LogBox.js";
|
import {logBoxCreate} from "../utils/LogBox";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {post} from "./Terminal.js";
|
import {post} from "./Terminal";
|
||||||
|
|
||||||
let Aliases = {};
|
let Aliases = {};
|
||||||
let GlobalAliases = {};
|
let GlobalAliases = {};
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Factions, getNextNeurofluxLevel,
|
import {Factions, getNextNeurofluxLevel,
|
||||||
factionExists} from "./Faction.js";
|
factionExists} from "./Faction";
|
||||||
import {hasBladeburnerSF} from "./NetscriptFunctions.js";
|
import {hasBladeburnerSF} from "./NetscriptFunctions";
|
||||||
import {addWorkerScript} from "./NetscriptWorker.js";
|
import {addWorkerScript} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {prestigeAugmentation} from "./Prestige.js";
|
import {prestigeAugmentation} from "./Prestige";
|
||||||
import {saveObject} from "./SaveObject.js";
|
import {saveObject} from "./SaveObject";
|
||||||
import {Script, RunningScript} from "./Script.js";
|
import {Script, RunningScript} from "./Script";
|
||||||
import {Server} from "./Server.js";
|
import {Server} from "./Server";
|
||||||
import {SourceFiles} from "./SourceFile.js";
|
import {SourceFiles} from "./SourceFile";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {createElement, createAccordionElement,
|
import {createElement, createAccordionElement,
|
||||||
removeChildrenFromElement, clearObject} from "../utils/HelperFunctions.js";
|
removeChildrenFromElement, clearObject} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import {isString} from "../utils/StringHelperFunctions";
|
import {isString} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
//Augmentations
|
//Augmentations
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
|
|
||||||
function BitNode(n, name, desc="", info="") {
|
function BitNode(n, name, desc="", info="") {
|
||||||
this.number = n;
|
this.number = n;
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
import {Augmentations, AugmentationNames} from "./Augmentations.js";
|
import {Augmentations, AugmentationNames} from "./Augmentations";
|
||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Faction, Factions, factionExists,
|
import {Faction, Factions, factionExists,
|
||||||
joinFaction, displayFactionContent} from "./Faction.js";
|
joinFaction, displayFactionContent} from "./Faction";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {hackWorldDaemon, redPillFlag} from "./RedPill.js";
|
import {hackWorldDaemon, redPillFlag} from "./RedPill";
|
||||||
import {KEY} from "./Terminal.js";
|
import {KEY} from "./Terminal";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {getRandomInt, addOffset, clearObject,
|
import {getRandomInt, addOffset, clearObject,
|
||||||
createElement, removeChildrenFromElement,
|
createElement, removeChildrenFromElement,
|
||||||
exceptionAlert, createPopup, appendLineBreaks,
|
exceptionAlert, createPopup, appendLineBreaks,
|
||||||
removeElementById, removeElement,
|
removeElementById, removeElement,
|
||||||
createProgressBarText} from "../utils/HelperFunctions.js";
|
createProgressBarText} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
|
|
||||||
import {removeChildrenFromElement,
|
import {removeChildrenFromElement,
|
||||||
createElement, exceptionAlert} from "../utils/HelperFunctions.js";
|
createElement, exceptionAlert} from "../utils/HelperFunctions";
|
||||||
import {isString} from "../utils/StringHelperFunctions";
|
import {isString} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
var cinematicTextFlag = false;
|
var cinematicTextFlag = false;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
|
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
|
|
||||||
//Netburner Company class
|
//Netburner Company class
|
||||||
// Note: Company Positions can be loaded every time with init() but Company class needs
|
// Note: Company Positions can be loaded every time with init() but Company class needs
|
||||||
|
@ -1 +0,0 @@
|
|||||||
//TODO probably just move this to whatever file needs it then delete this
|
|
@ -1,25 +1,25 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Factions} from "./Faction.js";
|
import {Factions} from "./Faction";
|
||||||
import {showLiterature} from "./Literature.js";
|
import {showLiterature} from "./Literature";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {getRandomInt, removeElementById,
|
import {getRandomInt, removeElementById,
|
||||||
createElement, createAccordionElement,
|
createElement, createAccordionElement,
|
||||||
removeChildrenFromElement, createPopup,
|
removeChildrenFromElement, createPopup,
|
||||||
clearSelector} from "../utils/HelperFunctions.js";
|
clearSelector} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber, isString, generateRandomString} from "../utils/StringHelperFunctions";
|
import {formatNumber, isString, generateRandomString} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
||||||
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
||||||
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox.js";
|
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox";
|
||||||
|
|
||||||
/* State */
|
/* State */
|
||||||
var companyStates = ["START", "PURCHASE", "PRODUCTION", "SALE", "EXPORT"];
|
var companyStates = ["START", "PURCHASE", "PRODUCTION", "SALE", "EXPORT"];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {createElement} from "../utils/HelperFunctions.js";
|
import {createElement} from "../utils/HelperFunctions";
|
||||||
|
|
||||||
// a function that returns a requirement for a program that requires only that
|
// a function that returns a requirement for a program that requires only that
|
||||||
// the player has at least the given skill level.
|
// the player has at least the given skill level.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
|
|
||||||
|
|
||||||
function Crime(name, type, time, money, difficulty, karma, params) {
|
function Crime(name, type, time, money, difficulty, karma, params) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {SpecialServerIps} from "./SpecialServerIps.js";
|
import {SpecialServerIps} from "./SpecialServerIps";
|
||||||
import {post} from "./Terminal.js";
|
import {post} from "./Terminal";
|
||||||
|
|
||||||
import {isValidIPAddress} from "../utils/IPAddress.js";
|
import {isValidIPAddress} from "../utils/IPAddress";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
import {Augmentations, AugmentationNames,
|
import {Augmentations, AugmentationNames,
|
||||||
PlayerOwnedAugmentation} from "./Augmentations.js";
|
PlayerOwnedAugmentation} from "./Augmentations";
|
||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {FactionInfos} from "./FactionInfo.js";
|
import {FactionInfos} from "./FactionInfo";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {HackingMission, setInMission} from "./Missions.js";
|
import {HackingMission, setInMission} from "./Missions";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {factionInvitationBoxCreate} from "../utils/FactionInvitationBox.js";
|
import {factionInvitationBoxCreate} from "../utils/FactionInvitationBox";
|
||||||
import {clearEventListeners, createElement,
|
import {clearEventListeners, createElement,
|
||||||
removeChildrenFromElement} from "../utils/HelperFunctions.js";
|
removeChildrenFromElement} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
|
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
||||||
|
|
||||||
function Faction(name="") {
|
function Faction(name="") {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {parse, Node} from "../utils/acorn.js";
|
import {parse, Node} from "../utils/acorn";
|
||||||
|
|
||||||
var FconfSettings = {
|
var FconfSettings = {
|
||||||
ENABLE_BASH_HOTKEYS: false,
|
ENABLE_BASH_HOTKEYS: false,
|
||||||
|
16
src/Gang.js
16
src/Gang.js
@ -1,22 +1,22 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Faction, Factions,
|
import {Faction, Factions,
|
||||||
displayFactionContent} from "./Faction.js";
|
displayFactionContent} from "./Faction";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import {getRandomInt, createElement,
|
import {getRandomInt, createElement,
|
||||||
removeChildrenFromElement,
|
removeChildrenFromElement,
|
||||||
createAccordionElement, createPopup,
|
createAccordionElement, createPopup,
|
||||||
removeElementById, removeElement} from "../utils/HelperFunctions.js";
|
removeElementById, removeElement} from "../utils/HelperFunctions";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
||||||
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
||||||
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox.js";
|
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox";
|
||||||
|
|
||||||
/* Gang.js */
|
/* Gang.js */
|
||||||
//Switch between territory and management screen with 1 and 2
|
//Switch between territory and management screen with 1 and 2
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {iTutorialSteps, iTutorialNextStep,
|
import {iTutorialSteps, iTutorialNextStep,
|
||||||
iTutorialIsRunning, currITutorialStep} from "./InteractiveTutorial.js";
|
iTutorialIsRunning, currITutorialStep} from "./InteractiveTutorial";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners, createElement,
|
import {clearEventListeners, createElement,
|
||||||
getElementById} from "../utils/HelperFunctions.js";
|
getElementById} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners, getRandomInt} from "../utils/HelperFunctions.js";
|
import {clearEventListeners, getRandomInt} from "../utils/HelperFunctions";
|
||||||
import {infiltrationBoxCreate} from "../utils/InfiltrationBox.js";
|
import {infiltrationBoxCreate} from "../utils/InfiltrationBox";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
/* Infiltration.js
|
/* Infiltration.js
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners} from "../utils/HelperFunctions.js";
|
import {clearEventListeners} from "../utils/HelperFunctions";
|
||||||
|
|
||||||
/* InteractiveTutorial.js */
|
/* InteractiveTutorial.js */
|
||||||
let iTutorialSteps = {
|
let iTutorialSteps = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
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
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
import {Bladeburner} from "./Bladeburner.js";
|
import {Bladeburner} from "./Bladeburner";
|
||||||
import {CompanyPositions, initCompanies,
|
import {CompanyPositions, initCompanies,
|
||||||
Companies, getJobRequirementText} from "./Company.js";
|
Companies, getJobRequirementText} from "./Company";
|
||||||
import {Corporation} from "./CompanyManagement.js";
|
import {Corporation} from "./CompanyManagement";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Crimes} from "./Crimes.js";
|
import {Crimes} from "./Crimes";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {beginInfiltration} from "./Infiltration.js";
|
import {beginInfiltration} from "./Infiltration";
|
||||||
import {hasBladeburnerSF} from "./NetscriptFunctions.js";
|
import {hasBladeburnerSF} from "./NetscriptFunctions";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {Server, AllServers, AddToAllServers} from "./Server.js";
|
import {Server, AllServers, AddToAllServers} from "./Server";
|
||||||
import {purchaseServer,
|
import {purchaseServer,
|
||||||
purchaseRamForHomeComputer} from "./ServerPurchases.js";
|
purchaseRamForHomeComputer} from "./ServerPurchases";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps.js";
|
import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners, createElement} from "../utils/HelperFunctions.js";
|
import {clearEventListeners, createElement} from "../utils/HelperFunctions";
|
||||||
import {createRandomIp} from "../utils/IPAddress.js";
|
import {createRandomIp} from "../utils/IPAddress";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
||||||
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
||||||
yesNoTxtInpBoxClose} from "../utils/YesNoBox.js";
|
yesNoTxtInpBoxClose} from "../utils/YesNoBox";
|
||||||
|
|
||||||
/* Display Location Content when visiting somewhere in the World*/
|
/* Display Location Content when visiting somewhere in the World*/
|
||||||
var Locations = {
|
var Locations = {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {Augmentations, Augmentation,
|
import {Augmentations, Augmentation,
|
||||||
AugmentationNames} from "./Augmentations.js";
|
AugmentationNames} from "./Augmentations";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {inMission} from "./Missions.js";
|
import {inMission} from "./Missions";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {redPillFlag} from "./RedPill.js";
|
import {redPillFlag} from "./RedPill";
|
||||||
import {GetServerByHostname} from "./Server.js";
|
import {GetServerByHostname} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {dialogBoxCreate, dialogBoxOpened} from "../utils/DialogBox.js";
|
import {dialogBoxCreate, dialogBoxOpened} from "../utils/DialogBox";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
|
|
||||||
/* Message.js */
|
/* Message.js */
|
||||||
function Message(filename="", msg="") {
|
function Message(filename="", msg="") {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {displayFactionContent} from "./Faction.js";
|
import {displayFactionContent} from "./Faction";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {addOffset, getRandomInt,
|
import {addOffset, getRandomInt,
|
||||||
clearEventListenersEl,
|
clearEventListenersEl,
|
||||||
clearEventListeners} from "../utils/HelperFunctions.js";
|
clearEventListeners} from "../utils/HelperFunctions";
|
||||||
import {formatNumber, isString} from "../utils/StringHelperFunctions";
|
import {formatNumber, isString} from "../utils/StringHelperFunctions";
|
||||||
import jsplumb from 'jsplumb'
|
import jsplumb from 'jsplumb'
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {HacknetNode} from "./HacknetNode.js";
|
import {HacknetNode} from "./HacknetNode";
|
||||||
import {NetscriptFunctions} from "./NetscriptFunctions.js";
|
import {NetscriptFunctions} from "./NetscriptFunctions";
|
||||||
import {NetscriptPort} from "./NetscriptPort.js";
|
import {NetscriptPort} from "./NetscriptPort";
|
||||||
|
|
||||||
/* Environment
|
/* Environment
|
||||||
* NetScript program environment
|
* NetScript program environment
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {Environment} from "./NetscriptEnvironment.js";
|
import {Environment} from "./NetscriptEnvironment";
|
||||||
import {WorkerScript, addWorkerScript} from "./NetscriptWorker.js";
|
import {WorkerScript, addWorkerScript} from "./NetscriptWorker";
|
||||||
import {Server, getServer} from "./Server.js";
|
import {Server, getServer} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {Script, findRunningScript,
|
import {Script, findRunningScript,
|
||||||
RunningScript} from "./Script.js";
|
RunningScript} from "./Script";
|
||||||
|
|
||||||
import {parse, Node} from "../utils/acorn.js";
|
import {parse, Node} from "../utils/acorn";
|
||||||
import {printArray} from "../utils/HelperFunctions.js";
|
import {printArray} from "../utils/HelperFunctions";
|
||||||
import {isValidIPAddress} from "../utils/IPAddress.js";
|
import {isValidIPAddress} from "../utils/IPAddress";
|
||||||
import {isString} from "../utils/StringHelperFunctions";
|
import {isString} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
var Promise = require("bluebird");
|
var Promise = require("bluebird");
|
||||||
|
@ -1,60 +1,60 @@
|
|||||||
var sprintf = require('sprintf-js').sprintf,
|
var sprintf = require('sprintf-js').sprintf,
|
||||||
vsprintf = require('sprintf-js').vsprintf
|
vsprintf = require('sprintf-js').vsprintf
|
||||||
|
|
||||||
import {updateActiveScriptsItems} from "./ActiveScriptsUI.js";
|
import {updateActiveScriptsItems} from "./ActiveScriptsUI";
|
||||||
import {Augmentations, Augmentation,
|
import {Augmentations, Augmentation,
|
||||||
augmentationExists, installAugmentations,
|
augmentationExists, installAugmentations,
|
||||||
AugmentationNames} from "./Augmentations.js";
|
AugmentationNames} from "./Augmentations";
|
||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {determineCrimeSuccess, findCrime} from "./Crimes.js";
|
import {determineCrimeSuccess, findCrime} from "./Crimes";
|
||||||
import {Bladeburner} from "./Bladeburner.js";
|
import {Bladeburner} from "./Bladeburner";
|
||||||
import {Companies, Company, CompanyPosition,
|
import {Companies, Company, CompanyPosition,
|
||||||
CompanyPositions, companyExists} from "./Company.js";
|
CompanyPositions, companyExists} from "./Company";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {DarkWebItems} from "./DarkWeb.js";
|
import {DarkWebItems} from "./DarkWeb";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {AllGangs} from "./Gang.js";
|
import {AllGangs} from "./Gang";
|
||||||
import {Factions, Faction, joinFaction,
|
import {Factions, Faction, joinFaction,
|
||||||
factionExists, purchaseAugmentation} from "./Faction.js";
|
factionExists, purchaseAugmentation} from "./Faction";
|
||||||
import {getCostOfNextHacknetNode, purchaseHacknet} from "./HacknetNode.js";
|
import {getCostOfNextHacknetNode, purchaseHacknet} from "./HacknetNode";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {Message, Messages} from "./Message.js";
|
import {Message, Messages} from "./Message";
|
||||||
import {inMission} from "./Missions.js";
|
import {inMission} from "./Missions";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {Script, findRunningScript, RunningScript,
|
import {Script, findRunningScript, RunningScript,
|
||||||
isScriptFilename} from "./Script.js";
|
isScriptFilename} from "./Script";
|
||||||
import {Server, getServer, AddToAllServers,
|
import {Server, getServer, AddToAllServers,
|
||||||
AllServers, processSingleServerGrowth,
|
AllServers, processSingleServerGrowth,
|
||||||
GetServerByHostname} from "./Server.js";
|
GetServerByHostname} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {SpecialServerIps} from "./SpecialServerIps.js";
|
import {SpecialServerIps} from "./SpecialServerIps";
|
||||||
import {StockMarket, StockSymbols, SymbolToStockMap, initStockSymbols,
|
import {StockMarket, StockSymbols, SymbolToStockMap, initStockSymbols,
|
||||||
initStockMarket, initSymbolToStockMap, stockMarketCycle, buyStock,
|
initStockMarket, initSymbolToStockMap, stockMarketCycle, buyStock,
|
||||||
sellStock, updateStockPrices, displayStockMarketContent,
|
sellStock, updateStockPrices, displayStockMarketContent,
|
||||||
updateStockTicker, updateStockPlayerPosition,
|
updateStockTicker, updateStockPlayerPosition,
|
||||||
Stock, shortStock, sellShort, OrderTypes,
|
Stock, shortStock, sellShort, OrderTypes,
|
||||||
PositionTypes, placeOrder, cancelOrder} from "./StockMarket.js";
|
PositionTypes, placeOrder, cancelOrder} from "./StockMarket";
|
||||||
import {post} from "./Terminal.js";
|
import {post} from "./Terminal";
|
||||||
import {TextFile, getTextFile, createTextFile} from "./TextFile";
|
import {TextFile, getTextFile, createTextFile} from "./TextFile";
|
||||||
|
|
||||||
import {WorkerScript, workerScripts,
|
import {WorkerScript, workerScripts,
|
||||||
killWorkerScript, NetscriptPorts} from "./NetscriptWorker.js";
|
killWorkerScript, NetscriptPorts} from "./NetscriptWorker";
|
||||||
import {makeRuntimeRejectMsg, netscriptDelay, runScriptFromScript,
|
import {makeRuntimeRejectMsg, netscriptDelay, runScriptFromScript,
|
||||||
scriptCalculateHackingChance, scriptCalculateHackingTime,
|
scriptCalculateHackingChance, scriptCalculateHackingTime,
|
||||||
scriptCalculateExpGain, scriptCalculatePercentMoneyHacked,
|
scriptCalculateExpGain, scriptCalculatePercentMoneyHacked,
|
||||||
scriptCalculateGrowTime, scriptCalculateWeakenTime} from "./NetscriptEvaluator.js";
|
scriptCalculateGrowTime, scriptCalculateWeakenTime} from "./NetscriptEvaluator";
|
||||||
import {Environment} from "./NetscriptEnvironment.js";
|
import {Environment} from "./NetscriptEnvironment";
|
||||||
import {NetscriptPort} from "./NetscriptPort.js";
|
import {NetscriptPort} from "./NetscriptPort";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {printArray, powerOfTwo} from "../utils/HelperFunctions.js";
|
import {printArray, powerOfTwo} from "../utils/HelperFunctions";
|
||||||
import {createRandomIp} from "../utils/IPAddress.js";
|
import {createRandomIp} from "../utils/IPAddress";
|
||||||
import {formatNumber, isString, isHTML} from "../utils/StringHelperFunctions";
|
import {formatNumber, isString, isHTML} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxClose, yesNoBoxGetYesButton,
|
import {yesNoBoxClose, yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxCreate,
|
yesNoBoxGetNoButton, yesNoBoxCreate,
|
||||||
yesNoBoxOpen} from "../utils/YesNoBox.js";
|
yesNoBoxOpen} from "../utils/YesNoBox";
|
||||||
|
|
||||||
var hasCorporationSF = false, //Source-File 3
|
var hasCorporationSF = false, //Source-File 3
|
||||||
hasSingularitySF = false, //Source-File 4
|
hasSingularitySF = false, //Source-File 4
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {registerEnv, unregisterEnv, makeEnvHeader} from "./NetscriptJSPreamble.js";
|
import {registerEnv, unregisterEnv, makeEnvHeader} from "./NetscriptJSPreamble";
|
||||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator.js";
|
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) {
|
||||||
@ -71,7 +71,7 @@ function _getScriptUrls(script, scripts, seen) {
|
|||||||
// Replace every import statement with an import to a blob url containing
|
// Replace every import statement with an import to a blob url containing
|
||||||
// the corresponding script. E.g.
|
// the corresponding script. E.g.
|
||||||
//
|
//
|
||||||
// import {foo} from "bar.js";
|
// import {foo} from "bar";
|
||||||
//
|
//
|
||||||
// becomes
|
// becomes
|
||||||
//
|
//
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
|
|
||||||
function NetscriptPort() {
|
function NetscriptPort() {
|
||||||
this.data = [];
|
this.data = [];
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import {addActiveScriptsItem,
|
import {addActiveScriptsItem,
|
||||||
deleteActiveScriptsItem,
|
deleteActiveScriptsItem,
|
||||||
updateActiveScriptsItems} from "./ActiveScriptsUI.js";
|
updateActiveScriptsItems} from "./ActiveScriptsUI";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Environment} from "./NetscriptEnvironment.js";
|
import {Environment} from "./NetscriptEnvironment";
|
||||||
import {evaluate, isScriptErrorMessage,
|
import {evaluate, isScriptErrorMessage,
|
||||||
makeRuntimeRejectMsg,
|
makeRuntimeRejectMsg,
|
||||||
killNetscriptDelay} from "./NetscriptEvaluator.js";
|
killNetscriptDelay} from "./NetscriptEvaluator";
|
||||||
import {executeJSScript} from "./NetscriptJSEvaluator.js";
|
import {executeJSScript} from "./NetscriptJSEvaluator";
|
||||||
import {NetscriptPort} from "./NetscriptPort.js";
|
import {NetscriptPort} from "./NetscriptPort";
|
||||||
import {AllServers} from "./Server.js";
|
import {AllServers} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
|
|
||||||
import {parse} from "../utils/acorn.js";
|
import {parse} from "../utils/acorn";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {compareArrays, printArray} from "../utils/HelperFunctions.js";
|
import {compareArrays, printArray} from "../utils/HelperFunctions";
|
||||||
|
|
||||||
function WorkerScript(runningScriptObj) {
|
function WorkerScript(runningScriptObj) {
|
||||||
this.name = runningScriptObj.filename;
|
this.name = runningScriptObj.filename;
|
||||||
@ -189,7 +189,7 @@ function runScriptsLoop() {
|
|||||||
//If it isn't running, start the script
|
//If it isn't running, start the script
|
||||||
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
|
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
|
||||||
let p = null; // p is the script's result promise.
|
let p = null; // p is the script's result promise.
|
||||||
if (workerScripts[i].name.endsWith(".js") || workerScripts[i].name.endsWith(".ns")) {
|
if (workerScripts[i].name.endsWith("") || workerScripts[i].name.endsWith(".ns")) {
|
||||||
p = startJsScript(workerScripts[i]);
|
p = startJsScript(workerScripts[i]);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
import {Augmentations, applyAugmentation,
|
import {Augmentations, applyAugmentation,
|
||||||
AugmentationNames,
|
AugmentationNames,
|
||||||
PlayerOwnedAugmentation} from "./Augmentations.js";
|
PlayerOwnedAugmentation} from "./Augmentations";
|
||||||
import {BitNodes, BitNode, BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodes, BitNode, BitNodeMultipliers} from "./BitNode";
|
||||||
import {Company, Companies, getNextCompanyPosition,
|
import {Company, Companies, getNextCompanyPosition,
|
||||||
getJobRequirementText, CompanyPosition,
|
getJobRequirementText, CompanyPosition,
|
||||||
CompanyPositions} from "./Company.js";
|
CompanyPositions} from "./Company";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Corporation} from "./CompanyManagement.js";
|
import {Corporation} from "./CompanyManagement";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {determineCrimeSuccess, Crimes} from "./Crimes.js";
|
import {determineCrimeSuccess, Crimes} from "./Crimes";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Factions, Faction,
|
import {Factions, Faction,
|
||||||
displayFactionContent} from "./Faction.js";
|
displayFactionContent} from "./Faction";
|
||||||
import {Gang, resetGangs} from "./Gang.js";
|
import {Gang, resetGangs} from "./Gang";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {hasBn11SF, hasWallStreetSF,hasAISF} from "./NetscriptFunctions.js";
|
import {hasBn11SF, hasWallStreetSF,hasAISF} from "./NetscriptFunctions";
|
||||||
import {AllServers, Server, AddToAllServers} from "./Server.js";
|
import {AllServers, Server, AddToAllServers} from "./Server";
|
||||||
import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps.js";
|
import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps";
|
||||||
import {SourceFiles, applySourceFile} from "./SourceFile.js";
|
import {SourceFiles, applySourceFile} from "./SourceFile";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners} from "../utils/HelperFunctions.js";
|
import {clearEventListeners} from "../utils/HelperFunctions";
|
||||||
import {createRandomIp} from "../utils/IPAddress.js";
|
import {createRandomIp} from "../utils/IPAddress";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber,
|
import {formatNumber,
|
||||||
convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions";
|
convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions";
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
import {deleteActiveScriptsItem} from "./ActiveScriptsUI.js";
|
import {deleteActiveScriptsItem} from "./ActiveScriptsUI";
|
||||||
import {Augmentations, augmentationExists,
|
import {Augmentations, augmentationExists,
|
||||||
initAugmentations, AugmentationNames} from "./Augmentations.js";
|
initAugmentations, AugmentationNames} from "./Augmentations";
|
||||||
import {initBitNodeMultipliers} from "./BitNode.js";
|
import {initBitNodeMultipliers} from "./BitNode";
|
||||||
import {Bladeburner} from "./Bladeburner.js";
|
import {Bladeburner} from "./Bladeburner";
|
||||||
import {writeCinematicText} from "./CinematicText.js";
|
import {writeCinematicText} from "./CinematicText";
|
||||||
import {Companies, Company, initCompanies} from "./Company.js";
|
import {Companies, Company, initCompanies} from "./Company";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Factions, Faction, initFactions,
|
import {Factions, Faction, initFactions,
|
||||||
joinFaction} from "./Faction.js";
|
joinFaction} from "./Faction";
|
||||||
import {deleteGangDisplayContent} from "./Gang.js";
|
import {deleteGangDisplayContent} from "./Gang";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {initMessages, Messages, Message} from "./Message.js";
|
import {initMessages, Messages, Message} from "./Message";
|
||||||
import {initSingularitySFFlags, hasWallStreetSF}from "./NetscriptFunctions.js";
|
import {initSingularitySFFlags, hasWallStreetSF}from "./NetscriptFunctions";
|
||||||
import {WorkerScript, workerScripts,
|
import {WorkerScript, workerScripts,
|
||||||
prestigeWorkerScripts} from "./NetscriptWorker.js";
|
prestigeWorkerScripts} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
|
|
||||||
import {AllServers, AddToAllServers,
|
import {AllServers, AddToAllServers,
|
||||||
initForeignServers, Server,
|
initForeignServers, Server,
|
||||||
prestigeAllServers,
|
prestigeAllServers,
|
||||||
prestigeHomeComputer} from "./Server.js";
|
prestigeHomeComputer} from "./Server";
|
||||||
import {SpecialServerIps, SpecialServerIpsMap,
|
import {SpecialServerIps, SpecialServerIpsMap,
|
||||||
prestigeSpecialServerIps,
|
prestigeSpecialServerIps,
|
||||||
SpecialServerNames} from "./SpecialServerIps.js";
|
SpecialServerNames} from "./SpecialServerIps";
|
||||||
import {initStockMarket, initSymbolToStockMap,
|
import {initStockMarket, initSymbolToStockMap,
|
||||||
stockMarketContentCreated,
|
stockMarketContentCreated,
|
||||||
setStockMarketContentCreated} from "./StockMarket.js";
|
setStockMarketContentCreated} from "./StockMarket";
|
||||||
import {Terminal, postNetburnerText} from "./Terminal.js";
|
import {Terminal, postNetburnerText} from "./Terminal";
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {createPopup, createElement,
|
import {createPopup, createElement,
|
||||||
removeElementById, exceptionAlert} from "../utils/HelperFunctions.js";
|
removeElementById, exceptionAlert} from "../utils/HelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
|
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
||||||
|
|
||||||
let BitNode8StartingMoney = 250e6;
|
let BitNode8StartingMoney = 250e6;
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import {BitNode, BitNodes} from "./BitNode.js";
|
import {BitNode, BitNodes} from "./BitNode";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {prestigeSourceFile} from "./Prestige.js";
|
import {prestigeSourceFile} from "./Prestige";
|
||||||
import {SourceFiles, SourceFile,
|
import {SourceFiles, SourceFile,
|
||||||
PlayerOwnedSourceFile} from "./SourceFile.js";
|
PlayerOwnedSourceFile} from "./SourceFile";
|
||||||
import {Terminal} from "./Terminal.js";
|
import {Terminal} from "./Terminal";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners,
|
import {clearEventListeners,
|
||||||
removeChildrenFromElement} from "../utils/HelperFunctions.js";
|
removeChildrenFromElement} from "../utils/HelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
|
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
||||||
|
|
||||||
/* 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,28 +1,28 @@
|
|||||||
import {loadAliases, loadGlobalAliases,
|
import {loadAliases, loadGlobalAliases,
|
||||||
Aliases, GlobalAliases} from "./Alias.js";
|
Aliases, GlobalAliases} from "./Alias";
|
||||||
import {loadCompanies, Companies,
|
import {loadCompanies, Companies,
|
||||||
CompanyPositions} from "./Company.js";
|
CompanyPositions} from "./Company";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {loadFactions, Factions,
|
import {loadFactions, Factions,
|
||||||
processPassiveFactionRepGain} from "./Faction.js";
|
processPassiveFactionRepGain} from "./Faction";
|
||||||
import {FconfSettings, loadFconf} from "./Fconf.js";
|
import {FconfSettings, loadFconf} from "./Fconf";
|
||||||
import {loadAllGangs, AllGangs} from "./Gang.js";
|
import {loadAllGangs, AllGangs} from "./Gang";
|
||||||
import {processAllHacknetNodeEarnings,
|
import {processAllHacknetNodeEarnings,
|
||||||
createPlayerHacknetNodeWrappers} from "./HacknetNode.js";
|
createPlayerHacknetNodeWrappers} from "./HacknetNode";
|
||||||
import {loadMessages, initMessages, Messages} from "./Message.js";
|
import {loadMessages, initMessages, Messages} from "./Message";
|
||||||
import {Player, loadPlayer} from "./Player.js";
|
import {Player, loadPlayer} from "./Player";
|
||||||
import {loadAllRunningScripts} from "./Script.js";
|
import {loadAllRunningScripts} from "./Script";
|
||||||
import {AllServers, loadAllServers} from "./Server.js";
|
import {AllServers, loadAllServers} from "./Server";
|
||||||
import {loadSettings, initSettings, Settings} from "./Settings.js";
|
import {loadSettings, initSettings, Settings} from "./Settings";
|
||||||
import {loadSpecialServerIps, SpecialServerIps} from "./SpecialServerIps.js";
|
import {loadSpecialServerIps, SpecialServerIps} from "./SpecialServerIps";
|
||||||
import {loadStockMarket, StockMarket} from "./StockMarket.js";
|
import {loadStockMarket, StockMarket} from "./StockMarket";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {gameOptionsBoxClose} from "../utils/GameOptions.js";
|
import {gameOptionsBoxClose} from "../utils/GameOptions";
|
||||||
import {clearEventListeners, createElement,
|
import {clearEventListeners, createElement,
|
||||||
createPopup, removeElementById} from "../utils/HelperFunctions.js";
|
createPopup, removeElementById} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
import Decimal from "decimal.js";
|
import Decimal from "decimal.js";
|
||||||
|
@ -17,26 +17,26 @@ require("brace/ext/language_tools");
|
|||||||
// Importing this doesn't work for some reason.
|
// Importing this doesn't work for some reason.
|
||||||
const walk = require("acorn/dist/walk");
|
const walk = require("acorn/dist/walk");
|
||||||
|
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {FconfSettings, parseFconfSettings} from "./Fconf.js";
|
import {FconfSettings, parseFconfSettings} from "./Fconf";
|
||||||
import {iTutorialSteps, iTutorialNextStep,
|
import {iTutorialSteps, iTutorialNextStep,
|
||||||
iTutorialIsRunning, currITutorialStep} from "./InteractiveTutorial.js";
|
iTutorialIsRunning, currITutorialStep} from "./InteractiveTutorial";
|
||||||
import {evaluateImport} from "./NetscriptEvaluator.js";
|
import {evaluateImport} from "./NetscriptEvaluator";
|
||||||
import {NetscriptFunctions} from "./NetscriptFunctions.js";
|
import {NetscriptFunctions} from "./NetscriptFunctions";
|
||||||
import {addWorkerScript, killWorkerScript,
|
import {addWorkerScript, killWorkerScript,
|
||||||
WorkerScript} from "./NetscriptWorker.js";
|
WorkerScript} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {AllServers, processSingleServerGrowth} from "./Server.js";
|
import {AllServers, processSingleServerGrowth} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {post, Terminal} from "./Terminal.js";
|
import {post, Terminal} from "./Terminal";
|
||||||
import {TextFile} from "./TextFile";
|
import {TextFile} from "./TextFile";
|
||||||
|
|
||||||
import {parse, Node} from "../utils/acorn.js";
|
import {parse, Node} from "../utils/acorn";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import {compareArrays, createElement} from "../utils/HelperFunctions.js";
|
import {compareArrays, createElement} from "../utils/HelperFunctions";
|
||||||
import {formatNumber, numOccurrences,
|
import {formatNumber, numOccurrences,
|
||||||
numNetscriptOperators} from "../utils/StringHelperFunctions";
|
numNetscriptOperators} from "../utils/StringHelperFunctions";
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ var keybindings = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function isScriptFilename(f) {
|
function isScriptFilename(f) {
|
||||||
return f.endsWith(".js") || f.endsWith(".script") || f.endsWith(".ns");
|
return f.endsWith("") || f.endsWith(".script") || f.endsWith(".ns");
|
||||||
}
|
}
|
||||||
|
|
||||||
var scriptEditorRamCheck = null, scriptEditorRamText = null;
|
var scriptEditorRamCheck = null, scriptEditorRamText = null;
|
||||||
@ -714,7 +714,7 @@ function calculateRamUsage(codeCopy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Script.prototype.download = function() {
|
Script.prototype.download = function() {
|
||||||
var filename = this.filename + ".js";
|
var filename = this.filename + "";
|
||||||
var file = new Blob([this.code], {type: 'text/plain'});
|
var file = new Blob([this.code], {type: 'text/plain'});
|
||||||
if (window.navigator.msSaveOrOpenBlob) {// IE10+
|
if (window.navigator.msSaveOrOpenBlob) {// IE10+
|
||||||
window.navigator.msSaveOrOpenBlob(file, filename);
|
window.navigator.msSaveOrOpenBlob(file, filename);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import {BitNodeMultipliers} from "./BitNode.js";
|
import {BitNodeMultipliers} from "./BitNode";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {RunningScript, Script} from "./Script.js";
|
import {RunningScript, Script} from "./Script";
|
||||||
import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps.js";
|
import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps";
|
||||||
import {getRandomInt} from "../utils/HelperFunctions.js";
|
import {getRandomInt} from "../utils/HelperFunctions";
|
||||||
import {createRandomIp, isValidIPAddress, ipExists} from "../utils/IPAddress.js";
|
import {createRandomIp, isValidIPAddress, ipExists} from "../utils/IPAddress";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
|
|
||||||
function Server(params={ip:createRandomIp(), hostname:""}) {
|
function Server(params={ip:createRandomIp(), hostname:""}) {
|
||||||
/* Properties */
|
/* Properties */
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {Server, AllServers, AddToAllServers} from "./Server.js";
|
import {Server, AllServers, AddToAllServers} from "./Server";
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {createRandomIp} from "../utils/IPAddress.js";
|
import {createRandomIp} from "../utils/IPAddress";
|
||||||
import {yesNoTxtInpBoxGetInput} from "../utils/YesNoBox.js";
|
import {yesNoTxtInpBoxGetInput} from "../utils/YesNoBox";
|
||||||
|
|
||||||
|
|
||||||
/* Functions to handle any server-related purchasing:
|
/* Functions to handle any server-related purchasing:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
|
|
||||||
/* Settings.js */
|
/* Settings.js */
|
||||||
let Settings = {
|
let Settings = {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {BitNode, BitNodes} from "./BitNode.js";
|
import {BitNode, BitNodes} from "./BitNode";
|
||||||
|
|
||||||
/* SourceFile.js */
|
/* SourceFile.js */
|
||||||
//Each SourceFile corresponds to a BitNode with the same number
|
//Each SourceFile corresponds to a BitNode with the same number
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
|
|
||||||
/* Holds IP of Special Servers */
|
/* Holds IP of Special Servers */
|
||||||
let SpecialServerNames = {
|
let SpecialServerNames = {
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {Locations} from "./Location.js";
|
import {Locations} from "./Location";
|
||||||
import {hasWallStreetSF, wallStreetSFLvl} from "./NetscriptFunctions.js";
|
import {hasWallStreetSF, wallStreetSFLvl} from "./NetscriptFunctions";
|
||||||
import {WorkerScript} from "./NetscriptWorker.js";
|
import {WorkerScript} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
|
|
||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {clearEventListeners, getRandomInt,
|
import {clearEventListeners, getRandomInt,
|
||||||
removeElementById,
|
removeElementById,
|
||||||
clearEventListenersEl} from "../utils/HelperFunctions.js";
|
clearEventListenersEl} from "../utils/HelperFunctions";
|
||||||
import {Reviver, Generic_toJSON,
|
import {Reviver, Generic_toJSON,
|
||||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
Generic_fromJSON} from "../utils/JSONReviver";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||||
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
|
||||||
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
yesNoBoxGetYesButton, yesNoBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
yesNoTxtInpBoxGetYesButton, yesNoTxtInpBoxGetNoButton,
|
||||||
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
yesNoTxtInpBoxGetInput, yesNoBoxClose,
|
||||||
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox.js";
|
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox";
|
||||||
|
|
||||||
let StockPriceCap = 1e9; //Put a limit on how high a price can go
|
let StockPriceCap = 1e9; //Put a limit on how high a price can go
|
||||||
|
|
||||||
|
@ -1,45 +1,45 @@
|
|||||||
import {substituteAliases, printAliases,
|
import {substituteAliases, printAliases,
|
||||||
parseAliasDeclaration,
|
parseAliasDeclaration,
|
||||||
removeAlias, GlobalAliases,
|
removeAlias, GlobalAliases,
|
||||||
Aliases} from "./Alias.js";
|
Aliases} from "./Alias";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram";
|
||||||
import {executeDarkwebTerminalCommand,
|
import {executeDarkwebTerminalCommand,
|
||||||
checkIfConnectedToDarkweb,
|
checkIfConnectedToDarkweb,
|
||||||
DarkWebItems} from "./DarkWeb.js";
|
DarkWebItems} from "./DarkWeb";
|
||||||
import {Engine} from "./engine.js";
|
import {Engine} from "./engine";
|
||||||
import {FconfSettings, parseFconfSettings,
|
import {FconfSettings, parseFconfSettings,
|
||||||
createFconf} from "./Fconf.js";
|
createFconf} from "./Fconf";
|
||||||
import {TerminalHelpText, HelpTexts} from "./HelpText";
|
import {TerminalHelpText, HelpTexts} from "./HelpText";
|
||||||
import {iTutorialNextStep, iTutorialSteps,
|
import {iTutorialNextStep, iTutorialSteps,
|
||||||
iTutorialIsRunning,
|
iTutorialIsRunning,
|
||||||
currITutorialStep} from "./InteractiveTutorial.js";
|
currITutorialStep} from "./InteractiveTutorial";
|
||||||
import {showLiterature} from "./Literature.js";
|
import {showLiterature} from "./Literature";
|
||||||
import {showMessage, Message} from "./Message.js";
|
import {showMessage, Message} from "./Message";
|
||||||
import {scriptCalculateHackingTime,
|
import {scriptCalculateHackingTime,
|
||||||
scriptCalculateGrowTime,
|
scriptCalculateGrowTime,
|
||||||
scriptCalculateWeakenTime} from "./NetscriptEvaluator.js";
|
scriptCalculateWeakenTime} from "./NetscriptEvaluator";
|
||||||
import {killWorkerScript, addWorkerScript} from "./NetscriptWorker.js";
|
import {killWorkerScript, addWorkerScript} from "./NetscriptWorker";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {hackWorldDaemon} from "./RedPill.js";
|
import {hackWorldDaemon} from "./RedPill";
|
||||||
import {findRunningScript, RunningScript,
|
import {findRunningScript, RunningScript,
|
||||||
AllServersMap, Script,
|
AllServersMap, Script,
|
||||||
isScriptFilename} from "./Script.js";
|
isScriptFilename} from "./Script";
|
||||||
import {AllServers, GetServerByHostname,
|
import {AllServers, GetServerByHostname,
|
||||||
getServer, Server} from "./Server.js";
|
getServer, Server} from "./Server";
|
||||||
import {Settings} from "./Settings.js";
|
import {Settings} from "./Settings";
|
||||||
import {SpecialServerIps,
|
import {SpecialServerIps,
|
||||||
SpecialServerNames} from "./SpecialServerIps.js";
|
SpecialServerNames} from "./SpecialServerIps";
|
||||||
import {TextFile, getTextFile} from "./TextFile";
|
import {TextFile, getTextFile} from "./TextFile";
|
||||||
|
|
||||||
import {containsAllStrings, longestCommonStart,
|
import {containsAllStrings, longestCommonStart,
|
||||||
formatNumber, isString} from "../utils/StringHelperFunctions";
|
formatNumber, isString} from "../utils/StringHelperFunctions";
|
||||||
import {addOffset, printArray} from "../utils/HelperFunctions.js";
|
import {addOffset, printArray} from "../utils/HelperFunctions";
|
||||||
import {logBoxCreate} from "../utils/LogBox.js";
|
import {logBoxCreate} from "../utils/LogBox";
|
||||||
import {yesNoBoxCreate,
|
import {yesNoBoxCreate,
|
||||||
yesNoBoxGetYesButton,
|
yesNoBoxGetYesButton,
|
||||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
|
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox";
|
||||||
|
|
||||||
import * as JSZip from 'jszip';
|
import * as JSZip from 'jszip';
|
||||||
import * as FileSaver from 'file-saver';
|
import * as FileSaver from 'file-saver';
|
||||||
@ -1054,7 +1054,7 @@ let Terminal = {
|
|||||||
if (fn === "*" || fn === "*.script") {
|
if (fn === "*" || fn === "*.script") {
|
||||||
for (var i = 0; i < s.scripts.length; ++i) {
|
for (var i = 0; i < s.scripts.length; ++i) {
|
||||||
var file = new Blob([s.scripts[i].code], {type:"text/plain"});
|
var file = new Blob([s.scripts[i].code], {type:"text/plain"});
|
||||||
zip.file(s.scripts[i].filename + ".js", file);
|
zip.file(s.scripts[i].filename + "", file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fn === "*" || fn === "*.txt") {
|
if (fn === "*" || fn === "*.txt") {
|
||||||
@ -1327,7 +1327,7 @@ let Terminal = {
|
|||||||
|
|
||||||
//Check if its a script or just a program/executable
|
//Check if its a script or just a program/executable
|
||||||
//if (isScriptFilename(executableName)) {
|
//if (isScriptFilename(executableName)) {
|
||||||
if (executableName.includes(".script") || executableName.includes(".js") || executableName.includes(".ns")) {
|
if (executableName.includes(".script") || executableName.includes("") || executableName.includes(".ns")) {
|
||||||
Terminal.runScript(executableName);
|
Terminal.runScript(executableName);
|
||||||
} else {
|
} else {
|
||||||
Terminal.runProgram(executableName);
|
Terminal.runProgram(executableName);
|
||||||
|
@ -1,67 +1,67 @@
|
|||||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||||
import {gameOptionsBoxOpen, gameOptionsBoxClose}from "../utils/GameOptions.js";
|
import {gameOptionsBoxOpen, gameOptionsBoxClose}from "../utils/GameOptions";
|
||||||
import {clearEventListeners, createElement,
|
import {clearEventListeners, createElement,
|
||||||
removeChildrenFromElement,
|
removeChildrenFromElement,
|
||||||
exceptionAlert} from "../utils/HelperFunctions.js";
|
exceptionAlert} from "../utils/HelperFunctions";
|
||||||
import numeral from "numeral/min/numeral.min";
|
import numeral from "numeral/min/numeral.min";
|
||||||
import {formatNumber,
|
import {formatNumber,
|
||||||
convertTimeMsToTimeElapsedString,
|
convertTimeMsToTimeElapsedString,
|
||||||
replaceAt} from "../utils/StringHelperFunctions";
|
replaceAt} from "../utils/StringHelperFunctions";
|
||||||
import {loxBoxCreate, logBoxUpdateText,
|
import {loxBoxCreate, logBoxUpdateText,
|
||||||
logBoxOpened} from "../utils/LogBox.js";
|
logBoxOpened} from "../utils/LogBox";
|
||||||
|
|
||||||
import {updateActiveScriptsItems} from "./ActiveScriptsUI.js";
|
import {updateActiveScriptsItems} from "./ActiveScriptsUI";
|
||||||
import {Augmentations, installAugmentations,
|
import {Augmentations, installAugmentations,
|
||||||
initAugmentations, AugmentationNames,
|
initAugmentations, AugmentationNames,
|
||||||
displayAugmentationsContent,
|
displayAugmentationsContent,
|
||||||
PlayerOwnedAugmentation} from "./Augmentations.js";
|
PlayerOwnedAugmentation} from "./Augmentations";
|
||||||
import {BitNodes, initBitNodes,
|
import {BitNodes, initBitNodes,
|
||||||
initBitNodeMultipliers} from "./BitNode.js";
|
initBitNodeMultipliers} from "./BitNode";
|
||||||
import {Bladeburner} from "./Bladeburner.js";
|
import {Bladeburner} from "./Bladeburner";
|
||||||
import {cinematicTextFlag} from "./CinematicText.js";
|
import {cinematicTextFlag} from "./CinematicText";
|
||||||
import {CompanyPositions, initCompanies} from "./Company.js";
|
import {CompanyPositions, initCompanies} from "./Company";
|
||||||
import {Corporation} from "./CompanyManagement.js";
|
import {Corporation} from "./CompanyManagement";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants";
|
||||||
import {displayCreateProgramContent,
|
import {displayCreateProgramContent,
|
||||||
getNumAvailableCreateProgram,
|
getNumAvailableCreateProgram,
|
||||||
initCreateProgramButtons,
|
initCreateProgramButtons,
|
||||||
Programs} from "./CreateProgram.js";
|
Programs} from "./CreateProgram";
|
||||||
import {displayFactionContent, joinFaction,
|
import {displayFactionContent, joinFaction,
|
||||||
processPassiveFactionRepGain, Factions,
|
processPassiveFactionRepGain, Factions,
|
||||||
inviteToFaction, initFactions} from "./Faction.js";
|
inviteToFaction, initFactions} from "./Faction";
|
||||||
import {FconfSettings} from "./Fconf.js";
|
import {FconfSettings} from "./Fconf";
|
||||||
import {Locations, displayLocationContent,
|
import {Locations, displayLocationContent,
|
||||||
initLocationButtons} from "./Location.js";
|
initLocationButtons} from "./Location";
|
||||||
import {displayGangContent, updateGangContent,
|
import {displayGangContent, updateGangContent,
|
||||||
Gang} from "./Gang.js";
|
Gang} from "./Gang";
|
||||||
import {displayHacknetNodesContent, processAllHacknetNodeEarnings,
|
import {displayHacknetNodesContent, processAllHacknetNodeEarnings,
|
||||||
updateHacknetNodesContent} from "./HacknetNode.js";
|
updateHacknetNodesContent} from "./HacknetNode";
|
||||||
import {iTutorialStart} from "./InteractiveTutorial.js";
|
import {iTutorialStart} from "./InteractiveTutorial";
|
||||||
import {initLiterature} from "./Literature.js";
|
import {initLiterature} from "./Literature";
|
||||||
import {checkForMessagesToSend, initMessages} from "./Message.js";
|
import {checkForMessagesToSend, initMessages} from "./Message";
|
||||||
import {inMission, currMission} from "./Missions.js";
|
import {inMission, currMission} from "./Missions";
|
||||||
import {initSingularitySFFlags,
|
import {initSingularitySFFlags,
|
||||||
hasSingularitySF, hasCorporationSF} from "./NetscriptFunctions.js";
|
hasSingularitySF, hasCorporationSF} from "./NetscriptFunctions";
|
||||||
import {updateOnlineScriptTimes,
|
import {updateOnlineScriptTimes,
|
||||||
runScriptsLoop} from "./NetscriptWorker.js";
|
runScriptsLoop} from "./NetscriptWorker";
|
||||||
import {Player} from "./Player.js";
|
import {Player} from "./Player";
|
||||||
import {prestigeAugmentation,
|
import {prestigeAugmentation,
|
||||||
prestigeSourceFile} from "./Prestige.js";
|
prestigeSourceFile} from "./Prestige";
|
||||||
import {redPillFlag, hackWorldDaemon} from "./RedPill.js";
|
import {redPillFlag, hackWorldDaemon} from "./RedPill";
|
||||||
import {saveObject, loadGame} from "./SaveObject.js";
|
import {saveObject, loadGame} from "./SaveObject";
|
||||||
import {loadAllRunningScripts, scriptEditorInit,
|
import {loadAllRunningScripts, scriptEditorInit,
|
||||||
updateScriptEditorContent} from "./Script.js";
|
updateScriptEditorContent} from "./Script";
|
||||||
import {AllServers, Server, initForeignServers} from "./Server.js";
|
import {AllServers, Server, initForeignServers} from "./Server";
|
||||||
import {Settings, setSettingsLabels} from "./Settings.js";
|
import {Settings, setSettingsLabels} from "./Settings";
|
||||||
import {initSourceFiles, SourceFiles,
|
import {initSourceFiles, SourceFiles,
|
||||||
PlayerOwnedSourceFile} from "./SourceFile.js";
|
PlayerOwnedSourceFile} from "./SourceFile";
|
||||||
import {SpecialServerIps, initSpecialServerIps} from "./SpecialServerIps.js";
|
import {SpecialServerIps, initSpecialServerIps} from "./SpecialServerIps";
|
||||||
import {StockMarket, StockSymbols,
|
import {StockMarket, StockSymbols,
|
||||||
SymbolToStockMap, initStockSymbols,
|
SymbolToStockMap, initStockSymbols,
|
||||||
initSymbolToStockMap, stockMarketCycle,
|
initSymbolToStockMap, stockMarketCycle,
|
||||||
updateStockPrices,
|
updateStockPrices,
|
||||||
displayStockMarketContent} from "./StockMarket.js";
|
displayStockMarketContent} from "./StockMarket";
|
||||||
import {Terminal, postNetburnerText, post, KEY} from "./Terminal.js";
|
import {Terminal, postNetburnerText, post, KEY} from "./Terminal";
|
||||||
|
|
||||||
/* Shortcuts to navigate through the game
|
/* Shortcuts to navigate through the game
|
||||||
* Alt-t - Terminal
|
* Alt-t - Terminal
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Faction, joinFaction} from "../src/Faction.js";
|
import {Faction, joinFaction} from "../src/Faction";
|
||||||
import {Engine} from "../src/engine.js";
|
import {Engine} from "../src/engine";
|
||||||
import {Player} from "../src/Player.js";
|
import {Player} from "../src/Player";
|
||||||
import {clearEventListeners} from "./HelperFunctions.js";
|
import {clearEventListeners} from "./HelperFunctions";
|
||||||
|
|
||||||
/* Faction Invitation Pop-up box */
|
/* Faction Invitation Pop-up box */
|
||||||
function factionInvitationBoxClose() {
|
function factionInvitationBoxClose() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//General helper functions
|
//General helper functions
|
||||||
import {isString} from "./StringHelperFunctions";
|
import {isString} from "./StringHelperFunctions";
|
||||||
import {dialogBoxCreate} from "./DialogBox.js";
|
import {dialogBoxCreate} from "./DialogBox";
|
||||||
|
|
||||||
//Returns the size (number of keys) of an object
|
//Returns the size (number of keys) of an object
|
||||||
function sizeOfObject(obj) {
|
function sizeOfObject(obj) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {AllServers} from "../src/Server.js";
|
import {AllServers} from "../src/Server";
|
||||||
/* Functions to deal with manipulating IP addresses*/
|
/* Functions to deal with manipulating IP addresses*/
|
||||||
|
|
||||||
//Generate a random IP address
|
//Generate a random IP address
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {BitNodeMultipliers} from "../src/BitNode.js";
|
import {BitNodeMultipliers} from "../src/BitNode";
|
||||||
import {CONSTANTS} from "../src/Constants.js";
|
import {CONSTANTS} from "../src/Constants";
|
||||||
import {Factions, Faction} from "../src/Faction.js";
|
import {Factions, Faction} from "../src/Faction";
|
||||||
import {Player} from "../src/Player.js";
|
import {Player} from "../src/Player";
|
||||||
import {dialogBoxCreate} from "./DialogBox.js";
|
import {dialogBoxCreate} from "./DialogBox";
|
||||||
import {clearEventListeners} from "./HelperFunctions.js";
|
import {clearEventListeners} from "./HelperFunctions";
|
||||||
import {formatNumber} from "./StringHelperFunctions";
|
import {formatNumber} from "./StringHelperFunctions";
|
||||||
|
|
||||||
/* InfiltrationBox.js */
|
/* InfiltrationBox.js */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {killWorkerScript} from "../src/NetscriptWorker.js";
|
import {killWorkerScript} from "../src/NetscriptWorker";
|
||||||
import {printArray, clearEventListeners} from "./HelperFunctions.js";
|
import {printArray, clearEventListeners} from "./HelperFunctions";
|
||||||
|
|
||||||
$(document).keydown(function(event) {
|
$(document).keydown(function(event) {
|
||||||
if (logBoxOpened && event.keyCode == 27) {
|
if (logBoxOpened && event.keyCode == 27) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { dialogBoxCreate } from "./DialogBox.js";
|
import { dialogBoxCreate } from "./DialogBox";
|
||||||
|
|
||||||
// Netburner String helper functions
|
// Netburner String helper functions
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {clearEventListeners} from "./HelperFunctions.js";
|
import {clearEventListeners} from "./HelperFunctions";
|
||||||
/* Generic Yes-No Pop-up box
|
/* Generic Yes-No Pop-up box
|
||||||
* Can be used to create pop-up boxes that require a yes/no response from player
|
* Can be used to create pop-up boxes that require a yes/no response from player
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user