Reworked summon action and clowncar functionality to work with levels (#1791)

This commit is contained in:
WBHarry 2026-04-12 00:25:43 +02:00 committed by GitHub
parent 94f1fbdd9b
commit 3ec013ff50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 130 deletions

View file

@ -1,16 +1 @@
export default class DhTokenLayer extends foundry.canvas.layers.TokenLayer {
async _createPreview(createData, options) {
if (options.actor) {
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
if (options.actor?.system.metadata.usesSize) {
const tokenSize = tokenSizes[options.actor.system.size];
if (tokenSize && options.actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
createData.width = tokenSize;
createData.height = tokenSize;
}
}
}
return super._createPreview(createData, options);
}
}
export default class DhTokenLayer extends foundry.canvas.layers.TokenLayer {}