fix(HealthColors): HealthColors v2.1.4: external HP sync fixes, legacy API compatibility, and bootstrap cleanup#2256
Open
steverobertsuk wants to merge 7 commits into
Open
Conversation
…healthcolors-v2-1-4
…plied prettier formatting Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…or external scripts Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…P change detection Restore legacy API aliases (e.g., `GMW`, `Update`) for broader compatibility with older scripts. Enhance previous token state handling to tolerate both Roll20 objects and JSON snapshots. Refine HP change detection to allow visual updates (auras, tints, dead status) even when previous HP values are invalid, while correctly gating particle effects and death sounds to only fire on reliable HP deltas. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HealthColors v2.1.4
This PR finalizes HealthColors v2.1.4 with a focus on reliability when HP is changed by other scripts, backwards compatibility for integrations, and cleanup of public exports.
What is fixed
change:attributeflow to capture real old/new HP values and correctly re-run token visuals.change:attributeandchange:graphicfire for the same HP change.add:graphicevent handling and added a safe null guard for delayed token lookup.Compatibility improvements
HealthColors now exposes both:
gmWhisperandGMWupdateandUpdatecheckInstallandCheckInstallregisterEventHandlersandRegisterEventHandlersHardened external previous-value reads to support both object snapshots and
get(...)style access.If the previous HP is missing or invalid, HealthColors still updates:
Only delta-based FX and death transition comparisons are skipped.
Impact