mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
add sleeve aug price and rep function
This commit is contained in:
@@ -4,6 +4,7 @@ import { findSleevePurchasableAugs } from "../PersonObjects/Sleeve/SleeveHelpers
|
||||
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
||||
import { CityName } from "../Locations/data/CityNames";
|
||||
import { findCrime } from "../Crime/CrimeHelpers";
|
||||
import { Augmentation } from "../Augmentation/Augmentation";
|
||||
|
||||
import {
|
||||
AugmentPair,
|
||||
@@ -311,6 +312,22 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI<ISleeve> {
|
||||
|
||||
return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);
|
||||
},
|
||||
getSleeveAugmentationPrice:
|
||||
(ctx: NetscriptContext) =>
|
||||
(_augName: unknown): number => {
|
||||
checkSleeveAPIAccess(ctx);
|
||||
const augName = ctx.helper.string("augName", _augName);
|
||||
const aug: Augmentation = StaticAugmentations[augName];
|
||||
return aug.baseCost;
|
||||
},
|
||||
getSleeveAugmentationRepReq:
|
||||
(ctx: NetscriptContext) =>
|
||||
(_augName: unknown, _basePrice = false): number => {
|
||||
checkSleeveAPIAccess(ctx);
|
||||
const augName = ctx.helper.string("augName", _augName);
|
||||
const aug: Augmentation = StaticAugmentations[augName];
|
||||
return aug.getCost(player).repCost;
|
||||
},
|
||||
setToBladeburnerAction:
|
||||
(ctx: NetscriptContext) =>
|
||||
(_sleeveNumber: unknown, _action: unknown, _contract?: unknown): boolean => {
|
||||
|
||||
Reference in New Issue
Block a user