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

Bludgeoning icon for versatile weapons is blank #73

Closed Silvertower closed 1 year ago

Silvertower commented 1 year ago

image

Silvertower commented 1 year ago

Tested with a fresh world with Token Action Hud PF2E 1.4.12 on Foundry v11 build 306 and PF2E 5.2.1 system using Google Chrome 115.0.5790.102 without any extensions installed. This affects any Versatile B weapon. The weapon used for the screenshot above was the Gaff.

Silvertower commented 1 year ago

Looks like line 1794 in action-handler.js is missing the 'hammer' option:

https://github.com/Larkinabout/fvtt-token-action-hud-pf2e/blob/68b1c111d155a4da4752bc0308bcbf5858614f52/scripts/action-handler.js#L1794

From pf2e values.ts:

https://github.com/foundryvtt/pf2e/blob/643feaf850d9b4143c0f0c2068daff6ecfa5e8e2/src/module/system/damage/values.ts#L82C8-L82C8

And line 34-36 in constants.js is missing the hammer info for the Font Awesome icon:

https://github.com/Larkinabout/fvtt-token-action-hud-pf2e/blob/68b1c111d155a4da4752bc0308bcbf5858614f52/scripts/constants.js#L34-L36

Silvertower commented 1 year ago

Can confirm that updating the scripts/token-action-hud-pf2e.min.js file as follows resolves the issue:

Replace:

s={1:"<span style='font-family: \"Pathfinder2eActions\"; font-size: var(--font-size-20);'>A</span>",2:"<span style='font-family: \"Pathfinder2eActions\"; font-size: var(--font-size-20);'>R</span>","bow-arrow":"fa-solid fa-bow-arrow fa-fw",axe:"fa-solid fa-axe fa-fw"}

With:

s={1:"<span style='font-family: \"Pathfinder2eActions\"; font-size: var(--font-size-20);'>A</span>",2:"<span style='font-family: \"Pathfinder2eActions\"; font-size: var(--font-size-20);'>R</span>","hammer:"fa-solid fa-hammer fa-fw",bow-arrow":"fa-solid fa-bow-arrow fa-fw",axe:"fa-solid fa-axe fa-fw"}

And replace:

#M(e,t=""){return["bow-arrow","axe"].includes(e)

With:

#M(e,t=""){return["hammer","bow-arrow","axe"].includes(e)

Larkinabout commented 1 year ago

On holiday for a few days, but will sort when I get back.

Larkinabout commented 1 year ago

Fixed in Token Action HUD Pathfinder 2 1.4.13.