Beastform Improvements (#294)

* BeastformEffect is editable. Added SubjectTexture field.

* Using handlebars disabled helper
This commit is contained in:
WBHarry 2025-07-08 21:01:28 +02:00 committed by GitHub
parent 61f04df765
commit 861dfd977d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 81 additions and 32 deletions

View file

@ -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 [
{