diff --git a/src/Netscript/RamCostGenerator.ts b/src/Netscript/RamCostGenerator.ts index af50c8c5c..31524d5b4 100644 --- a/src/Netscript/RamCostGenerator.ts +++ b/src/Netscript/RamCostGenerator.ts @@ -386,6 +386,12 @@ export const RamCosts: IMap = { getGameInfo: 0, }, + grafting: { + getAugmentationCraftPrice: 3.75, + getAugmentationCraftTime: 3.75, + craftAugmentation: 7.5, + }, + heart: { // Easter egg function break: 0, diff --git a/src/Script/RamCalculations.ts b/src/Script/RamCalculations.ts index 0bb432581..94f25aaea 100644 --- a/src/Script/RamCalculations.ts +++ b/src/Script/RamCalculations.ts @@ -225,6 +225,9 @@ async function parseOnlyRamCalculate( } else if (ref in workerScript.env.vars.ui) { func = workerScript.env.vars.ui[ref]; refDetail = `ui.${ref}`; + } else if (ref in workerScript.env.vars.grafting) { + func = workerScript.env.vars.grafting[ref]; + refDetail = `grafting.${ref}`; } else { func = workerScript.env.vars[ref]; refDetail = `${ref}`; diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index f871c296e..7a0d53f6e 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -3724,7 +3724,7 @@ export interface Grafting { /** * Retrieve the crafting cost of an aug. * @remarks - * RAM cost: TODO + * 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. @@ -3734,7 +3734,7 @@ export interface Grafting { /** * Retrieves the time required to craft an aug. * @remarks - * RAM cost: TODO + * 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. @@ -3744,11 +3744,13 @@ export interface Grafting { /** * Begins crafting the named aug. You must be in New Tokyo to use this. * @remarks - * RAM cost: TODO + * 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. + * @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; }