From 9f7d6d7bba58f3d926a58bbeb801586602ed6258 Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Fri, 5 May 2017 13:13:31 -0500 Subject: [PATCH] Bug fixes --- src/Augmentations.js | 2 +- src/CreateProgram.js | 4 +--- src/engine.js | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Augmentations.js b/src/Augmentations.js index ea80cf5c5..e1069b315 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -757,7 +757,7 @@ applyAugmentation = function(aug, faction) { Player.defense_exp_mult *= 1.05; Player.dexterity_exp_mult *= 1.05; Player.agility_exp_mult *= 1.05; - this.charisma_exp_mult *= 1.05; + Player.charisma_exp_mult *= 1.05; break; case "Neurotrainer II": //Medium level Player.hacking_exp_mult *= 1.1; diff --git a/src/CreateProgram.js b/src/CreateProgram.js index 926e67774..1168b0261 100644 --- a/src/CreateProgram.js +++ b/src/CreateProgram.js @@ -24,9 +24,7 @@ function displayCreateProgramContent() { relaySmtpALink.style.display = "none"; httpWormALink.style.display = "none"; sqlInjectALink.style.display = "none"; - - //TODO These addEventListeners should only happen once so I guess just put them in Engine.init() - + //PortHack.exe (in case you delete it lol) if (Player.getHomeComputer().programs.indexOf(Programs.NukeProgram) == -1) { portHackALink.style.display = "block"; diff --git a/src/engine.js b/src/engine.js index dcfd366d6..1b7bb393d 100644 --- a/src/engine.js +++ b/src/engine.js @@ -438,6 +438,10 @@ var Engine = { displayAugmentationsContent: function() { var augmentationsList = document.getElementById("augmentations-list"); + while (augmentationsList.firstChild) { + augmentationsList.removeChild(augmentationsList.firstChild); + } + for (var i = 0; i < Player.augmentations.length; ++i) { var augName = Player.augmentations[i]; var aug = Augmentations[augName];