Merge pull request #3170 from nickofolas/feature/grafting

[Feature] Grafting
This commit is contained in:
hydroflame
2022-03-29 13:25:41 -04:00
committed by GitHub
37 changed files with 794 additions and 642 deletions

View File

@@ -95,6 +95,7 @@ interface Player {
tor: boolean;
hasCorporation: boolean;
inBladeburner: boolean;
entropyStacks: number;
}
/**
@@ -3719,6 +3720,43 @@ export interface Sleeve {
purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;
}
export interface Grafting {
/**
* Retrieve the crafting cost of an aug.
* @remarks
* RAM cost: 3.75 GB
*
* @param augName - Name of the aug to check the price of. Must be an exact match.
* @returns The cost required to craft the named augmentation.
* @throws Will error if an invalid Augmentation name is provided.
*/
getAugmentationCraftPrice(augName: string): number;
/**
* Retrieves the time required to craft an aug.
* @remarks
* RAM cost: 3.75 GB
*
* @param augName - Name of the aug to check the crafting time of. Must be an exact match.
* @returns The time required, in millis, to craft the named augmentation.
* @throws Will error if an invalid Augmentation name is provided.
*/
getAugmentationCraftTime(augName: string): number;
/**
* Begins crafting the named aug. You must be in New Tokyo to use this.
* @remarks
* RAM cost: 7.5 GB
*
* @param augName - The name of the aug to begin crafting. Must be an exact match.
* @param focus - Acquire player focus on this Augmentation crafting. Optional. Defaults to true.
* @returns True if the aug successfully began crafting, false otherwise (e.g. not enough money, or
* invalid Augmentation name provided).
* @throws Will error if called while you are not in New Tokyo.
*/
craftAugmentation(augName: string, focus?: boolean): boolean;
}
/**
* Skills formulas
* @public
@@ -4280,6 +4318,13 @@ export interface NS extends Singularity {
*/
readonly ui: UserInterface;
/**
* Namespace for grafting functions.
* @remarks
* RAM cost: 0 GB
*/
readonly grafting: Grafting;
/**
* Arguments passed into the script.
*