mrcomac / token-action-hud-swade

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

Value Being Updated Directly on Wounds/Fatigue/Power Points #19

Closed Larkinabout closed 1 year ago

Larkinabout commented 1 year ago

Is your feature request related to a problem? Please describe. I have another module that logs actor changes to chat and I've noticed that some changes are not logged if made from the HUD. This is because actor.system[event].value += 1 in the Roll Handler is updating the value in the actor object directly before the update method is called.

Describe the solution you'd like Switch to actor.system[event].value + 1 and actor.system[event].value - 1 so the values are not updated before the preUpdateActor hook.

Describe alternatives you've considered No other alternatives.

Additional context None.

mrcomac commented 1 year ago

Good catch.. it shouldn't include that =