mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
remove attachment only logic in favor of just transfer
This commit is contained in:
parent
a9e584d619
commit
896f317c6d
4 changed files with 10 additions and 23 deletions
|
|
@ -30,6 +30,13 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
|||
async _preparePartContext(partId, context) {
|
||||
const partContext = await super._preparePartContext(partId, context);
|
||||
switch (partId) {
|
||||
case 'details':
|
||||
// Add your custom checkbox field here
|
||||
partContext.fields.yourCustomField = new foundry.data.fields.BooleanField({
|
||||
label: "DAGGERHEART.EFFECTS.YourCustomField.label",
|
||||
hint: "DAGGERHEART.EFFECTS.YourCustomField.hint"
|
||||
});
|
||||
break;
|
||||
case 'changes':
|
||||
const fieldPaths = [];
|
||||
const validFieldPath = fieldPath => this.validFieldPath(fieldPath, this.#unapplicablePaths);
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@ export default class DhActiveEffect extends ActiveEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
// First check for attachment-only effects - these should ALWAYS be suppressed on the original item
|
||||
// They only work through copied versions when attached
|
||||
if (this.isAttachmentOnly) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Then apply the standard suppression rules
|
||||
if (['weapon', 'armor'].includes(this.parent?.type)) {
|
||||
return !this.parent.system.equipped;
|
||||
|
|
@ -24,14 +18,6 @@ export default class DhActiveEffect extends ActiveEffect {
|
|||
return super.isSuppressed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this effect is marked as attachment-only
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get isAttachmentOnly() {
|
||||
return this.flags?.daggerheart?.attachmentOnly === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the parent item is currently attached to another item
|
||||
* @returns {boolean}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue