mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
dev menu is now save-file sensitive, Fixed some bugs related to BN5-1 int
This commit is contained in:
parent
141f2a8331
commit
2c2548f856
@ -14,6 +14,7 @@ import { AllServers } from "./Server/AllServers";
|
||||
import { GetServerByHostname } from "./Server/ServerHelpers";
|
||||
import { hackWorldDaemon } from "./RedPill";
|
||||
import { StockMarket } from "./StockMarket/StockMarket";
|
||||
import { Bladeburner } from "./Bladeburner";
|
||||
import { Stock } from "./StockMarket/Stock";
|
||||
import { Engine } from "./engine";
|
||||
import { saveObject } from "./SaveObject";
|
||||
@ -145,6 +146,10 @@ class DevMenuComponent extends Component {
|
||||
hackWorldDaemon(Player.bitNodeN, true);
|
||||
}
|
||||
|
||||
quickHackW0r1dD43m0n() {
|
||||
hackWorldDaemon(Player.bitNodeN, false, true);
|
||||
}
|
||||
|
||||
hackW0r1dD43m0n() {
|
||||
hackWorldDaemon(Player.bitNodeN);
|
||||
}
|
||||
@ -708,7 +713,6 @@ class DevMenuComponent extends Component {
|
||||
contractTypes.push(<option key={name} value={name}>{name}</option>);
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -728,6 +732,7 @@ class DevMenuComponent extends Component {
|
||||
<div className="row">
|
||||
<button className="std-button" onClick={this.quickB1tFlum3}>Quick b1t_flum3.exe</button>
|
||||
<button className="std-button" onClick={this.b1tflum3}>Run b1t_flum3.exe</button>
|
||||
<button className="std-button" onClick={this.quickHackW0r1dD43m0n}>Quick w0rld_d34m0n</button>
|
||||
<button className="std-button" onClick={this.hackW0r1dD43m0n}>Hack w0rld_d34m0n</button>
|
||||
</div>
|
||||
<div className="row">
|
||||
@ -1066,6 +1071,7 @@ class DevMenuComponent extends Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{Player.bladeburner instanceof Bladeburner &&
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -1101,7 +1107,9 @@ class DevMenuComponent extends Component {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
{Player.inGang() &&
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -1125,7 +1133,9 @@ class DevMenuComponent extends Component {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
{Player.hasCorporation() &&
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -1152,6 +1162,7 @@ class DevMenuComponent extends Component {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div className="row">
|
||||
@ -1181,7 +1192,7 @@ class DevMenuComponent extends Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{Player.hasWseAccount &&
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -1208,8 +1219,9 @@ class DevMenuComponent extends Component {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{Player.sleeves.length > 0 &&
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
<div className="row">
|
||||
@ -1231,6 +1243,7 @@ class DevMenuComponent extends Component {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="row">
|
||||
<div className="col">
|
||||
|
@ -176,7 +176,7 @@ function prestigeAugmentation() {
|
||||
|
||||
|
||||
// Prestige by destroying Bit Node and gaining a Source File
|
||||
function prestigeSourceFile() {
|
||||
function prestigeSourceFile(flume) {
|
||||
initBitNodeMultipliers(Player);
|
||||
updateSourceFileFlags(Player);
|
||||
|
||||
@ -350,7 +350,8 @@ function prestigeSourceFile() {
|
||||
document.getElementById("world-menu-header").click();
|
||||
|
||||
// Gain int exp
|
||||
Player.gainIntelligenceExp(300);
|
||||
if(SourceFileFlags[5] !== 0 && !flume)
|
||||
Player.gainIntelligenceExp(300);
|
||||
|
||||
resetPidCounter();
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ function giveSourceFile(bitNodeNumber) {
|
||||
} else {
|
||||
var playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);
|
||||
Player.sourceFiles.push(playerSrcFile);
|
||||
if (bitNodeNumber === 5) { // Artificial Intelligence
|
||||
if (bitNodeNumber === 5 && Player.intelligence === 0) { // Artificial Intelligence
|
||||
Player.intelligence = 1;
|
||||
}
|
||||
dialogBoxCreate("You received a Source-File for destroying a Bit Node!<br><br>" +
|
||||
@ -305,31 +305,17 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal
|
||||
yesBtn.addEventListener("click", function() {
|
||||
if (!flume) {
|
||||
giveSourceFile(destroyedBitNode);
|
||||
if (newBitNode === 5) {
|
||||
if(Player.intelligence === 0) {
|
||||
Player.intelligence = 1;
|
||||
Player.updateSkillLevels();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// If player used flume, subtract 300 int exp. The prestigeSourceFile()
|
||||
// function below grants 300 int exp, so this allows sets net gain to 0
|
||||
Player.gainIntelligenceExp(-300);
|
||||
if(SourceFileFlags[5] === 0 || newBitNode !== 5) {
|
||||
if(SourceFileFlags[5] === 0 && newBitNode !== 5) {
|
||||
Player.intelligence = 0;
|
||||
Player.intelligence_exp = 0;
|
||||
Player.updateSkillLevels();
|
||||
}
|
||||
if (newBitNode === 5) {
|
||||
if(Player.intelligence === 0) {
|
||||
Player.intelligence = 1;
|
||||
Player.updateSkillLevels();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newBitNode === 5 && Player.intelligence === 0) {
|
||||
Player.intelligence = 1;
|
||||
}
|
||||
redPillFlag = false;
|
||||
var container = document.getElementById("red-pill-content");
|
||||
const container = document.getElementById("red-pill-content");
|
||||
removeChildrenFromElement(container);
|
||||
|
||||
// Set new Bit Node
|
||||
@ -341,7 +327,7 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal
|
||||
document.getElementById("terminal-input-td").innerHTML = '$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>';
|
||||
$('input[class=terminal-input]').prop('disabled', false);
|
||||
|
||||
prestigeSourceFile();
|
||||
prestigeSourceFile(flume);
|
||||
yesNoBoxClose();
|
||||
});
|
||||
const noBtn = yesNoBoxGetNoButton();
|
||||
|
Loading…
Reference in New Issue
Block a user