Interface Stanek

Stanek's Gift API.

interface Stanek {
    acceptGift(): boolean;
    activeFragments(): ActiveFragment[];
    canPlaceFragment(rootX, rootY, rotation, fragmentId): boolean;
    chargeFragment(rootX, rootY): Promise<void>;
    clearGift(): void;
    fragmentDefinitions(): Fragment[];
    getFragment(rootX, rootY): undefined | ActiveFragment;
    giftHeight(): number;
    giftWidth(): number;
    placeFragment(rootX, rootY, rotation, fragmentId): boolean;
    removeFragment(rootX, rootY): boolean;
}

Methods

  • Accept Stanek's Gift by joining the Church of the Machine God

    Returns boolean

    true if the player is a member of the church and has the gift installed, false otherwise.

    Remarks

    RAM cost: 2 GB

  • Check if fragment can be placed at specified location.

    Parameters

    • rootX: number

      Root X against which to align the top left of the fragment.

    • rootY: number

      Root Y against which to align the top left of the fragment.

    • rotation: number

      A number from 0 to 3, the amount of 90-degree turns to take.

    • fragmentId: number

      ID of the fragment to place.

    Returns boolean

    true if the fragment can be placed at that position. false otherwise.

    Remarks

    RAM cost: 0.5 GB

  • Charge a fragment, increasing its power.

    Parameters

    • rootX: number

      Root X against which to align the top left of the fragment.

    • rootY: number

      Root Y against which to align the top left of the fragment.

    Returns Promise<void>

    Promise that lasts until the charge action is over.

    Remarks

    RAM cost: 0.4 GB

  • Get placed fragment at location.

    Parameters

    • rootX: number

      X against which to align the top left of the fragment.

    • rootY: number

      Y against which to align the top left of the fragment.

    Returns undefined | ActiveFragment

    The fragment at [rootX, rootY], if any.

    Remarks

    RAM cost: 5 GB

  • Place fragment on Stanek's Gift.

    Parameters

    • rootX: number

      X against which to align the top left of the fragment.

    • rootY: number

      Y against which to align the top left of the fragment.

    • rotation: number

      A number from 0 to 3, the mount of 90 degree turn to take.

    • fragmentId: number

      ID of the fragment to place.

    Returns boolean

    true if the fragment can be placed at that position. false otherwise.

    Remarks

    RAM cost: 5 GB

  • Remove fragment at location.

    Parameters

    • rootX: number

      X against which to align the top left of the fragment.

    • rootY: number

      Y against which to align the top left of the fragment.

    Returns boolean

    The fragment at [rootX, rootY], if any.

    Remarks

    RAM cost: 0.15 GB