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