mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Beastform Improvements (#294)
* BeastformEffect is editable. Added SubjectTexture field. * Using handlebars disabled helper
This commit is contained in:
parent
61f04df765
commit
861dfd977d
7 changed files with 81 additions and 32 deletions
|
|
@ -188,7 +188,17 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
* @param {HTMLElement} el
|
||||
* @returns {foundry.documents.Item?}
|
||||
*/
|
||||
const getItem = el => this.actor.items.get(el.closest('[data-item-id]')?.dataset.itemId);
|
||||
const getItem = element => {
|
||||
const listElement = (element.target ?? element).closest('[data-item-id]');
|
||||
const itemId = listElement.dataset.itemId;
|
||||
|
||||
switch (listElement.dataset.type) {
|
||||
case 'effect':
|
||||
return this.document.effects.get(itemId);
|
||||
default:
|
||||
return this.document.items.get(itemId);
|
||||
}
|
||||
};
|
||||
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue