[Feature] V14 Cleanup (#1918)
Some checks failed
Project CI / build (24.x) (push) Has been cancelled

* Fixedin PrototypeToken preview

* Fixed translations

* Fixed tokenSize linking to token.depth

* Fixed beastform depth

* Raised foundry version
This commit is contained in:
WBHarry 2026-05-23 12:16:25 +02:00 committed by GitHub
parent 2931377d53
commit e4a3f105dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 85 additions and 33 deletions

View file

@ -20,7 +20,7 @@ export default class DhScene extends Scene {
const prototype = tokenDoc.actor?.prototypeToken ?? tokenDoc;
this.#sizeSyncBatch.set(tokenDoc.id, {
size: tokenSize,
prototypeSize: { width: prototype.width, height: prototype.height },
prototypeSize: { width: prototype.width, height: prototype.height, depth: prototype.depth },
position: { x: tokenDoc.x, y: tokenDoc.y, elevation: tokenDoc.elevation }
});
this.#processSyncBatch();
@ -36,11 +36,13 @@ export default class DhScene extends Scene {
const tokenSize = tokenSizes[size];
const width = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.width;
const height = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.height;
const depth = size !== CONFIG.DH.ACTOR.tokenSize.custom.id ? tokenSize : prototypeSize.depth;
const updatedPosition = DHToken.getSnappedPositionInSquareGrid(this.grid, position, width, height);
return {
_id,
width,
height,
depth,
...updatedPosition
};
});