mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
Fixed
This commit is contained in:
parent
267de9a8cf
commit
aab767bc3b
4 changed files with 29 additions and 23 deletions
|
|
@ -431,18 +431,18 @@ export default function DHApplicationMixin(Base) {
|
|||
{
|
||||
name: 'disableEffect',
|
||||
icon: 'fa-solid fa-lightbulb',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && !doc.disabled && doc.type !== 'beastform';
|
||||
condition: element => {
|
||||
const target = element.closest('[data-item-uuid]');
|
||||
return !target.dataset.disabled && target.dataset.subType !== 'beastform';
|
||||
},
|
||||
callback: async target => (await getDocFromElement(target)).update({ disabled: true })
|
||||
},
|
||||
{
|
||||
name: 'enableEffect',
|
||||
icon: 'fa-regular fa-lightbulb',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && doc.disabled && doc.type !== 'beastform';
|
||||
condition: element => {
|
||||
const target = element.closest('[data-item-uuid]');
|
||||
return target.dataset.disabled && target.dataset.subType !== 'beastform';
|
||||
},
|
||||
callback: async target => (await getDocFromElement(target)).update({ disabled: false })
|
||||
}
|
||||
|
|
@ -536,9 +536,9 @@ 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';
|
||||
condition: element => {
|
||||
const target = element.closest('[data-item-uuid]');
|
||||
return target.dataset.subType !== 'beastform';
|
||||
},
|
||||
callback: async (target, event) => {
|
||||
const doc = await getDocFromElement(target);
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ Parameters:
|
|||
{{> 'daggerheart.inventory-item'
|
||||
item=item
|
||||
type=../type
|
||||
disabledEffect=../disabledEffect
|
||||
actorType=../actorType
|
||||
hideControls=../hideControls
|
||||
hideContextMenu=../hideContextMenu
|
||||
|
|
|
|||
|
|
@ -17,8 +17,12 @@ Parameters:
|
|||
- showActions {boolean} : If true show feature's actions.
|
||||
--}}
|
||||
|
||||
<li class="inventory-item" data-item-id="{{item.id}}" {{#if (or (eq type 'action' ) (eq type 'attack' ))}}
|
||||
data-action-id="{{item.id}}" {{/if}} data-item-uuid="{{item.uuid}}" data-type="{{type}}" data-no-compendium-edit="{{noCompendiumEdit}}">
|
||||
<li class="inventory-item" data-item-id="{{item.id}}"
|
||||
{{#if (or (eq type 'action' ) (eq type 'attack' ))}}data-action-id="{{item.id}}" {{/if}}
|
||||
{{#if disabledEffect}}data-disabled="true"{{/if}}
|
||||
data-type="{{type}}" data-sub-type="{{item.type}}"
|
||||
data-item-uuid="{{item.uuid}}" data-no-compendium-edit="{{noCompendiumEdit}}"
|
||||
>
|
||||
<div class="inventory-item-header {{#if hideContextMenu}}padded{{/if}}" {{#unless noExtensible}}data-action="toggleExtended" {{/unless}}>
|
||||
{{!-- Image --}}
|
||||
<div class="img-portait" data-action='{{ifThen (or (hasProperty item "use") (eq type "attack")) "useItem" (ifThen
|
||||
|
|
|
|||
|
|
@ -2,20 +2,21 @@
|
|||
data-group='{{tabs.effects.group}}'>
|
||||
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.activeEffects'
|
||||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
title='DAGGERHEART.GENERAL.activeEffects'
|
||||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.inactiveEffects'
|
||||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
title='DAGGERHEART.GENERAL.inactiveEffects'
|
||||
type='effect'
|
||||
disabledEffect=true
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue