Paste #105453: gui cancel actions

Date: 2023/01/17 01:54:34 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


uncancel_inventory_world:
    type: world
    debug: true
    events:

        on player clicks in Upgrader_GUI:
        - if <context.clicked_inventory> == <context.inventory> and <context.slot> != 21:
            - announce "click cancelled"
            - determine cancelled
        - else:
            - if <context.clicked_inventory> == <context.inventory> and <context.slot> == 21:
                - announce "clicked slot 21"
        - if <context.clicked_inventory> == <context.inventory> and <context.is_shift_click>:
            - narrate "shift click slot 21"
        - else:
            - if <context.is_shift_click>:
                - narrate " shift cancelled"
                - determine cancelled

        on player drags in Upgrader_GUI:
        - if <context.clicked_inventory> == <context.inventory> and <context.slot> != 21:
            - announce "drag cancelled"
            - determine cancelled