moo-man / WFRP4e-FoundryVTT

The premiere system for running grim and perilous games of Warhammer Fantasy Role-play in the Foundry VTT environment.
Apache License 2.0
87 stars 52 forks source link

V12 - toggle conditions #2152

Closed silentmark closed 1 week ago

silentmark commented 2 months ago

Describe the bug I know that it's still early to look for full v12 support, but since i'm already testing it, I will try to report some of the issues found.

TokenHUD.prototype._onToggleEffect method cannot be overriden anymore, as it become private in v12 #onToggleEffect, most probably an overrride of activateListeners will be required, i.e.:

    super.activateListeners(html);
    const effectsTray = html.find(".status-effects");

    effectsTray.off("click", ".effect-control");
    effectsTray.off("contextmenu", ".effect-control");

    effectsTray.on("click", ".effect-control", this._onToggleEffect.bind(this));
    effectsTray.on("contextmenu", ".effect-control", event => this._onToggleEffect(event, {overlay: true}));
  }

To Reproduce Using tokenHud try to apply bleeding condition and remove it - expected behaviour would be to add multiple bleedings on leftclick, and remove on right click. Once removed, fatigue condition should be applied, but it's not.

Screenshots If applicable, add screenshots to help explain your problem.

Version Numbers Foundry V12,

Foundry: wfrp4e: wfrp4e-core: