mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +01:00
Merge branch 'dev' of https://github.com/danielyxie/bitburner into dev
This commit is contained in:
commit
18e47ee7c4
104
CONTRIBUTING.md
Normal file
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_.
|
40
README.md
40
README.md
@ -1,31 +1,35 @@
|
||||
# Bitburner
|
||||
Bitburner is a cyberpunk hacking-themed incremental game. The game can be
|
||||
played [here](https://danielyxie.github.io/bitburner).
|
||||
Bitburner is a cyberpunk hacking-themed incremental game. The game can be
|
||||
played at https://danielyxie.github.io/bitburner.
|
||||
|
||||
# Documentation
|
||||
The game's official documentation can be found [here](http://bitburner.readthedocs.io/en/latest/index.html). Please note that
|
||||
this is still a work-in-progress and is in its early stages.
|
||||
The game's official documentation can be found on [Read The
|
||||
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
|
||||
in /doc/ and then making a pull request with your changes/contributions.
|
||||
Anyone is welcome to contribute to the documentation by editing the [source
|
||||
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
|
||||
The game's wiki can be found [here](http://bitburner.wikia.com/wiki/Bitburner_Wiki).
|
||||
Please note that the wiki is in the process of being deprecated. Eventually all of the
|
||||
wiki content will be moved into the Read The Docs documentation.
|
||||
The game's wiki can be found on [Wikia](http://bitburner.wikia.com/). Please
|
||||
note that the wiki is in the process of being deprecated. Eventually all of
|
||||
the wiki content will be moved into the Read The Docs documentation.
|
||||
|
||||
# Contributing
|
||||
If you would like to make any small change or addition to the game, you may go ahead
|
||||
and do so by submitting a pull request.
|
||||
# Contribution
|
||||
There are many ways to contribute to the game. It can be as simple as fixing
|
||||
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,
|
||||
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,
|
||||
transferable, royalty-free, and irrevocable rights to use, publish, and distribute
|
||||
your contributions to the project. A formal Contributor's License Agreement
|
||||
will be drawn up in the future.
|
||||
submitting a pull request you agree to grant me perpetual, worldwide,
|
||||
non-exclusive, transferable, royalty-free, and irrevocable rights to use,
|
||||
publish, and distribute your contributions to the project. A formal
|
||||
Contributor's License Agreement will be drawn up in the future.
|
||||
|
||||
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,
|
||||
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,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. It’s 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 doesn’t 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
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." +
|
||||
"It’s 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 doesn’t" +
|
||||
"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 = {
|
||||
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) {
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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