Fixed bugs with new multiple Augmentations feature. Added getServerMaxMoney() netscript command

This commit is contained in:
Daniel Xie
2017-06-25 18:39:17 -05:00
parent aba6936295
commit 6712d340fb
15 changed files with 240 additions and 48 deletions
+37 -1
View File
@@ -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;