mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 06:37:49 +02:00
Fixed bugs with new multiple Augmentations feature. Added getServerMaxMoney() netscript command
This commit is contained in:
+37
-1
@@ -369,6 +369,42 @@ var Engine = {
|
||||
},
|
||||
|
||||
displayAugmentationsContent: function() {
|
||||
//Purchased/queued augmentations
|
||||
var queuedAugmentationsList = document.getElementById("queued-augmentations-list");
|
||||
|
||||
while (queuedAugmentationsList.firstChild) {
|
||||
queuedAugmentationsList.removeChild(queuedAugmentationsList.firstChild);
|
||||
}
|
||||
|
||||
for (var i = 0; i < Player.queuedAugmentations.length; ++i) {
|
||||
var augName = Player.queuedAugmentations[i].name;
|
||||
var aug = Augmentations[augName];
|
||||
|
||||
var item = document.createElement("li");
|
||||
var hElem = document.createElement("h2");
|
||||
var pElem = document.createElement("p");
|
||||
|
||||
item.setAttribute("class", "installed-augmentation");
|
||||
hElem.innerHTML = augName;
|
||||
if (augName == AugmentationNames.NeuroFluxGovernor) {
|
||||
hElem.innerHTML += " - Level " + (Player.queuedAugmentations[i].level);
|
||||
}
|
||||
pElem.innerHTML = aug.info;
|
||||
|
||||
item.appendChild(hElem);
|
||||
item.appendChild(pElem);
|
||||
|
||||
queuedAugmentationsList.appendChild(item);
|
||||
}
|
||||
|
||||
//Install Augmentations button
|
||||
var installButton = clearEventListeners("install-augmentations-button");
|
||||
installButton.addEventListener("click", function() {
|
||||
installAugmentations();
|
||||
return false;
|
||||
});
|
||||
|
||||
//Installed augmentations
|
||||
var augmentationsList = document.getElementById("augmentations-list");
|
||||
|
||||
while (augmentationsList.firstChild) {
|
||||
@@ -386,7 +422,7 @@ var Engine = {
|
||||
item.setAttribute("class", "installed-augmentation");
|
||||
hElem.innerHTML = augName;
|
||||
if (augName == AugmentationNames.NeuroFluxGovernor) {
|
||||
hElem.innerHTML += " - Level " + (aug.level);
|
||||
hElem.innerHTML += " - Level " + (Player.augmentations[i].level);
|
||||
}
|
||||
pElem.innerHTML = aug.info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user