rednode API - v0.80.1
    Preparing search index...

    Variable quickhacksConst

    quickhacks: {
        counts(): Promise<string>;
        define(
            items: string | string[],
            fns: QuickhackFunctions,
        ): Promise<() => Promise<void>>;
        defined(): QuickhackDefine[];
    } = ...

    Functions on quickhacks: a scan check and an on-land function per quickhack.

    Type Declaration

    • counts: function
      • The script's counters (defines, list rebuilds, asks, answers given up on, landings), for tests.

        Returns Promise<string>

    • define: function
      • Gives one quickhack, or a family of them, a scan check, an on-land function, or both. items is one quickhack item record, or a family's items lowest tier first (then hack.tier is the tier). REDnode finds the items' hacks, Boss and Chimera versions and spread included. A hack already defined, by another package or by another define of this one, is refused. Resolves to a function that takes the define away.

        Called before a save is loaded (at the game's start or the main menu), it resolves at once and the functions start with the next load; a mistake, such as an item with no quickhacks, then goes to the mod log instead of throwing.

        Parameters

        Returns Promise<() => Promise<void>>

    • defined: function
    import { quickhacks } from "rednode";

    // Overheat is usable only on people, and lands harder on the wounded.
    await quickhacks.define("Items.OverheatLvl4Program", {
    canUse: (target) => target.isHuman,
    disabledText: "People only",
    async onLand(target, hack) {
    if (target.healthPercent < 50) await target.damage(40 * hack.tier);
    },
    });