This commit is contained in:
danielyxie 2018-06-26 16:58:45 -05:00
commit 18e47ee7c4
52 changed files with 701 additions and 557 deletions

104
CONTRIBUTING.md Normal file

@ -0,0 +1,104 @@
# Contributing to Bitburner
## In General
The game is made better because the community as a whole speaks up about
ways to improve the game. Here's some of the ways you can make your voice
heard:
- [Discord](https://discordapp.com)
There is a dedicated Discord instance set up for more free-form chats
between all members of the community. Regular players, heavy scripters,
Bitburner contributors, and everyone in between can be found on the
server.
- [Github Issues](https://github.com/danielyxie/bitburner/issues)
Although the term "issues" can have a negative connotation, they are a
means of communicating with the community. A new Issue can be a
interesting new feature that you feel would improve the game. It could be
an unexpected behavior within the game. Or because the game is about
scripting perhaps there is something that is conflicting with the
browser's Javascript interaction. So please do not be afraid to open a
[new issue](https://github.com/danielyxie/bitburner/issues/new).
## Reporting Bugs
The recommended method for reporting a bug is by opening a
[Github Issue](https://github.com/danielyxie/bitburner/issues).
Before submitting a bug report, please check to make sure the bug has not
already been reported as an [Issue](https://github.com/danielyxie/bitburner/issues).
#### How to Submit a Good Bug Report
* **Use a clear and descriptive title** for the issue
* **State your browser, your browser's version, and your computer's OS**
* **Provide instructions on how to reproduce the bug** in as much detail
as possible. If you cannot reliably reproduce the bug, then just try
your best to explain what was happening when the bug occurred
* **Provide any scripts** that triggered the bug if the issue is Netscript-related
* **Open your browser's Dev Console and report any error-related output**
that may be printed there. The Dev Console can be opened on most modern
browsers by pressing F12
## As a Developer
Anyone is welcome to contribute to Bitburner code. However, please read
the [license](https://github.com/danielyxie/bitburner/blob/dev/license.txt)
and the [readme](https://github.com/danielyxie/bitburner/blob/dev/README.md)
before doing so.
To contribute to Bitburner code, you will need to have
[NodeJS](https://nodejs.org) installed. When installing NodeJS, a utility
called `npm` is installed as well.
#### What are you Allowed to Contribute?
Not all code contributions will be accepted. The safest way to ensure
that you don't waste time working on something that gets rejected is to
run your idea(s)/plan(s) past [danielyxie](https://github.com/danielyxie) first.
You can contact him through:
* Github
* Discord
* [Reddit](https://www.reddit.com/user/chapt3r/)
Otherwise, here are some general guidelines for determining what types of changes
are okay to contribute:
##### Contributions that Will Most Likely Be Accepted
* Bug Fixes
* Quality-of-Life Changes
* Adding a new, commonly-requested Netscript function
* Fixing or improving UI elements
* Adding game settings/options
* Adding a new Terminal command
* Code Refactors that conform to good/standard practices
##### Contributions that will not be Accepted without prior approval
* Changes that directly affect the game's balance
* New gameplay mechanics
#### Submitting a Pull Request
When submitting a pull request with your code contributions, please abide by
the following rules:
- Work in a branch forked from `dev` to isolate the new code
- Ensure you have latest from the [game's main
repository](danielyxie/bitburner@dev)
- Rebase your branch if necessary
- Run the game locally to test out your changes
- When submitting the pull request, make sure that the base fork is
_danielyxie/bitburner_ and the base is _dev_.
- If your changes affect the game's UI, attach some screenshots or GIFs showing
the changes to the UI
- If your changes affect Netscript, provide some
scripts that can be used to test the Netscript changes.
- Do not check in the bundled engine (dist\engine.bundle.js)
## As a Documentor
To contribute to BitBurner documentation, you will need to have Python
installed, along with [Sphinx](http://www.sphinx-doc.org).
Before submitting your code for a pull request, please try to follow these
rules:
- Work in a branch forked from `dev` to isolate the new code
- Ensure you have latest from the [game's main
repository](danielyxie/bitburner@dev)
- Rebase your branch if necessary
- When submitting the pull request, make sure that the base fork is
_danielyxie/bitburner_ and the base is _dev_.

@ -1,31 +1,35 @@
# Bitburner # Bitburner
Bitburner is a cyberpunk hacking-themed incremental game. The game can be Bitburner is a cyberpunk hacking-themed incremental game. The game can be
played [here](https://danielyxie.github.io/bitburner). played at https://danielyxie.github.io/bitburner.
# Documentation # Documentation
The game's official documentation can be found [here](http://bitburner.readthedocs.io/en/latest/index.html). Please note that The game's official documentation can be found on [Read The
this is still a work-in-progress and is in its early stages. Docs](http://bitburner.readthedocs.io/). Please note that this is still a
work-in-progress and is in its early stages.
The documentation is created using Sphinx and is hosted on Read The Docs. The documentation is created using [Sphinx](http://www.sphinx-doc.org).
Anyone is welcome to contribute to the documentation by editing the source files Anyone is welcome to contribute to the documentation by editing the [source
in /doc/ and then making a pull request with your changes/contributions. files](/doc/source) and then making a pull request with your contributions.
For further guidance, please refer to the "As A Documentor" section of
[CONTRIBUTING](CONTRIBUTING.md).
# Wiki # Wiki
The game's wiki can be found [here](http://bitburner.wikia.com/wiki/Bitburner_Wiki). The game's wiki can be found on [Wikia](http://bitburner.wikia.com/). Please
Please note that the wiki is in the process of being deprecated. Eventually all of the note that the wiki is in the process of being deprecated. Eventually all of
wiki content will be moved into the Read The Docs documentation. the wiki content will be moved into the Read The Docs documentation.
# Contributing # Contribution
If you would like to make any small change or addition to the game, you may go ahead There are many ways to contribute to the game. It can be as simple as fixing
and do so by submitting a pull request. a typo, correcting a bug, or improving the UI. For guidance on doing so,
please refer to the [CONTRIBUTING](CONTRIBUTING.md) document.
You will retain all ownership of the Copyright of any contributions you make, You will retain all ownership of the Copyright of any contributions you make,
and will have the same rights to use or license your contributions. By and will have the same rights to use or license your contributions. By
submitting a pull request you agree to grant me perpetual, worldwide, non-exclusive, submitting a pull request you agree to grant me perpetual, worldwide,
transferable, royalty-free, and irrevocable rights to use, publish, and distribute non-exclusive, transferable, royalty-free, and irrevocable rights to use,
your contributions to the project. A formal Contributor's License Agreement publish, and distribute your contributions to the project. A formal
will be drawn up in the future. Contributor's License Agreement will be drawn up in the future.
If you would like to make significant contributions to the project as a If you would like to make significant contributions to the project as a
collaborator, please message me privately. collaborator, please reach out to @danielyxie to help coordinate the effort.

@ -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,156 +0,0 @@
//Contains the "information" property for all the Factions, which is just a description
//of each faction
function FactionInfo(infoText, enemies, offerHackingMission, offerHackingWork, offerFieldWork, offerSecurityWork) {
this.infoText = infoText;
this.enemies = enemies;
this.offerHackingMission = offerHackingMission;
this.offerHackingWork = offerHackingWork;
this.offerFieldWork = offerFieldWork;
this.offerSecurityWork = offerSecurityWork;
// these are always all 1 for now.
this.augmentationPriceMult = 1;
this.augmentationRepRequirementMult = 1;
}
const FactionInfos = {
//Endgame
"Illuminati": new FactionInfo("Humanity never changes. No matter how civilized society becomes, it will eventually fall back " +
"into chaos. And from this chaos, we are the Invisible hand that guides them to order. ", [], true, true, true, false),
"Daedalus": new FactionInfo("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.", [], true, true, true, false),
"The Covenant": new FactionInfo("Surrender yourself. Give up your empty individuality to become part of something great, something eternal. " +
"Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.<br><br> " +
"Only then can you discover immortality.", [], true, true, true, false),
//Megacorporations, each forms its own faction
"ECorp": new FactionInfo("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. " +
"With our wide range of Internet-related software and commercial hardware, ECorp makes the world's " +
"information universally accessible.", [], true, true, true, true),
"MegaCorp": new FactionInfo("MegaCorp does things that others don't. We imagine. We create. We invent. We build things that " +
"others have never even dreamed of. Our work fills the world's needs for food, water, power, and " +
"transporation on an unprecendented scale, in ways that no other company can.<br><br>" +
"In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.", [], true, true, true, true),
"Bachman & Associates": new FactionInfo("Where Law and Business meet - thats where we are. <br><br>" +
"Legal Insight - Business Instinct - Experience Innovation", [], true, true, true, true),
"Blade Industries": new FactionInfo("Augmentation is salvation", [], true, true, true, true),
"NWO": new FactionInfo("The human being does not truly desire freedom. It wants " +
"to be observed, understood, and judged. It wants to be given purpose and " +
"direction in its life. That is why humans created God. " +
"And that is why humans created civilization - " +
"not because of willingness, " +
"but because of a need to be incorporated into higher orders of structure and meaning.", [], true, true, true, true),
"Clarke Incorporated": new FactionInfo("Unlocking the power of the genome", [], true, true, true, true),
"OmniTek Incorporated": new FactionInfo("Simply put, our mission is to design and build robots that make a difference", [], true, true, true, true),
"Four Sigma": new FactionInfo("The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by " +
"deep learning and innovative ideas. And improved by iteration. That's Four Sigma.", [], true, true, true, true),
"KuaiGong International": new FactionInfo("Dream big. Work hard. Make history.", [], true, true, true, true),
//Other Corporations
"Fulcrum Secret Technologies": new FactionInfo("The human organism has an innate desire to worship. " +
"That is why they created gods. If there were no gods, " +
"it would be necessary to create them. And now we can.", [], true, true, false, true),
//Hacker groups
"BitRunners": new FactionInfo("Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. "+
"It's all transformed into bits, stored in bits, communicated through bits. Its impossible for any person " +
"to move, to live, to operate at any level without the use of bits. " +
"And when a person moves, lives, and operates, they leave behind their bits, mere traces of seemingly " +
"meaningless fragments of information. But these bits can be reconstructed. Transformed. Used.<br><br>" +
"Those who run the bits, run the world", [], true, true, false, false),
"The Black Hand": new FactionInfo("The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. " +
"Technological power. " +
"And those at the top rule with an invisible hand. They built a society where the rich get richer, " +
"and everyone else suffers.<br><br>" +
"So much pain. So many lives. Their darkness must end.", [], true, true, true, false),
"NiteSec": new FactionInfo(
" __..__ <br>" +
" _.nITESECNIt. <br>" +
" .-'NITESECNITESEc. <br>" +
" .' NITESECNITESECn <br>" +
" / NITESECNITESEC; <br>" +
" : :NITESECNITESEC; <br>" +
" ; $ NITESECNITESECN <br>" +
" : _, ,N'ITESECNITESEC <br>" +
" : .+^^`, : `NITESECNIT <br>" +
" ) /), `-,-=,NITESECNI <br>" +
" / ^ ,-;|NITESECN; <br>" +
" / _.' '-';NITESECN <br>" +
" ( , ,-''`^NITE' <br>" +
" )` :`. .' <br>" +
" )-- ; `- / <br>" +
" \' _.-' : <br>" +
" ( _.-' \. \ <br>" +
" \------. \ \ <br>" +
" \. \ \ <br>" +
" \ _.nIt <br>" +
" \ _.nITESECNi <br>" +
" nITESECNIT^' \ <br>" +
" NITE^' ___ \ <br>" +
" / .gP''''Tp. \ <br>" +
" : d' . `b \ <br>" +
" ; d' o `b ; <br>" +
" / d; `b| <br>" +
" /, $; @ `: <br>" +
" /' $$ ; <br>" +
" .' $$b o | <br>" +
" .' d$$$; : <br>" +
" / .d$$$$; , ; <br>" +
" d .dNITESEC $ | <br>" +
" :bp.__.gNITESEC$$ :$ ; <br>" +
" NITESECNITESECNIT $$b : <br>", [], true, true, false, false),
//City factions, essentially governments
"Chongqing": new FactionInfo("Serve the people", ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"Sector-12": new FactionInfo("The City of the Future", ["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
"New Tokyo": new FactionInfo("Asia's World City", ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"Aevum": new FactionInfo("The Silicon City", ["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
"Ishima": new FactionInfo("The East Asian Order of the Future", ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"Volhaven": new FactionInfo("Benefit, Honour, and Glory", ["Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima"], true, true, true, true),
//Criminal Organizations/Gangs
"Speakers for the Dead": new FactionInfo("It is better to reign in hell than to serve in heaven.", [], true, true, true, true),
"The Dark Army": new FactionInfo("The World doesn't care about right or wrong. It's all about power.", [], true, true, true, false),
"The Syndicate": new FactionInfo("Honor holds you back", [], true, true, true, true),
"Silhouette": new FactionInfo("Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big " +
"that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working " +
"for.\n\n" +
"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.", [], true, true, true, false),
"Tetrads": new FactionInfo("Following the Mandate of Heaven and Carrying out the Way", [], false, false, true, true),
"Slum Snakes": new FactionInfo("Slum Snakes rule!", [], false, false, true, true),
//Earlygame factions - factions the player will prestige with early on that don't
//belong in other categories
"Netburners": new FactionInfo("~~//*>H4CK|\|3T 8URN3R5**>?>\\~~", [], true, true, false, false),
"Tian Di Hui": new FactionInfo("Obey Heaven and Work Righteousness", [], true, true, false, true),
"CyberSec": new FactionInfo("The Internet is the first thing that humanity has built that humanity doesnt understand, " +
"the largest experiment in anarchy that we have ever had. And as the world becomes increasingly " +
"dominated by the internet, society approaches the brink of total chaos. " +
"We serve only to protect society, to protect humanity, to protect the world from its imminent collapse.", [], true, true, false, false),
//Special Factions
"Bladeburners": new FactionInfo("It's too bad they won't live. But then again, who does?<br><br>" +
"Note that for this faction, reputation can only be gained through Bladeburner actions. Completing " +
"Bladeburner contracts/operations will increase your reputation.", [], false, false, false, false),
}
export {FactionInfos};

193
src/FactionInfo.ts Normal file

@ -0,0 +1,193 @@
// Contains the "information" property for all the Factions, which is just a description of each faction
class FactionInfo {
augmentationPriceMult: number;
augmentationRepRequirementMult: number;
enemies: string[];
infoText: string;
offerFieldWork: boolean;
offerHackingMission: boolean;
offerHackingWork: boolean;
offerSecurityWork: boolean;
constructor(infoText: string, enemies: string[], offerHackingMission: boolean, offerHackingWork: boolean,
offerFieldWork: boolean, offerSecurityWork: boolean) {
this.infoText = infoText;
this.enemies = enemies;
this.offerHackingMission = offerHackingMission;
this.offerHackingWork = offerHackingWork;
this.offerFieldWork = offerFieldWork;
this.offerSecurityWork = offerSecurityWork;
// These are always all 1 for now.
this.augmentationPriceMult = 1;
this.augmentationRepRequirementMult = 1;
}
}
const FactionInfos = {
// Endgame
Illuminati: new FactionInfo("Humanity never changes. No matter how civilized society becomes, it will eventually" +
"fall back into chaos. And from this chaos, we are the Invisible hand that guides them to order. ",
[], true, true, true, false),
Daedalus: new FactionInfo("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",
[], true, true, true, false),
"The Covenant": new FactionInfo("Surrender yourself. Give up your empty individuality to become part of something" +
"great, something eternal. Become a slave. Submit your mind, body, and soul. Only" +
"then can you set yourself free.<br><br> Only then can you discover immortality.",
[], true, true, true, false),
// Megacorporations, each forms its own faction
ECorp: new FactionInfo("ECorp's mission is simple: to connect the world of today with the technology of tomorrow." +
"With our wide range of Internet-related software and commercial hardware, ECorp makes" +
"the world's information universally accessible.",
[], true, true, true, true),
MegaCorp: new FactionInfo("MegaCorp does things that others don't. We imagine. We create. We invent. We build" +
"things that others have never even dreamed of. Our work fills the world's needs for" +
"food, water, power, and transporation on an unprecendented scale, in ways that no" +
"other company can.<br><br>In our labs and factories and on the ground with customers," +
"MegaCorp is ushering in a new era for the world.",
[], true, true, true, true),
"Bachman & Associates": new FactionInfo("Where Law and Business meet - thats where we are. <br><br>" +
"Legal Insight - Business Instinct - Experience Innovation",
[], true, true, true, true),
"Blade Industries": new FactionInfo("Augmentation is salvation", [], true, true, true, true),
NWO: new FactionInfo("The human being does not truly desire freedom. It wants " +
"to be observed, understood, and judged. It wants to be given purpose and " +
"direction in its life. That is why humans created God. " +
"And that is why humans created civilization - " +
"not because of willingness, " +
"but because of a need to be incorporated into higher orders of structure and meaning.",
[], true, true, true, true),
"Clarke Incorporated": new FactionInfo("Unlocking the power of the genome",
[], true, true, true, true),
"OmniTek Incorporated": new FactionInfo("Simply put, our mission is to design and build robots that make a" +
"difference",
[], true, true, true, true),
"Four Sigma": new FactionInfo("The scientific method is the best way to approach investing. Big strategies backed" +
"up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",
[], true, true, true, true),
"KuaiGong International": new FactionInfo("Dream big. Work hard. Make history.",
[], true, true, true, true),
// Other Corporations
"Fulcrum Secret Technologies": new FactionInfo("The human organism has an innate desire to worship. " +
"That is why they created gods. If there were no gods, " +
"it would be necessary to create them. And now we can.",
[], true, true, false, true),
// Hacker groups
BitRunners: new FactionInfo("Our entire lives are controlled by bits. All of our actions, our thoughts, our" +
"personal information. It's all transformed into bits, stored in bits, communicated through bits." +
"Its impossible for any person to move, to live, to operate at any level without the use of" +
"bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of" +
"seemingly meaningless fragments of information. But these bits can be reconstructed." +
"Transformed. Used.<br><br>Those who run the bits, run the world",
[], true, true, false, false),
"The Black Hand": new FactionInfo("The world, so afraid of strong government, now has no government." +
"Only power - Digital power. Financial power. Technological power. And those at the top rule with" +
"an invisible hand. They built a society where the rich get richer, and everyone else suffers." +
"<br><br>So much pain. So many lives. Their darkness must end.",
[], true, true, true, false),
NiteSec: new FactionInfo(
" __..__ <br>" +
" _.nITESECNIt. <br>" +
" .-'NITESECNITESEc. <br>" +
" .' NITESECNITESECn <br>" +
" / NITESECNITESEC; <br>" +
" : :NITESECNITESEC; <br>" +
" ; $ NITESECNITESECN <br>" +
" : _, ,N'ITESECNITESEC <br>" +
" : .+^^`, : `NITESECNIT <br>" +
" ) /), `-,-=,NITESECNI <br>" +
" / ^ ,-;|NITESECN; <br>" +
" / _.' '-';NITESECN <br>" +
" ( , ,-''`^NITE' <br>" +
" )` :`. .' <br>" +
" )-- ; `- / <br>" +
" \' _.-' : <br>" +
" ( _.-' \. \ <br>" +
" \------. \ \ <br>" +
" \. \ \ <br>" +
" \ _.nIt <br>" +
" \ _.nITESECNi <br>" +
" nITESECNIT^' \ <br>" +
" NITE^' ___ \ <br>" +
" / .gP''''Tp. \ <br>" +
" : d' . `b \ <br>" +
" ; d' o `b ; <br>" +
" / d; `b| <br>" +
" /, $; @ `: <br>" +
" /' $$ ; <br>" +
" .' $$b o | <br>" +
" .' d$$$; : <br>" +
" / .d$$$$; , ; <br>" +
" d .dNITESEC $ | <br>" +
" :bp.__.gNITESEC$$ :$ ; <br>" +
" NITESECNITESECNIT $$b : <br>",
[], true, true, false, false),
// City factions, essentially governments
Aevum: new FactionInfo("The Silicon City",
["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
Chongqing: new FactionInfo("Serve the people",
["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
Ishima: new FactionInfo("The East Asian Order of the Future",
["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"New Tokyo": new FactionInfo("Asia's World City",
["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"Sector-12": new FactionInfo("The City of the Future",
["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
Volhaven: new FactionInfo("Benefit, Honour, and Glory",
["Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima"], true, true, true, true),
// Criminal Organizations/Gangs
"Speakers for the Dead": new FactionInfo("It is better to reign in hell than to serve in heaven.",
[], true, true, true, true),
"The Dark Army": new FactionInfo("The World doesn't care about right or wrong. It's all about power.",
[], true, true, true, false),
"The Syndicate": new FactionInfo("Honor holds you back", [], true, true, true, true),
Silhouette: new FactionInfo("Corporations have filled the void of power left behind by the collapse of Western" +
"government. The issue is they've become so big that you don't know who they're working for. And" +
"if you're employed at one of these corporations, you don't even know who you're working for.\n\n" +
"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the" +
"system.",
[], true, true, true, false),
Tetrads: new FactionInfo("Following the Mandate of Heaven and Carrying out the Way", [], false, false, true, true),
"Slum Snakes": new FactionInfo("Slum Snakes rule!", [], false, false, true, true),
// Earlygame factions - factions the player will prestige with early on that don't belong in other categories.
Netburners: new FactionInfo("~~//*>H4CK|\|3T 8URN3R5**>?>\\~~", [], true, true, false, false),
"Tian Di Hui": new FactionInfo("Obey Heaven and Work Righteousness", [], true, true, false, true),
CyberSec: new FactionInfo("The Internet is the first thing that humanity has built that humanity doesnt" +
"understand, the largest experiment in anarchy that we have ever had. And as the world becomes" +
"increasingly dominated by the internet, society approaches the brink of total chaos. We serve only" +
"to protect society, to protect humanity, to protect the world from its imminent collapse.",
[], true, true, false, false),
// Special Factions
Bladeburners: new FactionInfo("It's too bad they won't live. But then again, who does?<br><br>Note that for this" +
"faction, reputation can only be gained through Bladeburner actions. Completing " +
"Bladeburner contracts/operations will increase your reputation.",
[], false, false, false, false),
};
export {FactionInfos};

@ -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,

@ -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) {

@ -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;

@ -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";

@ -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';

@ -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
*/ */