mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-04 05:37:11 -04:00
8: Add rolls to items on actor sheets
- Utilized the revisions made to roll syntax to allow for rollable buttons on item lists on actor sheets. Rolls are evaluated using `@items.ITEM.KEY`, where ITEM is the item name (slugified), and KEY is an attribute key for a formula attribute.
This commit is contained in:
parent
00dfec6014
commit
786d4095a9
5 changed files with 29 additions and 0 deletions
|
@ -40,6 +40,11 @@
|
|||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
{{#each item.data.attributes as |itemAttr key|}}
|
||||
{{#if (eq itemAttr.dtype "Formula")}}
|
||||
<button class="item-button rollable" data-roll="@items.{{slugify item.name}}.{{key}}" title="{{itemAttr.value}}">{{itemAttr.label}}</button>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue