Skip to main content

ExtendedItemCustomClickAndPush

Callable

  • ExtendedItemCustomClickAndPush(C: Character, item: Item, name: string, callback: () => void, worn?: boolean, changeWhenLocked?: boolean): boolean

  • Helper click function for creating custom buttons, including extended item permission support, and pushing the changes to the server.


    Parameters

    • C: Character

      The character

    • item: Item

      The item

    • name: string

      The name of the button and its pseudo-type

    • callback: () => void

      A callback to be executed whenever the button is clicked and all requirements are met

      • worn: boolean = false

        true if the player is changing permissions for an item they're wearing

      • changeWhenLocked: boolean = true

        Whether the button r

      Returns boolean

      false if the item's requirement check failed and true otherwise