Edit option is now always shown on compendium actions (#423)

This commit is contained in:
WBHarry 2025-07-26 23:30:44 +02:00 committed by GitHub
parent e98adc55b7
commit 5cd9075732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -33,7 +33,8 @@
"exact": "Beastform Max Tier",
"exactHint": "The Character's Tier is used if empty",
"label": "Beastform"
}
},
"displayInChat": "Display in chat"
},
"Settings": {
"attackBonus": "Attack Bonus",

View file

@ -305,7 +305,7 @@ export default function DHApplicationMixin(Base) {
icon: 'fa-solid fa-pen-to-square',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && (!doc.hasOwnProperty('systemPath') || doc.inCollection);
return !doc || !doc.hasOwnProperty('systemPath') || doc.inCollection;
},
callback: async target => (await getDocFromElement(target)).sheet.render({ force: true })
}

View file

@ -27,7 +27,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
name: new fields.StringField({ initial: undefined }),
description: new fields.HTMLField(),
img: new fields.FilePathField({ initial: undefined, categories: ['IMAGE'], base64: false }),
chatDisplay: new fields.BooleanField({ initial: true, label: 'Display in chat' }),
chatDisplay: new fields.BooleanField({ initial: true, label: 'DAGGERHEART.ACTIONS.Config.displayInChat' }),
actionType: new fields.StringField({
choices: CONFIG.DH.ITEM.actionTypes,
initial: 'action',

View file

@ -8,7 +8,7 @@
{{formField fields.name value=source.name label="Name" name="name"}}
{{formField fields.img value=source.img label="Icon" name="img"}}
{{formField fields.actionType value=source.actionType label="Type" name="actionType" localize=true}}
{{formField fields.chatDisplay value=source.chatDisplay name="chatDisplay" classes="checkbox"}}
{{formField fields.chatDisplay value=source.chatDisplay name="chatDisplay" classes="checkbox" localize=true}}
</fieldset>
<fieldset class="action-category">
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>