mrcomac / token-action-hud-swade

FoundryVTT Token Action HUD for Savage Worlds
MIT License
5 stars 4 forks source link

[Bug] Effects not showing #17

Closed steveculshaw closed 1 year ago

steveculshaw commented 1 year ago

Describe the bug The Effects section isn't showing the effects on a character.

image

And the character ...

image

Versions: OS: [Windows 11] Token Action HUD: [1.4.11] Token Action HUD SWADE: [0.7.2] Swade System: [3.0.4] Foundry VTT: [11.302] Browser: [Google Chrome 114.0.5735.134] Other modules: BR2

Additional context Any additional context.

mrcomac commented 1 year ago

Yep, isn't available yet.. for some reason when we enable or disable effects, the HUD doesn't get updated. It means, the button doesn't change colors like the effects we have in the general section.

steveculshaw commented 1 year ago

Ah ha ... ta

Larkinabout commented 1 year ago

Yep, isn't available yet.. for some reason when we enable or disable effects, the HUD doesn't get updated. It means, the button doesn't change colors like the effects we have in the general section.

You might need to trigger a HUD update in your roll handler using game.tokenActionHud.update().

mrcomac commented 1 year ago

@Larkinabout i was using Hooks.callAll("forceUpdateTokenActionHUD")but when it calls the update, apparently the variable isUpdating was true.

I've changed to game.tokenActionHud.update() and it worked. Maybe I added a wait somewhere that solve the issue. thank you. I'll add this to the next version.

Larkinabout commented 1 year ago

That's true, I actually use the hook call in the system modules I maintain, so it should still work. I'll have a look and see if I can figure out why they're acting differently.