Lay the foundation for the per-item templating in the inventory
This commit is contained in:
parent
5e2fb95c73
commit
6d14d70f3e
5 changed files with 20 additions and 7 deletions
|
|
@ -26,7 +26,8 @@ export const partials = [
|
||||||
`actors/char-sheet/v2/partials/inventory/player.v2.pc.hbs`,
|
`actors/char-sheet/v2/partials/inventory/player.v2.pc.hbs`,
|
||||||
`actors/char-sheet/v2/partials/inventory/item-list.v2.pc.hbs`,
|
`actors/char-sheet/v2/partials/inventory/item-list.v2.pc.hbs`,
|
||||||
`actors/char-sheet/v2/partials/inventory/storage.v2.pc.hbs`,
|
`actors/char-sheet/v2/partials/inventory/storage.v2.pc.hbs`,
|
||||||
`actors/char-sheet/v2/partials/inventory/transportation.v2.pc.hbs`,
|
`actors/char-sheet/v2/partials/inventory/items/material.v2.pc.hbs`,
|
||||||
|
`actors/char-sheet/v2/partials/inventory/items/untyped.v2.pc.hbs`,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const icons = [
|
export const icons = [
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ export class PlayerSheetv2 extends GenericActorSheet {
|
||||||
return stats;
|
return stats;
|
||||||
};
|
};
|
||||||
|
|
||||||
_itemTypesHidden = new Set();
|
_itemTypesHidden = new Set([`weapon`, `armour`, `equipment`, `foil`, `structure`, `service`]);
|
||||||
toggleItemFilter(filterName) {
|
toggleItemFilter(filterName) {
|
||||||
if (this._itemTypesHidden.has(filterName)) {
|
if (this._itemTypesHidden.has(filterName)) {
|
||||||
this._itemTypesHidden.delete(filterName);
|
this._itemTypesHidden.delete(filterName);
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,11 @@
|
||||||
<h2>{{filter.label}}</h2>
|
<h2>{{filter.label}}</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="{{@key}}-list">
|
<div class="{{@key}}-list">
|
||||||
<div>Item</div>
|
{{#each (lookup @root.items @key) as | item |}}
|
||||||
<div>Item</div>
|
{{> (concat "dotdungeon.pc.v2." @../key) @root item=item}}
|
||||||
<div>Item</div>
|
{{else}}
|
||||||
<div>Item</div>
|
No items found
|
||||||
<div>Item</div>
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<div class="material">
|
||||||
|
Material Name
|
||||||
|
<button type="button">-</button>
|
||||||
|
X
|
||||||
|
<button type="button">+</button>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<div class="untyped">
|
||||||
|
{{item.name}}
|
||||||
|
<button type="button">-</button>
|
||||||
|
X
|
||||||
|
<button type="button">+</button>
|
||||||
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue