[Fix] Beastform Effects (#1635)

* Fixed so that beastform items always have a beastformEffect on them that can't be removed

* Fixed so that you can drag an active effect onto a character
This commit is contained in:
WBHarry 2026-02-08 18:01:30 +01:00 committed by GitHub
parent 202e624a06
commit 44131d21a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 5 deletions

View file

@ -433,7 +433,7 @@ export default function DHApplicationMixin(Base) {
icon: 'fa-solid fa-lightbulb',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && !doc.disabled;
return doc && !doc.disabled && doc.type !== 'beastform';
},
callback: async target => (await getDocFromElement(target)).update({ disabled: true })
},
@ -442,7 +442,7 @@ export default function DHApplicationMixin(Base) {
icon: 'fa-regular fa-lightbulb',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && doc.disabled;
return doc && doc.disabled && doc.type !== 'beastform';
},
callback: async target => (await getDocFromElement(target)).update({ disabled: false })
}
@ -536,6 +536,10 @@ export default function DHApplicationMixin(Base) {
options.push({
name: 'CONTROLS.CommonDelete',
icon: 'fa-solid fa-trash',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && doc.type !== 'beastform';
},
callback: async (target, event) => {
const doc = await getDocFromElement(target);
if (event.shiftKey) return doc.delete();