test soft lock

This commit is contained in:
Vlyan
2021-12-28 14:38:13 +01:00
parent ee1b72caa5
commit cce5aa1b45
15 changed files with 51 additions and 42 deletions

View File

@@ -1,14 +1,14 @@
<fieldset class="armors-content">
<legend class="section-header">
{{localize 'l5r5e.armors.title'}}
{{#if options.editable}}
{{#if data.editable_not_soft_locked}}
<a data-item-type="armor" data-item-equipped="true" class="armor-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</legend>
<ul class="item-list">
{{#each actor.items as |item id|}}
{{#ifCond (ifCond item.type '==' 'armor') '&&' (ifCond item.data.data.equipped '==' true)}}
{{> 'systems/l5r5e/templates/items/armor/armor-entry.html' armor=item id=id editable=../options.editable }}
{{> 'systems/l5r5e/templates/items/armor/armor-entry.html' armor=item id=id editable=../data.editable_not_soft_locked }}
{{/ifCond}}
{{/each}}
</ul>

View File

@@ -4,8 +4,10 @@
<li class="item-name l5r5e-tooltip" data-item-id="{{item._id}}">{{item.name}} <sub>x{{item.data.quantity}}</sub></li>
{{#if editable}}
<li data-item-id="{{item._id}}" data-type="equipped" class="item-equip equip-readied-control" title="{{localize 'l5r5e.armors.equipped'}}"><i class="fas {{#if item.data.equipped}}fa-tshirt{{else}}fa-weight-hanging{{/if}}"></i></li>
{{^if soft_locked}}
<li data-item-id="{{item._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
<li data-item-id="{{item._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
{{/if}}
{{/if}}
</ul>
<ul class="item-properties">

View File

@@ -1,13 +1,13 @@
{{#each data.splitItemsList as |cat type|}}
<h3 class="toggle-on-click" data-toggle="inventory-item-list-{{type}}">
{{localize (localize 'l5r5e.{type}s.title' type=type)}} ({{cat.length}})
{{#if ../options.editable}}
{{#if ../data.editable_not_soft_locked}}
<a data-item-type="{{type}}" class="item-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</h3>
<ul class="item-list inventory-item-list-{{type}}">
{{#each cat as |item id|}}
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id editable=../../options.editable}}
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id editable=../../options.editable soft_locked=../../data.data.soft_locked}}
{{/each}}
</ul>
{{/each}}

View File

@@ -1,14 +1,14 @@
<fieldset class="weapons-content">
<legend class="section-header">
{{localize 'l5r5e.weapons.title'}}
{{#if options.editable}}
{{#if data.editable_not_soft_locked}}
<a data-item-type="weapon" data-item-equipped="true" class="weapon-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</legend>
<ul class="item-list">
{{#each actor.items as |item id|}}
{{#ifCond (ifCond item.type '==' 'weapon') '&&' (ifCond item.data.data.equipped '==' true)}}
{{> 'systems/l5r5e/templates/items/weapon/weapon-entry.html' weapon=item id=id editable=../options.editable}}
{{> 'systems/l5r5e/templates/items/weapon/weapon-entry.html' weapon=item id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}}
{{/each}}
</ul>