feat: use new ActiveEffect transferral system

Closes #68
This commit is contained in:
Johannes Loher 2023-06-25 23:55:08 +02:00
parent 032b006dd5
commit 62065a8d31
No known key found for this signature in database
GPG key ID: 7CB0A9FB553DA045
1793 changed files with 64779 additions and 67933 deletions

View file

@ -9,34 +9,36 @@ SPDX-License-Identifier: MIT
!-- Render an item list entry row.
!-- If the partial is called with a partial block, the partial block
!-- content is inserted before the description.
!-- @param itemData: The data of the item.
!-- @param item: The item.
!-- @param isEquipable: A flag to enable the equipped column.
!-- @param hasQuantity: A flag to enable the quantity column.
!-- @param hideDescription: A flag to disable the description column.
!-- @param @partial-block: Custom column headers can be passed using the partial block.
--}}
<li class="ds4-embedded-document-list__row item" data-item-id="{{itemData._id}}">
<li class="ds4-embedded-document-list__row item" data-item-uuid="{{item.uuid}}">
{{!-- equipped --}}
{{#if isEquipable}}
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-item" type="checkbox" {{checked
itemData.system.equipped}} data-dtype="Boolean" data-property="system.equipped"
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-item"
type="checkbox" {{checked item.system.equipped}} data-dtype="Boolean" data-property="system.equipped"
title="{{localize 'DS4.ItemEquipped'}}">
{{/if}}
{{!-- image --}}
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=(and itemData.system.rollable @root/editable)
src=itemData.img alt=(localize "DS4.DocumentImageAltText" name=itemData.name) title=itemData.name
rollableTitle=(localize "DS4.RollableImageRollableTitle" name=itemData.name) rollableClass="rollable-item"}}
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=(and item.system.rollable
@root/editable)
src=item.img alt=(localize "DS4.DocumentImageAltText" name=item.name) title=item.name
rollableTitle=(localize "DS4.RollableImageRollableTitle" name=item.name) rollableClass="rollable-item"}}
{{!-- amount --}}
{{#if hasQuantity}}
<input class="ds4-embedded-document-list__editable change-item" type="number" min="0" step="1" value="{{itemData.system.quantity}}"
data-dtype="Number" data-property="system.quantity" title="{{localize 'DS4.Quantity'}}" />
<input class="ds4-embedded-document-list__editable change-item" type="number" min="0" step="1"
value="{{item.system.quantity}}" data-dtype="Number" data-property="system.quantity"
title="{{localize 'DS4.Quantity'}}" />
{{/if}}
{{!-- name --}}
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{itemData.name}}" data-dtype="String"
data-property="name" title="{{htmlToPlainText itemData.system.description}}" />
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{item.name}}"
data-dtype="String" data-property="name" title="{{htmlToPlainText item.system.description}}" />
{{!-- item type specifics --}}
{{#if @partial-block }}
@ -45,8 +47,8 @@ SPDX-License-Identifier: MIT
{{!-- description --}}
{{#unless hideDescription}}
<div class="ds4-embedded-document-list__description" title="{{htmlToPlainText itemData.system.description}}">
{{{itemData.system.description}}}</div>
<div class="ds4-embedded-document-list__description" title="{{htmlToPlainText item.system.description}}">
{{{item.system.description}}}</div>
{{/unless}}
{{!-- control button group --}}