mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 12:11:07 +01:00
* Schema definition for DHSummonAction * Will reimplement * HBS idea formed. Need to recheck drag drop implementation * Tried to refine drag drop * drag drop implemented (css tbd) * phase 1 complete * tbd work on summon action type * Improved Schema and now it works * . * Dialog created. Tokens not dragged(tbd). * Bare minimum implementation * Finalized functionality * Cleanup * . * Added optional summon render to chat message * Updated SRD * bugfix: fix title lines not rendering in chat messages * Added summon actions to the easily doable environments in the SRD * Update module/data/fields/action/summonField.mjs Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com> --------- Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com> Co-authored-by: Murilo Brito <dev.murilobrito@gmail.com> Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
16 lines
715 B
JavaScript
16 lines
715 B
JavaScript
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);
|
|
}
|
|
}
|