mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR] [Feature] Beastform Wildcards (#1247)
* Added support for wildcard paths in beastform token paths * Fixed browse dataSource
This commit is contained in:
parent
2d6390248f
commit
7055591a76
11 changed files with 176 additions and 2 deletions
|
|
@ -844,6 +844,23 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
itemData.system.inVault = true;
|
||||
}
|
||||
|
||||
if (item.type === 'beastform') {
|
||||
if (this.document.effects.find(x => x.type === 'beastform')) {
|
||||
return ui.notifications.warn(
|
||||
game.i18n.localize('DAGGERHEART.UI.Notifications.beastformAlreadyApplied')
|
||||
);
|
||||
}
|
||||
|
||||
const data = await game.system.api.data.items.DHBeastform.getWildcardImage(this.document, itemData);
|
||||
if (data) {
|
||||
if (!data.selectedImage) return;
|
||||
else {
|
||||
if (data.usesDynamicToken) itemData.system.tokenRingImg = data.selectedImage;
|
||||
else itemData.system.tokenImg = data.selectedImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.document.uuid === item.parent?.uuid) return this._onSortItem(event, itemData);
|
||||
const createdItem = await this._onDropItemCreate(itemData);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue