BUGFIX: Sleeves can earn exp and purchase augmentations when enabling disableSleeveExpAndAugmentation (#2467)

This commit is contained in:
catloversg
2026-02-05 19:47:24 +07:00
committed by GitHub
parent 77cc582bf9
commit 796bef81b3
8 changed files with 125 additions and 20 deletions
+5 -5
View File
@@ -245,16 +245,16 @@ export function NetscriptSleeve(): InternalAPI<NetscriptSleeve> {
checkSleeveAPIAccess(ctx);
checkSleeveNumber(ctx, sleeveNumber);
if (Player.sleeves[sleeveNumber].shock > 0) {
throw helpers.errorMessage(ctx, `Sleeve shock too high: Sleeve ${sleeveNumber}`);
}
const aug = Augmentations[augName];
if (!aug) {
throw helpers.errorMessage(ctx, `Invalid aug: ${augName}`);
}
return Player.sleeves[sleeveNumber].tryBuyAugmentation(aug);
const result = Player.sleeves[sleeveNumber].purchaseAugmentation(aug);
if (!result.success) {
helpers.log(ctx, () => result.message);
}
return result.success;
},
getSleeveAugmentationPrice: (ctx) => (_augName) => {
checkSleeveAPIAccess(ctx);