mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 21:04:16 +02:00
[Feature] V14 Cleanup (#1918)
Some checks failed
Project CI / build (24.x) (push) Has been cancelled
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:
parent
2931377d53
commit
e4a3f105dc
11 changed files with 85 additions and 33 deletions
|
|
@ -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
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue