mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
Fixed bug with purchasing NeuroFlux using purchaseAugmentation() Singularity fn
This commit is contained in:
parent
787e2027f5
commit
19b861c4f7
25
dist/bundle.js
vendored
25
dist/bundle.js
vendored
@ -36506,16 +36506,23 @@ function NetscriptFunctions(workerScript) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].queuedAugmentations.length; ++j) {
|
var isNeuroflux = false;
|
||||||
if (__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].queuedAugmentations[j].name === aug.name) {
|
if (aug.name === __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["b" /* AugmentationNames */].NeuroFluxGovernor) {
|
||||||
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
isNeuroflux = true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].augmentations.length; ++j) {
|
|
||||||
if (__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].augmentations[j].name === aug.name) {
|
if (!isNeuroflux) {
|
||||||
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].queuedAugmentations.length; ++j) {
|
||||||
return false;
|
if (__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].queuedAugmentations[j].name === aug.name) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].augmentations.length; ++j) {
|
||||||
|
if (__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].augmentations[j].name === aug.name) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Augmentations, Augmentation,
|
import {Augmentations, Augmentation,
|
||||||
augmentationExists, installAugmentations} from "./Augmentations.js";
|
augmentationExists, installAugmentations,
|
||||||
|
AugmentationNames} from "./Augmentations.js";
|
||||||
import {Companies, Company, CompanyPosition,
|
import {Companies, Company, CompanyPosition,
|
||||||
CompanyPositions, companyExists} from "./Company.js";
|
CompanyPositions, companyExists} from "./Company.js";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants.js";
|
||||||
@ -1753,16 +1754,23 @@ function NetscriptFunctions(workerScript) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var j = 0; j < Player.queuedAugmentations.length; ++j) {
|
var isNeuroflux = false;
|
||||||
if (Player.queuedAugmentations[j].name === aug.name) {
|
if (aug.name === AugmentationNames.NeuroFluxGovernor) {
|
||||||
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
isNeuroflux = true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (var j = 0; j < Player.augmentations.length; ++j) {
|
|
||||||
if (Player.augmentations[j].name === aug.name) {
|
if (!isNeuroflux) {
|
||||||
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
for (var j = 0; j < Player.queuedAugmentations.length; ++j) {
|
||||||
return false;
|
if (Player.queuedAugmentations[j].name === aug.name) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var j = 0; j < Player.augmentations.length; ++j) {
|
||||||
|
if (Player.augmentations[j].name === aug.name) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user