mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
Save Aliases object. Fixed bug when buying Neuroflux Governor
This commit is contained in:
parent
a3c104ca4e
commit
9b83035187
@ -1753,6 +1753,11 @@ applyAugmentation = function(aug, faction) {
|
|||||||
|
|
||||||
aug.owned = true;
|
aug.owned = true;
|
||||||
aug.factionInstalledBy = faction.name;
|
aug.factionInstalledBy = faction.name;
|
||||||
|
if (aug.name == AugmentationNames.NeuroFluxGovernor &&
|
||||||
|
Player.augmentations.indexOf(AugmentationNames.NeuroFluxGovernor) != -1) {
|
||||||
|
//Already have this aug, just upgrade the level
|
||||||
|
return;
|
||||||
|
}
|
||||||
Player.augmentations.push(aug.name);
|
Player.augmentations.push(aug.name);
|
||||||
++Player.numAugmentations;
|
++Player.numAugmentations;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,17 @@ loadGame = function(saveObj) {
|
|||||||
Factions = JSON.parse(saveObj.FactionsSave, Reviver);
|
Factions = JSON.parse(saveObj.FactionsSave, Reviver);
|
||||||
SpecialServerIps = JSON.parse(saveObj.SpecialServerIpsSave, Reviver);
|
SpecialServerIps = JSON.parse(saveObj.SpecialServerIpsSave, Reviver);
|
||||||
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
|
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
|
||||||
|
if (saveObj.hasOwnProperty(AliasesSave)) {
|
||||||
|
try {
|
||||||
Aliases = JSON.parse(saveObj.AliasesSave, Reviver);
|
Aliases = JSON.parse(saveObj.AliasesSave, Reviver);
|
||||||
|
} catch(e) {
|
||||||
|
Aliases = {};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Aliases = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -732,6 +732,13 @@ var Terminal = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "scan-analyze":
|
||||||
|
if (commandArray.length != 1) {
|
||||||
|
post("Incorrect number of arguments. Usage: scan-analyze");
|
||||||
|
} else {
|
||||||
|
Terminal.executeScanAnalyzeCommand();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "scp":
|
case "scp":
|
||||||
//TODO
|
//TODO
|
||||||
break;
|
break;
|
||||||
|
@ -154,7 +154,6 @@ purchaseAugmentationBoxCreate = function(aug, fac) {
|
|||||||
}
|
}
|
||||||
} 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
|
|
||||||
dialogBoxCreate("You slowly drift to sleep as " + fac.name + "'s scientists put you under " +
|
dialogBoxCreate("You slowly drift to sleep as " + fac.name + "'s scientists put you under " +
|
||||||
" in order to install the " + aug.name + " Augmentation. <br><br>" +
|
" in order to install the " + aug.name + " Augmentation. <br><br>" +
|
||||||
"You wake up in your home...you feel different...");
|
"You wake up in your home...you feel different...");
|
||||||
|
Loading…
Reference in New Issue
Block a user