Added requirements for new augs

This commit is contained in:
Daniel Xie 2017-05-19 00:20:27 -05:00
parent 1cd67ac3ac
commit a91f1c5fef
2 changed files with 42 additions and 26 deletions

@ -38,8 +38,6 @@ Private beta feedback
6) - Maybe show total $ somewhere onscreen at all (or most) times. $/sec would also be good to know, depending on if you want the player to know that. Bottom of the menu on the left is an empty enough place to keep these. 6) - Maybe show total $ somewhere onscreen at all (or most) times. $/sec would also be good to know, depending on if you want the player to know that. Bottom of the menu on the left is an empty enough place to keep these.
Double check New augmentations
Donate to faction for reputatino Donate to faction for reputatino
Quick overview screen Quick overview screen

@ -39,8 +39,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
newConfirmButton.addEventListener("click", function() { newConfirmButton.addEventListener("click", function() {
//TODO Requirements for specific augmentations (e.g Embedded Netburner Module b4 its upgrades) //TODO Requirements for specific augmentations (e.g Embedded Netburner Module b4 its upgrades)
if (aug.name == "Augmented Targeting II") { if (aug.name == AugmentationNames.Targeting2) {
var targeting1 = Augmentations["Augmented Targeting I"]; var targeting1 = Augmentations[AugmentationNames.Targeting1];
if (targeting1 == null) { if (targeting1 == null) {
console.log("ERROR: Could not find Augmented Targeting I"); console.log("ERROR: Could not find Augmented Targeting I");
return; return;
@ -48,8 +48,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (targeting1.owned == false) { if (targeting1.owned == false) {
dialogBoxCreate("You must first install Augmented Targeting I before you can upgrade it to Augmented Targeting II"); dialogBoxCreate("You must first install Augmented Targeting I before you can upgrade it to Augmented Targeting II");
} }
} else if (aug.name == "Augmented Targeting III") { } else if (aug.name == AugmentationNames.Targeting3) {
var targeting2 = Augmentations["Augmented Targeting II"]; var targeting2 = Augmentations[AugmentationNames.Targeting2];
if (targeting2 == null) { if (targeting2 == null) {
console.log("ERROR: Could not find Augmented Targeting II"); console.log("ERROR: Could not find Augmented Targeting II");
return; return;
@ -57,8 +57,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (targeting2.owned == false) { if (targeting2.owned == false) {
dialogBoxCreate("You must first install Augmented Targeting II before you can upgrade it to Augmented Targeting III"); dialogBoxCreate("You must first install Augmented Targeting II before you can upgrade it to Augmented Targeting III");
} }
} else if (aug.name == "Combat Rib II") { } else if (aug.name == AugmentationNames.CombatRib2) {
var combatRib1 = Augmentations["Combat Rib I"]; var combatRib1 = Augmentations[AugmentationNames.CombatRib1];
if (combatRib1 == null) { if (combatRib1 == null) {
console.log("ERROR: Could not find Combat Rib I"); console.log("ERROR: Could not find Combat Rib I");
return; return;
@ -66,8 +66,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (combatRib1.owned == false) { if (combatRib1.owned == false) {
dialogBoxCreate("You must first install Combat Rib I before you can upgrade it to Combat Rib II"); dialogBoxCreate("You must first install Combat Rib I before you can upgrade it to Combat Rib II");
} }
} else if (aug.name == "Combat Rib III") { } else if (aug.name == AugmentationNames.CombatRib3) {
var combatRib2 = Augmentations["Combat Rib II"]; var combatRib2 = Augmentations[AugmentationNames.CombatRib2];
if (combatRib2 == null) { if (combatRib2 == null) {
console.log("ERROR: Could not find Combat Rib II"); console.log("ERROR: Could not find Combat Rib II");
return; return;
@ -75,8 +75,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (combatRib2.owned == false) { if (combatRib2.owned == false) {
dialogBoxCreate("You must first install Combat Rib II before you can upgrade it to Combat Rib III"); dialogBoxCreate("You must first install Combat Rib II before you can upgrade it to Combat Rib III");
} }
} else if (aug.name == "Graphene Bionic Spine Upgrade") { } else if (aug.name == AugmentationNames.GrapheneBionicSpine) {
var bionicSpine = Augmentations["Bionic Spine"]; var bionicSpine = Augmentations[AugmentationNames.BionicSpine];
if (bionicSpine == null) { if (bionicSpine == null) {
console.log("ERROR: Could not find Bionic Spine"); console.log("ERROR: Could not find Bionic Spine");
return; return;
@ -84,8 +84,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (bionicSpine.owned == false) { if (bionicSpine.owned == false) {
dialogBoxCreate("You must first install a Bionic Spine before you can upgrade it to a Graphene Bionic Spine"); dialogBoxCreate("You must first install a Bionic Spine before you can upgrade it to a Graphene Bionic Spine");
} }
} else if (aug.name == "Graphene Bionic Legs Upgrade") { } else if (aug.name == AugmentationNames.GrapheneBionicLegs) {
var bionicLegs = Augmentations["Bionic Legs"]; var bionicLegs = Augmentations[AugmentationNames.BionicLegs];
if (bionicLegs == null) { if (bionicLegs == null) {
console.log("ERROR: Could not find Bionic Legs"); console.log("ERROR: Could not find Bionic Legs");
return; return;
@ -93,8 +93,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (bionicLegs.owned == false ) { if (bionicLegs.owned == false ) {
dialogBoxCreate("You must first install Bionic Legs before you can upgrade it to Graphene Bionic Legs"); dialogBoxCreate("You must first install Bionic Legs before you can upgrade it to Graphene Bionic Legs");
} }
} else if (aug.name == "Embedded Netburner Module Core V2 Upgrade") { } else if (aug.name == AugmentationNames.ENMCoreV2) {
var coreImplant = Augmentations["Embedded Netburner Module Core Implant"]; var coreImplant = Augmentations[AugmentationNames.ENMCore];
if (coreImplant == null) { if (coreImplant == null) {
console.log("ERROR: Could not find ENM Core Implant"); console.log("ERROR: Could not find ENM Core Implant");
return; return;
@ -102,8 +102,8 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (coreImplant.owned == false) { if (coreImplant.owned == false) {
dialogBoxCreate("You must first install Embedded Netburner Module Core Implant before you can upgrade it to V2"); dialogBoxCreate("You must first install Embedded Netburner Module Core Implant before you can upgrade it to V2");
} }
} else if (aug.name == "Embedded Netburner Module Core V3 Upgrade") { } else if (aug.name == AugmentationNames.ENMCoreV3) {
var v2Upgrade = Augmentations["Embedded Netburner Module Core V2 Upgrade"]; var v2Upgrade = Augmentations[AugmentationNames.ENMCoreV2];
if (v2Upgrade == null) { if (v2Upgrade == null) {
console.log("ERROR: Could not find ENM Core V2 upgrade"); console.log("ERROR: Could not find ENM Core V2 upgrade");
return; return;
@ -111,10 +111,10 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
if (v2Upgrade.owned == false) { if (v2Upgrade.owned == false) {
dialogBoxCreate("You must first install Embedded Netburner Module Core V2 Upgrade before you can upgrade it to V3"); dialogBoxCreate("You must first install Embedded Netburner Module Core V2 Upgrade before you can upgrade it to V3");
} }
} else if (aug.name == "Embedded Netburner Module Core Implant" || } else if (aug.name == AugmentationNames.ENMCore ||
aug.name == "Embedded Netburner Module Analyze Engine" || aug.name == AugmentationNames.ENMAnalyzeEngine ||
aug.name == "Embedded Netburner Module Direct Memory Access Upgrade") { aug.name == AugmentationNames.ENMDMA) {
var enm = Augmentations["Embedded Netburner Module"]; var enm = Augmentations[AugmentationNames.ENM];
if (enm == null) { if (enm == null) {
console.log("ERROR: Could not find ENM"); console.log("ERROR: Could not find ENM");
return; return;
@ -123,17 +123,35 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
dialogBoxCreate("You must first install the Embedded Netburner Module before installing any upgrades to it"); dialogBoxCreate("You must first install the Embedded Netburner Module before installing any upgrades to it");
} }
} else if (aug.name == "PC Direct-Neural Interface Optimization Submodule" || } else if (aug.name == AugmentationNames.PCDNIOptimizer ||
aug.name == "PC Direct-Neural Interface NeuroNet Injector") { aug.name == AugmentationNames.PCDNINeuralNetwork) {
var pcdni = Augmentations["PC Direct-Neural Interface"]; var pcdni = Augmentations[AugmentationNames.PCDNI];
if (pcdni == null) { if (pcdni == null) {
console.log("ERROR: Could not find PC Direct Neural Interface"); console.log("ERROR: Could not find PC Direct Neural Interface");
return; return;
} }
if (pcdni.owned == false) { if (pcdni.owned == false) {
dialogBoxCreate("You must first install the PD Direct-Neural Interface before installing this upgrade"); dialogBoxCreate("You must first install the Pc Direct-Neural Interface before installing this upgrade");
} }
} else if (aug.name == AugmentationNames.GrapheneBrachiBlades) {
var brachiblades = Augmentations[AugmentationNames.BrachiBlades];
if (brachiblades == null) {
console.log("ERROR: Could not find Brachi Blades aug");
return;
}
if (brachiblades.owned == false) {
dialogBoxCreate("You must first install the Brachi Blades augmentation before installing this upgrade");
}
} else if (aug.name == AugmentationNames.GrapheneBionicArms) {
var bionicarms = Augmentations[AugmentationNames.BionicArms];
if (bionicarms == null) {
console.log("ERORR: Could not find Bionic Arms aug");
return;
}
if (bionicarms.owned == false) {
dialogBoxCreate("You must first install the Bionic Arms augmentation before installing this upgrade");
}
} else if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) { } else if (Player.money >= (aug.baseCost * fac.augmentationPriceMult)) {
applyAugmentation(aug, fac); applyAugmentation(aug, fac);
//TODO Make this text better //TODO Make this text better