yolkbot
    Preparing search index...

    Class GameOptionsDispatch

    (game owner only) Changes the game options from that lil panel ingame

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Creates a GameOptionsDispatch

      Parameters

      • changes: GameOptionChanges

        An object containing the options to change. Only the options included in the object will be changed; all others will remain the same. For weapon disabling, you can either specify the individual weapons to disable using the disable[WeaponName] properties, or you can specify arrays of weapon indices to disable/enable using the toDisable and toEnable properties, or you can specify the entire weaponsDisabled array directly using the rawWeaponsDisabled property (note that the rawWeaponsDisabled array must be in the format of the game options, meaning it should contain 7 boolean or number values corresponding to each weapon). The individual disable[WeaponName] properties will override the array properties if both are provided.

      Returns GameOptionsDispatch

    Methods

    • Checks if the dispatch can run at that specific second. This should eventually result true under some conditions so that the dispatch isn't postponed forever. This function runs with the game update loop every 33ms. If it returns true, execute runs immediately.

      Parameters

      Returns boolean

    • Executes the main dispatch logic. This happens once and does not output any success/failure, as any checks must run inside of check.

      Parameters

      Returns void

    • Validates initial data, usually from the constructor or are game-related. For example, if the user passes a number in the constructor that's too big or the user needs game ownership (but isn't), this would return false.

      Parameters

      Returns boolean