Larkinabout / fvtt-token-action-hud-pf2e

Token Action HUD is a repositionable HUD of actions for a selected token.
10 stars 15 forks source link

Rolling initiative from the Attributes menu does not honor the roll dialog option as of PF2e 5.12.3 #109

Closed Silvertower closed 7 months ago

Silvertower commented 7 months ago

token-action-hud uses 'showRollDialogs' when calling #setRollOptions() but needs to use 'showCheckDialogs' due to a breaking change.

From roll-handler.js:

    #setRollOptions () {
        const skipDefault = !game.user.settings.showRollDialogs
        this.rollMode = (this.ctrl) ? (game.user.isGM) ? 'gmroll' : 'blindroll' : null
        this.skipDialog = (this.shift) ? !skipDefault : skipDefault
    }

To fix, change it to:

    #setRollOptions () {
        const skipDefault = !game.user.settings.showCheckDialogs
        this.rollMode = (this.ctrl) ? (game.user.isGM) ? 'gmroll' : 'blindroll' : null
        this.skipDialog = (this.shift) ? !skipDefault : skipDefault
    }

As a temporary workaround, this can be fixed in token-action-hud-pf2e.min.js by replacing the following (entire) string:

showRollDialogs

With:

showCheckDialogs

Larkinabout commented 7 months ago

Hi @Silvertower, do you want to submit a pull request and I'll merge it in?

Also, if you're interested, I'm looking for someone to take over the development of Token Action HUD Pathfinder 2 as I don't play Pathfinder 2 enough to support the regular updates. Let me know if you'd be interested.

Silvertower commented 7 months ago

Hello,

My knowledge of JavaScript is next to none, as my only experience is with backend development. I'd be of little help, but I can submit some pull requests for now.

Thanks,

Silvertower

On Wed, Jan 10, 2024 at 3:28 PM Larkinabout @.***> wrote:

Hi @Silvertower https://github.com/Silvertower, do you want to submit a pull request and I'll merge it in?

Also, if you're interested, I'm looking for someone to take over the development of Token Action HUD Pathfinder 2 as I don't play Pathfinder 2 enough to support the regular updates. Let me know if you'd be interested.

— Reply to this email directly, view it on GitHub https://github.com/Larkinabout/fvtt-token-action-hud-pf2e/issues/109#issuecomment-1885920083, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA2HEBHL2YXGIUCACQNCYLYN4P2ZAVCNFSM6AAAAABBVPC3NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBVHEZDAMBYGM . You are receiving this because you were mentioned.Message ID: @.***>