Fixed so that the new feature button in the character sheet can take you to the compendium browser (#1719)

This commit is contained in:
WBHarry 2026-03-09 23:09:16 +01:00 committed by GitHub
parent d518993ec9
commit 83f6c940df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 11 deletions

View file

@ -691,6 +691,9 @@ export default function DHApplicationMixin(Base) {
case 'weapon':
presets.folder = 'equipments.folders.weapons';
break;
case 'feature':
presets.folder = 'features';
break;
case 'domainCard':
presets.folder = 'domains';
presets.filter = {

View file

@ -4,19 +4,21 @@
{{#each document.system.sheetLists as |category|}}
{{#if (eq category.type 'feature' )}}
{{> 'daggerheart.inventory-items'
title=category.title
type='feature'
collection=category.values
canCreate=true
showActions=true
title=category.title
type='feature'
actorType='character'
collection=category.values
canCreate=true
showActions=true
}}
{{else if category.values}}
{{> 'daggerheart.inventory-items'
title=category.title
type='feature'
collection=category.values
canCreate=false
showActions=true
title=category.title
type='feature'
actorType='character'
collection=category.values
canCreate=false
showActions=true
}}
{{/if}}

View file

@ -28,7 +28,7 @@ Parameters:
<legend>
{{localize title}}
{{#if canCreate}}
<a data-action="{{ifThen (or (eq type 'effect') (eq type 'feature') (eq type 'action')) 'createDoc' 'addNewItem' }}" data-document-class="{{ifThen (eq type 'effect') 'ActiveEffect' 'Item' }}"
<a data-action="{{ifThen (or (eq type 'effect') (and (eq type 'feature') (not (eq actorType 'character'))) (eq type 'action')) 'createDoc' 'addNewItem' }}" data-document-class="{{ifThen (eq type 'effect') 'ActiveEffect' 'Item' }}"
data-type="{{ifThen (eq type 'effect') 'base' type}}"
{{#if inVault}}data-in-vault="{{inVault}}"{{/if}}
{{#if disabled}} data-disabled="{{disabled}}"{{/if}}