[Feature] Transform Linked Actors (#2046)

* Added ability to transform linked actors
* Updated to use the utils getWorldActor function
* Animate change and fix error when converting to unlinked
---------

Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>
This commit is contained in:
WBHarry 2026-07-03 11:14:25 +02:00 committed by GitHub
parent 44dd3bd2e1
commit 98fedf3990
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 101 additions and 32 deletions

View file

@ -34,12 +34,14 @@ export default class DhpActor extends Actor {
super.prepareData();
// Update effects if it is the user's character or is controlled
if (canvas.ready) {
// A timeout avoids an infinite loop when accessing token actors before the delta is finished constructing
window.setTimeout(() => {
if (!canvas.ready) return;
const controlled = canvas.tokens.controlled.some(t => t.actor === this);
if (game.user.character === this || controlled) {
ui.effectsDisplay.render();
ui.effectsDisplay.refresh();
}
}
}, 0);
}
/* -------------------------------------------- */