Adds getAugmentationPrice() and getAugmentationReqRep() Netscript Singularity functions. Deprecates getAugmentationCost() Netscript singularity function.

This commit is contained in:
vmesecher
2021-09-07 20:33:34 -07:00
parent 1c9542d102
commit 6979082be7
10 changed files with 91 additions and 16 deletions
+24 -6
View File
@@ -4598,6 +4598,15 @@ function NetscriptFunctions(workerScript) {
return faction.augmentations.slice();
},
getAugmentationCost: function (name) {
updateDynamicRam(
"getAugmentationCost",
getRamCost("getAugmentationCost"),
);
checkSingularityAccess("getAugmentationCost", 3);
const aug = getAugmentation("getAugmentationCost", name);
return [aug.baseRepRequirement, aug.baseCost];
},
getAugmentationPrereq: function (name) {
updateDynamicRam(
"getAugmentationPrereq",
@@ -4607,14 +4616,23 @@ function NetscriptFunctions(workerScript) {
const aug = getAugmentation("getAugmentationPrereq", name);
return aug.prereqs.slice();
},
getAugmentationCost: function (name) {
getAugmentationPrice: function (name) {
updateDynamicRam(
"getAugmentationCost",
getRamCost("getAugmentationCost"),
"getAugmentationPrice",
getRamCost("getAugmentationPrice"),
);
checkSingularityAccess("getAugmentationCost", 3);
const aug = getAugmentation("getAugmentationCost", name);
return [aug.baseRepRequirement, aug.baseCost];
checkSingularityAccess("getAugmentationPrice", 3);
const aug = getAugmentation("getAugmentationPrice", name);
return aug.baseCost;
},
getAugmentationRepReq: function (name) {
updateDynamicRam(
"getAugmentationRepReq",
getRamCost("getAugmentationRepReq"),
);
checkSingularityAccess("getAugmentationRepReq", 3);
const aug = getAugmentation("getAugmentationRepReq", name);
return aug.baseRepRequirement;
},
getAugmentationStats: function (name) {
updateDynamicRam(