When changing scenes, *a lot* of data is either empty or points to the previous scene, preventing us from knowing whether a token is in combat or not directly from the token. To work around that, go through the list of combats directly and try to match them with the scene and token we are drawing instead of using `.inCombat`. We cannot rely on `game.combats.active` either as it points to the active combat in the previous scene. This is far more work, but it is the only working solution I found. It depends quite a bit on Fabula Ultima's system combat type which lists combatants. This leaves a more minor issue that the borders are not updated when switching between encounters on the same scene, but this is a rarer scenario. Remove the issue from the README and mention the encounter switch issue. |
||
---|---|---|
.. | ||
mills_fabula.mjs | ||
token_combat_border.mjs | ||
token_ui_adjust.mjs |