mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
commit
e21831142e
@ -168,6 +168,27 @@ a:link, a:visited {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Make anchor tags ("a" elements) for activated actions */
|
||||
.a-link-button-bought {
|
||||
text-decoration: none;
|
||||
background-color: #00AA00;
|
||||
color: #FFFFFF;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border: 1px solid #00AA00;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.a-link-button-bought:hover .tooltiptext,
|
||||
.a-link-button-bought:hover .tooltiptexthigh,
|
||||
.a-link-button-bought:hover .tooltiptextleft {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.a-link-button-bought:active {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Notification icon (for create program right now only) */
|
||||
#create-program-tab {
|
||||
position:relative;
|
||||
|
8977
dist/engine.bundle.js
vendored
8977
dist/engine.bundle.js
vendored
File diff suppressed because it is too large
Load Diff
8977
dist/tests.bundle.js
vendored
8977
dist/tests.bundle.js
vendored
File diff suppressed because it is too large
Load Diff
BIN
doc/build/doctrees/changelog.doctree
vendored
BIN
doc/build/doctrees/changelog.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/environment.pickle
vendored
BIN
doc/build/doctrees/environment.pickle
vendored
Binary file not shown.
14
doc/build/html/_sources/changelog.rst.txt
vendored
14
doc/build/html/_sources/changelog.rst.txt
vendored
@ -3,8 +3,18 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.37.1
|
||||
-------
|
||||
v0.37.2 - 6/2/2018
|
||||
------------------
|
||||
|
||||
* After joining the Bladeburners division, there is now a button to go to the Bladeburner content
|
||||
in the 'City' page
|
||||
* You now start with $250m in BitNode-8 (increased from $100m)
|
||||
* Bug Fix: You can now no longer directly edit Hacknet Node values through NetscriptJS (hopefully)
|
||||
* Bug Fix: Bladeburners is no longer accessible in BN-8
|
||||
* Bug Fix: getBitNodeMultipliers() Netscript function now returns a copy rather than the original object
|
||||
|
||||
v0.37.1 - 5/22/2018
|
||||
-------------------
|
||||
* You now earn money from successfully completing Bladeburner contracts. The amount you earn is based
|
||||
on the difficulty of the contract.
|
||||
* Completing Field Analysis in Bladeburner now grants 0.1 rank
|
||||
|
18
doc/build/html/changelog.html
vendored
18
doc/build/html/changelog.html
vendored
@ -50,8 +50,19 @@
|
||||
|
||||
<div class="section" id="changelog">
|
||||
<span id="id1"></span><h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="v0-37-1">
|
||||
<h2>v0.37.1<a class="headerlink" href="#v0-37-1" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="v0-37-2-6-2-2018">
|
||||
<h2>v0.37.2 - 6/2/2018<a class="headerlink" href="#v0-37-2-6-2-2018" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li>After joining the Bladeburners division, there is now a button to go to the Bladeburner content
|
||||
in the 'City' page</li>
|
||||
<li>You now start with $250m in BitNode-8 (increased from $100m)</li>
|
||||
<li>Bug Fix: You can now no longer directly edit Hacknet Node values through NetscriptJS (hopefully)</li>
|
||||
<li>Bug Fix: Bladeburners is no longer accessible in BN-8</li>
|
||||
<li>Bug Fix: getBitNodeMultipliers() Netscript function now returns a copy rather than the original object</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="v0-37-1-5-22-2018">
|
||||
<h2>v0.37.1 - 5/22/2018<a class="headerlink" href="#v0-37-1-5-22-2018" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li>You now earn money from successfully completing Bladeburner contracts. The amount you earn is based
|
||||
on the difficulty of the contract.</li>
|
||||
@ -971,7 +982,8 @@ on the difficulty of the contract.</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#"> Changelog</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-37-1">v0.37.1</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-37-2-6-2-2018">v0.37.2 - 6/2/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-37-1-5-22-2018">v0.37.1 - 5/22/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-37-0-5-20-2018">v0.37.0 - 5/20/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-36-1-5-11-2018">v0.36.1 - 5/11/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#v0-36-0-5-2-2018">v0.36.0 - 5/2/2018</a></li>
|
||||
|
3
doc/build/html/index.html
vendored
3
doc/build/html/index.html
vendored
@ -268,7 +268,8 @@ secrets that you've been searching for.</p>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-37-1">v0.37.1</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-37-2-6-2-2018">v0.37.2 - 6/2/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-37-1-5-22-2018">v0.37.1 - 5/22/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-37-0-5-20-2018">v0.37.0 - 5/20/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-36-1-5-11-2018">v0.36.1 - 5/11/2018</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="changelog.html#v0-36-0-5-2-2018">v0.36.0 - 5/2/2018</a></li>
|
||||
|
2
doc/build/html/searchindex.js
vendored
2
doc/build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
@ -3,8 +3,18 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.37.1
|
||||
-------
|
||||
v0.37.2 - 6/2/2018
|
||||
------------------
|
||||
|
||||
* After joining the Bladeburners division, there is now a button to go to the Bladeburner content
|
||||
in the 'City' page
|
||||
* You now start with $250m in BitNode-8 (increased from $100m)
|
||||
* Bug Fix: You can now no longer directly edit Hacknet Node values through NetscriptJS (hopefully)
|
||||
* Bug Fix: Bladeburners is no longer accessible in BN-8
|
||||
* Bug Fix: getBitNodeMultipliers() Netscript function now returns a copy rather than the original object
|
||||
|
||||
v0.37.1 - 5/22/2018
|
||||
-------------------
|
||||
* You now earn money from successfully completing Bladeburner contracts. The amount you earn is based
|
||||
on the difficulty of the contract.
|
||||
* Completing Field Analysis in Bladeburner now grants 0.1 rank
|
||||
|
@ -103,7 +103,7 @@ var NetscriptHighlightRules = function(options) {
|
||||
"JSON|Math|" + // Other
|
||||
"this|arguments|prototype|window|document" , // Pseudo
|
||||
"keyword":
|
||||
"const|yield|import|get|set|async|await|foop|" +
|
||||
"const|yield|import|get|set|async|await|" +
|
||||
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
||||
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
||||
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -7432,6 +7432,11 @@
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
|
||||
},
|
||||
"decimal.js": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-7.2.3.tgz",
|
||||
"integrity": "sha512-AoFI37QS0S87Ft0r3Bdz4q9xSpm1Paa9lSeKLXgMPk/u/+QPIM5Gy4DHcZQS1seqPJH4gHLauPGn347z0HbsrA=="
|
||||
},
|
||||
"decode-uri-component": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"async": "^2.1.2",
|
||||
"bluebird": "^3.5.1",
|
||||
"brace": "^0.11.1",
|
||||
"decimal.js": "7.2.3",
|
||||
"enhanced-resolve": "^3.4.0",
|
||||
"escope": "^3.6.0",
|
||||
"file-saver": "^1.3.3",
|
||||
|
@ -3185,7 +3185,7 @@ function initBladeburner() {
|
||||
Skills[SkillNames.Overclock] = new Skill({
|
||||
name:SkillNames.Overclock,
|
||||
desc:"Each level of this skill decreases the time it takes " +
|
||||
"to attempt a contract or operation by 1% (Max Level: 99)",
|
||||
"to attempt a contract or operation by 1% (Max Level: 95)",
|
||||
baseCost:5, costInc:1, maxLvl:95,
|
||||
actionTime:1
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ import {showLiterature} from "./Literature.js";
|
||||
import {Locations} from "./Location.js";
|
||||
import {Player} from "./Player.js";
|
||||
|
||||
import Decimal from '../utils/decimal.js';
|
||||
import Decimal from "decimal.js";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
||||
import {getRandomInt, removeElementById,
|
||||
createElement, createAccordionElement,
|
||||
|
@ -1,5 +1,5 @@
|
||||
let CONSTANTS = {
|
||||
Version: "0.37.1",
|
||||
Version: "0.37.2",
|
||||
|
||||
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
|
||||
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
|
||||
@ -484,16 +484,13 @@ let CONSTANTS = {
|
||||
"World Stock Exchange account and TIX API Access<br>",
|
||||
|
||||
LatestUpdate:
|
||||
"v0.37.1<br>" +
|
||||
"* You now earn money from successfully completing Bladeburner contracts. The amount you earn is based " +
|
||||
"on the difficulty of the contract.<br>" +
|
||||
"* Completing Field Analysis in Bladeburner now grants 0.1 rank<br>" +
|
||||
"* The maximum RAM you can get on a purchased server is now 1,048,576GB (2^20)<br>" +
|
||||
"* Bug Fix: Fixed Netscript syntax highlighting issues with the new NetscriptJS<br>" +
|
||||
"* Bug Fix: Netscript Functions now properly incur RAM costs in NetscriptJS<br>" +
|
||||
"* Bug Fix: deleteServer() now fails if its called on the server you are currently connected to<br>" +
|
||||
"* Removed in-game Netscript documentation, since it was outdated and difficult to maintain.<br>" +
|
||||
"* Bug Fix: Updated the gymWorkout() Singularity function with the new exp/cost values for gyms<br>"
|
||||
"v0.37.2<br>" +
|
||||
"* After joining the Bladeburners division, there is now a button to go to the Bladeburner content " +
|
||||
"in the 'City' page<br>" +
|
||||
"* You now start with $250m in BitNode-8 (increased from $100m)<br>" +
|
||||
"* Bug Fix: You can now no longer directly edit Hacknet Node values through NetscriptJS (hopefully)<br>" +
|
||||
"* Bug Fix: Bladeburners is no longer accessible in BN-8<br>" +
|
||||
"* Bug Fix: getBitNodeMultipliers() Netscript function now returns a copy rather than the original object<br>"
|
||||
}
|
||||
|
||||
export {CONSTANTS};
|
||||
|
@ -56,6 +56,7 @@ function HacknetNode(name) {
|
||||
this.moneyGainRatePerSecond = 0;
|
||||
}
|
||||
|
||||
|
||||
HacknetNode.prototype.updateMoneyGainRate = function() {
|
||||
//How much extra $/s is gained per level
|
||||
var gainPerLevel = CONSTANTS.HacknetNodeMoneyGainPerLevel;
|
||||
@ -180,6 +181,36 @@ HacknetNode.fromJSON = function(value) {
|
||||
|
||||
Reviver.constructors.HacknetNode = HacknetNode;
|
||||
|
||||
var HacknetNodeWrapper = function(hacknetNodeObj) {
|
||||
var _node = hacknetNodeObj;
|
||||
return {
|
||||
name : _node.name,
|
||||
level : _node.level,
|
||||
ram : _node.ram,
|
||||
cores : _node.cores,
|
||||
totalMoneyGenerated : _node.totalMoneyGenerated,
|
||||
onlineTimeSeconds : _node.onlineTimeSeconds,
|
||||
moneyGainRatePerSecond : _node.moneyGainRatePerSecond,
|
||||
upgradeLevel : function(n) {
|
||||
return _node.upgradeLevel(n);
|
||||
},
|
||||
upgradeRam : function() {
|
||||
return _node.upgradeRam();
|
||||
},
|
||||
upgradeCore : function() {
|
||||
return _node.upgradeCore();
|
||||
},
|
||||
getLevelUpgradeCost : function(n) {
|
||||
return _node.getLevelUpgradeCost(n);
|
||||
},
|
||||
getRamUpgradeCost : function() {
|
||||
return _node.getRamUpgradeCost();
|
||||
},
|
||||
getCoreUpgradeCost : function() {
|
||||
return _node.getCoreUpgradeCost();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function purchaseHacknet() {
|
||||
/* INTERACTIVE TUTORIAL */
|
||||
@ -469,8 +500,31 @@ function updateHacknetNodeDomElement(nodeObj) {
|
||||
}
|
||||
}
|
||||
|
||||
function createPlayerHacknetNodeWrappers() {
|
||||
Player.hacknetNodeWrappers.length = Player.hacknetNodes.length;
|
||||
for (var i = 0; i < Player.hacknetNodes.length; ++i) {
|
||||
Player.hacknetNodeWrappers[i] = new HacknetNodeWrapper(Player.hacknetNodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function updatePlayerHacknetNodeWrappers() {
|
||||
if (Player.hacknetNodeWrappers.length !== Player.hacknetNodes.length) {
|
||||
return createPlayerHacknetNodeWrappers();
|
||||
}
|
||||
for (var i = 0; i < Player.hacknetNodeWrappers.length; ++i) {
|
||||
if (!(Player.hacknetNodeWrappers[i] instanceof HacknetNodeWrapper)) {return createPlayerHacknetNodeWrappers();}
|
||||
Player.hacknetNodeWrappers[i].level = Player.hacknetNodes[i].level;
|
||||
Player.hacknetNodeWrappers[i].ram = Player.hacknetNodes[i].ram;
|
||||
Player.hacknetNodeWrappers[i].cores = Player.hacknetNodes[i].cores;
|
||||
Player.hacknetNodeWrappers[i].totalMoneyGenerated = Player.hacknetNodes[i].totalMoneyGenerated;
|
||||
Player.hacknetNodeWrappers[i].onlineTimeSeconds = Player.hacknetNodes[i].onlineTimeSeconds;
|
||||
Player.hacknetNodeWrappers[i].moneyGainRatePerSecond = Player.hacknetNodes[i].moneyGainRatePerSecond;
|
||||
}
|
||||
}
|
||||
|
||||
function processAllHacknetNodeEarnings(numCycles) {
|
||||
var total = 0;
|
||||
updatePlayerHacknetNodeWrappers();
|
||||
for (var i = 0; i < Player.hacknetNodes.length; ++i) {
|
||||
total += processSingleHacknetNodeEarnings(numCycles, Player.hacknetNodes[i]);
|
||||
}
|
||||
@ -503,4 +557,4 @@ function getHacknetNode(name) {
|
||||
export {hacknetNodesInit, HacknetNode, purchaseHacknet, updateTotalHacknetProduction,
|
||||
getCostOfNextHacknetNode, updateHacknetNodesMultiplierButtons, getMaxNumberLevelUpgrades,
|
||||
displayHacknetNodesContent, updateHacknetNodesContent, processAllHacknetNodeEarnings,
|
||||
getHacknetNode};
|
||||
getHacknetNode, createPlayerHacknetNodeWrappers};
|
||||
|
@ -726,6 +726,7 @@ function displayLocationContent() {
|
||||
securityJob.style.display = "block";
|
||||
agentJob.style.display = "block";
|
||||
if (Player.bitNodeN === 6 || hasBladeburnerSF === true) {
|
||||
if (Player.bitNodeN === 8) {break;}
|
||||
if (Player.bladeburner instanceof Bladeburner) {
|
||||
//Note: Can't infiltrate NSA when part of bladeburner
|
||||
nsaBladeburner.innerText = "Enter Bladeburner Headquarters";
|
||||
|
@ -58,7 +58,7 @@ import {makeRuntimeRejectMsg, netscriptDelay, runScriptFromScript,
|
||||
import {Environment} from "./NetscriptEnvironment.js";
|
||||
import {NetscriptPort} from "./NetscriptPort.js";
|
||||
|
||||
import Decimal from '../utils/decimal.js';
|
||||
import Decimal from "decimal.js";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
||||
import {printArray, powerOfTwo} from "../utils/HelperFunctions.js";
|
||||
import {createRandomIp} from "../utils/IPAddress.js";
|
||||
@ -151,7 +151,7 @@ function NetscriptFunctions(workerScript) {
|
||||
Math : Math,
|
||||
Date : Date,
|
||||
Number : Number,
|
||||
hacknetnodes : Player.hacknetNodes,
|
||||
hacknetnodes : Player.hacknetNodeWrappers,
|
||||
sprintf : sprintf,
|
||||
vsprintf: vsprintf,
|
||||
scan : function(ip=workerScript.serverIp, hostnames=true){
|
||||
@ -1118,7 +1118,8 @@ function NetscriptFunctions(workerScript) {
|
||||
if (!hasAISF) {
|
||||
throw makeRuntimeRejectMsg(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
|
||||
}
|
||||
return BitNodeMultipliers;
|
||||
let copy = Object.assign({}, BitNodeMultipliers);
|
||||
return copy;
|
||||
},
|
||||
getServerMoneyAvailable : function(ip){
|
||||
if (workerScript.checkingRam) {
|
||||
|
@ -19,7 +19,7 @@ import {AllServers, Server, AddToAllServers} from "./Server.js";
|
||||
import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps.js";
|
||||
import {SourceFiles, applySourceFile} from "./SourceFile.js";
|
||||
|
||||
import Decimal from '../utils/decimal.js';
|
||||
import Decimal from "decimal.js";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
||||
import {clearEventListeners} from "../utils/HelperFunctions.js";
|
||||
import {createRandomIp} from "../utils/IPAddress.js";
|
||||
@ -99,6 +99,7 @@ function PlayerObject() {
|
||||
this.currentServer = ""; //IP address of Server currently being accessed through terminal
|
||||
this.purchasedServers = []; //IP Addresses of purchased servers
|
||||
this.hacknetNodes = [];
|
||||
this.hacknetNodeWrappers = [];
|
||||
this.totalHacknetNodeProduction = 0;
|
||||
|
||||
//Factions
|
||||
@ -390,16 +391,8 @@ PlayerObject.prototype.prestigeSourceFile = function() {
|
||||
if (this.bitNodeN === 3) {this.money = new Decimal(150e9);}
|
||||
this.corporation = 0;
|
||||
|
||||
//Reset Bladeburner
|
||||
this.bladeburner = 0;
|
||||
|
||||
//BitNode 8: Ghost of Wall Street
|
||||
if (this.bitNodeN === 8) {this.money = new Decimal(100000000);}
|
||||
if (this.bitNodeN === 8 || hasWallStreetSF) {
|
||||
this.hasWseAccount = true;
|
||||
this.hasTixApiAccess = true;
|
||||
}
|
||||
|
||||
this.playtimeSinceLastAug = 0;
|
||||
this.scriptProdSinceLastAug = 0;
|
||||
}
|
||||
|
@ -27,13 +27,15 @@ import {initStockMarket, initSymbolToStockMap,
|
||||
stockMarketContentCreated,
|
||||
setStockMarketContentCreated} from "./StockMarket.js";
|
||||
import {Terminal, postNetburnerText} from "./Terminal.js";
|
||||
import Decimal from '../utils/decimal.js';
|
||||
import Decimal from "decimal.js";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
||||
import {createPopup, createElement,
|
||||
removeElementById, exceptionAlert} from "../utils/HelperFunctions.js";
|
||||
import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
||||
yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js";
|
||||
|
||||
let BitNode8StartingMoney = 250e6;
|
||||
|
||||
//Prestige by purchasing augmentation
|
||||
function prestigeAugmentation() {
|
||||
initBitNodeMultipliers();
|
||||
@ -127,7 +129,7 @@ function prestigeAugmentation() {
|
||||
Player.bladeburner = null;
|
||||
|
||||
//BitNode 8: Ghost of Wall Street
|
||||
if (Player.bitNodeN === 8) {Player.money = new Decimal(100e6);}
|
||||
if (Player.bitNodeN === 8) {Player.money = new Decimal(BitNode8StartingMoney);}
|
||||
if (Player.bitNodeN === 8 || hasWallStreetSF) {
|
||||
Player.hasWseAccount = true;
|
||||
Player.hasTixApiAccess = true;
|
||||
@ -305,6 +307,13 @@ function prestigeSourceFile() {
|
||||
|
||||
}
|
||||
|
||||
//BitNode 8: Ghost of Wall Street
|
||||
if (Player.bitNodeN === 8) {Player.money = new Decimal(BitNode8StartingMoney);}
|
||||
if (Player.bitNodeN === 8 || hasWallStreetSF) {
|
||||
Player.hasWseAccount = true;
|
||||
Player.hasTixApiAccess = true;
|
||||
}
|
||||
|
||||
//Gain int exp
|
||||
Player.gainIntelligenceExp(5);
|
||||
}
|
||||
|
@ -8,7 +8,8 @@ import {loadFactions, Factions,
|
||||
processPassiveFactionRepGain} from "./Faction.js";
|
||||
import {FconfSettings, loadFconf} from "./Fconf.js";
|
||||
import {loadAllGangs, AllGangs} from "./Gang.js";
|
||||
import {processAllHacknetNodeEarnings} from "./HacknetNode.js";
|
||||
import {processAllHacknetNodeEarnings,
|
||||
createPlayerHacknetNodeWrappers} from "./HacknetNode.js";
|
||||
import {loadMessages, initMessages, Messages} from "./Message.js";
|
||||
import {Player, loadPlayer} from "./Player.js";
|
||||
import {loadAllRunningScripts} from "./Script.js";
|
||||
@ -24,7 +25,7 @@ import {Reviver, Generic_toJSON,
|
||||
Generic_fromJSON} from "../utils/JSONReviver.js";
|
||||
import {formatNumber} from "../utils/StringHelperFunctions.js";
|
||||
|
||||
import Decimal from '../utils/decimal.js';
|
||||
import Decimal from "decimal.js";
|
||||
|
||||
/* SaveObject.js
|
||||
* Defines the object used to save/load games
|
||||
@ -227,6 +228,8 @@ function loadGame(saveString) {
|
||||
}
|
||||
}
|
||||
|
||||
//Re-initialize Hacknet Node Wrappers
|
||||
createPlayerHacknetNodeWrappers();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -443,6 +446,9 @@ function loadImportedGame(saveObj, saveString) {
|
||||
}
|
||||
}
|
||||
|
||||
//Re-initialize Hacknet Node Wrappers
|
||||
createPlayerHacknetNodeWrappers();
|
||||
|
||||
var popupId = "import-game-restart-game-notice";
|
||||
var txt = createElement("p", {
|
||||
innerText:"Imported game! I would suggest saving the game and then reloading the page " +
|
||||
|
@ -702,6 +702,9 @@ function displayStockMarketContent() {
|
||||
wseAccountButton.innerText = "Buy WSE Account - $" + formatNumber(CONSTANTS.WSEAccountCost, 2).toString();
|
||||
if (!Player.hasWseAccount && Player.money.gte(CONSTANTS.WSEAccountCost)) {
|
||||
wseAccountButton.setAttribute("class", "a-link-button");
|
||||
} else if (Player.hasWseAccount){
|
||||
wseAccountButton.innerText = "WSE Account - Purchased";
|
||||
wseAccountButton.setAttribute("class", "a-link-button-bought");
|
||||
} else {
|
||||
wseAccountButton.setAttribute("class", "a-link-button-inactive");
|
||||
}
|
||||
@ -720,6 +723,9 @@ function displayStockMarketContent() {
|
||||
formatNumber(CONSTANTS.TIXAPICost, 2).toString();
|
||||
if (!Player.hasTixApiAccess && Player.money.gte(CONSTANTS.TIXAPICost)) {
|
||||
tixApiAccessButton.setAttribute("class", "a-link-button");
|
||||
} else if(Player.hasTixApiAccess) {
|
||||
tixApiAccessButton.innerText = "Trade Information eXchange (TIX) API Access - Purchased"
|
||||
tixApiAccessButton.setAttribute("class", "a-link-button-bought");
|
||||
} else {
|
||||
tixApiAccessButton.setAttribute("class", "a-link-button-inactive");
|
||||
}
|
||||
|
@ -650,6 +650,7 @@ let Engine = {
|
||||
//Generic Locations (common to every city):
|
||||
// World Stock Exchange
|
||||
// Corporation (if applicable)
|
||||
// Bladeburner HQ (if applicable);
|
||||
var genericLocationsList = document.getElementById("generic-locations-list");
|
||||
genericLocationsList.style.display = "inline";
|
||||
removeChildrenFromElement(genericLocationsList);
|
||||
@ -676,6 +677,18 @@ let Engine = {
|
||||
}));
|
||||
genericLocationsList.appendChild(li);
|
||||
}
|
||||
|
||||
if (Player.bladeburner instanceof Bladeburner) {
|
||||
var li = createElement("li");
|
||||
li.appendChild(createElement("a", {
|
||||
innerText:"Bladeburner Headquarters", class:"a-link-button",
|
||||
clickListener:()=>{
|
||||
Engine.loadBladeburnerContent();
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
genericLocationsList.appendChild(li);
|
||||
}
|
||||
},
|
||||
|
||||
displayFactionsInfo: function() {
|
||||
@ -738,9 +751,9 @@ let Engine = {
|
||||
clickListener:()=>{
|
||||
joinFaction(Factions[factionName]);
|
||||
for (var i = 0; i < Player.factionInvitations.length; ++i) {
|
||||
if (Player.factionInvitations[i] == factionName) {
|
||||
if (Player.factionInvitations[i] == factionName || Factions[Player.factionInvitations[i]].isBanned) {
|
||||
Player.factionInvitations.splice(i, 1);
|
||||
break;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
Engine.displayFactionsInfo();
|
||||
|
4812
utils/decimal.js
4812
utils/decimal.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user