Skip to content

Use Bar Brawl API for compatibility.

Addi requested to merge DJ.Addi/combat-enhancements:master into master

This PR implements Bar Brawl API methods if the module is enabled to provide compatibility for the radial resource bar in the combat tracker. The changes will take effect with Bar Brawl 1.6.0 as earlier versions do not have the API.

  • The bar now respects per-resource visibility settings. This is applied after the Combat Enhancement restrictions, meaning that a resource that was hidden by the CE configuration will not be displayed regardless of Bar Brawl settings.
  • The displayed value is now adjusted for Bar Brawl's approximation settings to prevent accidentally exposing an exact value to players.

The PR also includes a fix for the updateToken hook, which looks like it wasn't properly adjusted for FoundryVTT 9.

I have limited this to the features that were already requested, see #25 (closed) and #26 (closed). Let me know if any additional API methods are needed for improved compatibility. For parameter documentation, check the Bar Brawl API docs.

Edited by Addi

Merge request reports