Interface Grafting

Grafting API

Remarks

This API requires Source-File 10 to use.

interface Grafting {
    getAugmentationGraftPrice(augName): number;
    getAugmentationGraftTime(augName): number;
    getGraftableAugmentations(): string[];
    graftAugmentation(augName, focus?): boolean;
}

Methods

  • Retrieve the grafting cost of an aug.

    Parameters

    • augName: string

      Name of the aug to check the price of. Must be an exact match.

    Returns number

    The cost required to graft the named augmentation.

    Remarks

    RAM cost: 3.75 GB

    Throws

    Will error if an invalid Augmentation name is provided.

  • Retrieves the time required to graft an aug.

    Parameters

    • augName: string

      Name of the aug to check the grafting time of. Must be an exact match.

    Returns number

    The time required, in millis, to graft the named augmentation.

    Remarks

    RAM cost: 3.75 GB

    Throws

    Will error if an invalid Augmentation name is provided.

  • Retrieves a list of Augmentations that can be grafted.

    Returns string[]

    An array of graftable Augmentations.

    Remarks

    RAM cost: 5 GB

    Note that this function returns a list of currently graftable Augmentations, based off of the Augmentations that you already own.

  • Begins grafting the named aug. You must be in New Tokyo to use this.

    Parameters

    • augName: string

      The name of the aug to begin grafting. Must be an exact match.

    • Optional focus: boolean

      Acquire player focus on this Augmentation grafting. Optional. Defaults to true.

    Returns boolean

    True if the aug successfully began grafting, false otherwise (e.g. not enough money, or invalid Augmentation name provided).

    Remarks

    RAM cost: 7.5 GB

    Throws

    Will error if called while you are not in New Tokyo.