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

@@ -31,6 +31,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
// Split Items by types // Split Items by types
sheetData.data.splitItemsList = this._splitItems(sheetData); sheetData.data.splitItemsList = this._splitItems(sheetData);
// Shortcut for some tests
sheetData.data.editable_not_soft_locked = sheetData.editable && !sheetData.data.data.soft_locked;
return sheetData; return sheetData;
} }

View File

@@ -2,6 +2,9 @@
"Actor": { "Actor": {
"types": ["character", "npc", "army"], "types": ["character", "npc", "army"],
"templates": { "templates": {
"softlock": {
"soft_locked": false
},
"identity": { "identity": {
"identity": { "identity": {
"clan": "", "clan": "",
@@ -115,7 +118,7 @@
} }
}, },
"character": { "character": {
"templates": ["identity", "rings", "social", "skills", "techniques", "conflict", "advancement"], "templates": ["softlock", "identity", "rings", "social", "skills", "techniques", "conflict", "advancement"],
"template": "core", "template": "core",
"twenty_questions": {}, "twenty_questions": {},
"zeni": 0 "zeni": 0

View File

@@ -3,7 +3,7 @@
<header class="sheet-header"> <header class="sheet-header">
<img class="profile-img dragndrop-actor-id pointer" src="{{data.img}}" data-edit="img" data-actor-id="{{actor.id}}" draggable="true" title="{{data.name}}"/> <img class="profile-img dragndrop-actor-id pointer" src="{{data.img}}" data-edit="img" data-actor-id="{{actor.id}}" draggable="true" title="{{data.name}}"/>
<div class="header-fields identity-wrapper"> <div class="header-fields identity-wrapper">
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1> <h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if data.editable_not_soft_locked}}disabled{{/if}}/></h1>
{{> 'systems/l5r5e/templates/actors/character/identity.html'}} {{> 'systems/l5r5e/templates/actors/character/identity.html'}}
</div> </div>
<div class="header-fields"> <div class="header-fields">
@@ -29,7 +29,7 @@
<article class="tab skills" data-group="primary" data-tab="skills"> <article class="tab skills" data-group="primary" data-tab="skills">
<ul class="skills-wrapper"> <ul class="skills-wrapper">
{{#each data.data.skills as |category id|}} {{#each data.data.skills as |category id|}}
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id}} {{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
{{/each}} {{/each}}
</ul> </ul>
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}} {{> 'systems/l5r5e/templates/actors/character/techniques.html'}}

View File

@@ -2,7 +2,7 @@
<h4 class="section-header">{{localizeSkill categoryId 'title'}}</h4> <h4 class="section-header">{{localizeSkill categoryId 'title'}}</h4>
<ul class="skill-category-skills-list"> <ul class="skill-category-skills-list">
{{#each category as |skill id|}} {{#each category as |skill id|}}
{{> 'systems/l5r5e/templates/actors/character/skill.html' categoryId=../categoryId skill=skill skillId=id}} {{> 'systems/l5r5e/templates/actors/character/skill.html' categoryId=../categoryId skill=skill skillId=id data=../data}}
{{/each}} {{/each}}
</ul> </ul>
<ul class="skill-category-ring-actions"> <ul class="skill-category-ring-actions">

View File

@@ -6,7 +6,7 @@
{{else}} {{else}}
{{localize 'l5r5e.clan'}} {{localize 'l5r5e.clan'}}
{{/ifCond}} {{/ifCond}}
<input type="text" name="data.identity.clan" value="{{data.data.identity.clan}}"/> <input type="text" name="data.identity.clan" value="{{data.data.identity.clan}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
@@ -16,25 +16,25 @@
{{else}} {{else}}
{{localize 'l5r5e.family'}} {{localize 'l5r5e.family'}}
{{/ifCond}} {{/ifCond}}
<input type="text" name="data.identity.family" value="{{data.data.identity.family}}"/> <input type="text" name="data.identity.family" value="{{data.data.identity.family}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
<label class="attribute-label"> <label class="attribute-label">
{{localize 'l5r5e.schoolrank'}} {{localize 'l5r5e.schoolrank'}}
<input type="number" name="data.identity.school_rank" value="{{data.data.identity.school_rank}}" class="select-on-focus" data-dtype="Number" min="0" placeholder="1"/> <input type="number" name="data.identity.school_rank" value="{{data.data.identity.school_rank}}" class="select-on-focus" data-dtype="Number" min="0" placeholder="1" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
<label class="attribute-label"> <label class="attribute-label">
{{localize 'l5r5e.school'}} {{localize 'l5r5e.school'}}
<input type="text" name="data.identity.school" value="{{data.data.identity.school}}"/> <input type="text" name="data.identity.school" value="{{data.data.identity.school}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
<label class="attribute-label"> <label class="attribute-label">
{{localize 'l5r5e.roles'}} {{localize 'l5r5e.roles'}}
<input type="text" name="data.identity.roles" value="{{data.data.identity.roles}}"/> <input type="text" name="data.identity.roles" value="{{data.data.identity.roles}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
</ul> </ul>

View File

@@ -2,7 +2,7 @@
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend> <legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
<label> <label>
{{localize 'l5r5e.money.koku'}} {{localize 'l5r5e.money.koku'}}
<input name="data.money.koku" type="number" value="{{data.data.money.koku}}" data-dtype="Number" min="0" placeholder="0"/> <input name="data.money.koku" type="number" value="{{data.data.money.koku}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
<span class="money-buttons"> <span class="money-buttons">
<i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i> <i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i>
<i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i> <i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i>
@@ -10,7 +10,7 @@
</label> </label>
<label> <label>
{{localize 'l5r5e.money.bu'}} {{localize 'l5r5e.money.bu'}}
<input name="data.money.bu" type="number" value="{{data.data.money.bu}}" data-dtype="Number" min="0" placeholder="0"/> <input name="data.money.bu" type="number" value="{{data.data.money.bu}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
<span class="money-buttons"> <span class="money-buttons">
<i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i> <i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i>
<i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i> <i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i>
@@ -18,7 +18,7 @@
</label> </label>
<label> <label>
{{localize 'l5r5e.money.zeni'}} {{localize 'l5r5e.money.zeni'}}
<input name="data.money.zeni" type="number" value="{{data.data.money.zeni}}" data-dtype="Number" min="0" placeholder="0"/> <input name="data.money.zeni" type="number" value="{{data.data.money.zeni}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
<span class="money-buttons"> <span class="money-buttons">
<i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i> <i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i>
<i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i> <i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i>
@@ -34,14 +34,14 @@
<fieldset> <fieldset>
<legend class="text-block-header"> <legend class="text-block-header">
{{localize 'l5r5e.advancements.item_pattern'}} {{localize 'l5r5e.advancements.item_pattern'}}
{{#if options.editable}} {{#if data.editable_not_soft_locked}}
<a data-item-type="item_pattern" class="item-pattern-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="item_pattern" class="item-pattern-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |pattern id|}} {{#each actor.items as |pattern id|}}
{{#ifCond pattern.data.type '==' 'item_pattern'}} {{#ifCond pattern.data.type '==' 'item_pattern'}}
{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../options.editable}} {{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>

View File

@@ -20,11 +20,11 @@
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend> <legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
<label class="attribute-label"> <label class="attribute-label">
{{localize 'l5r5e.social.bushido_tenets.paramount'}} {{localize 'l5r5e.social.bushido_tenets.paramount'}}
<textarea type="text" name="data.social.bushido_tenets.paramount">{{data.data.social.bushido_tenets.paramount}}</textarea> <textarea type="text" name="data.social.bushido_tenets.paramount" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.paramount}}</textarea>
</label> </label>
<label class="attribute-label"> <label class="attribute-label">
{{localize 'l5r5e.social.bushido_tenets.less_significant'}} {{localize 'l5r5e.social.bushido_tenets.less_significant'}}
<textarea type="text" name="data.social.bushido_tenets.less_significant">{{data.data.social.bushido_tenets.less_significant}}</textarea> <textarea type="text" name="data.social.bushido_tenets.less_significant" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.less_significant}}</textarea>
</label> </label>
</fieldset> </fieldset>
</div> </div>
@@ -33,14 +33,14 @@
<fieldset> <fieldset>
<legend class="text-block-header"> <legend class="text-block-header">
{{localize 'l5r5e.social.advantages'}} {{localize 'l5r5e.social.advantages'}}
{{#if options.editable}} {{#if data.editable_not_soft_locked}}
<a data-item-type="peculiarity" class="peculiarity-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="peculiarity" class="peculiarity-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |item id|}} {{#each actor.items as |item id|}}
{{#ifCond '["distinction","passion"]' 'includes' item.data.data.peculiarity_type}} {{#ifCond '["distinction","passion"]' 'includes' item.data.data.peculiarity_type}}
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../options.editable}} {{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>
@@ -49,14 +49,14 @@
<fieldset> <fieldset>
<legend class="text-block-header"> <legend class="text-block-header">
{{localize 'l5r5e.social.disadvantages'}} {{localize 'l5r5e.social.disadvantages'}}
{{#if options.editable}} {{#if data.editable_not_soft_locked}}
<a data-item-type="peculiarity" class="peculiarity-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="peculiarity" class="peculiarity-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |item id|}} {{#each actor.items as |item id|}}
{{#ifCond '["adversity","anxiety"]' 'includes' item.data.data.peculiarity_type}} {{#ifCond '["adversity","anxiety"]' 'includes' item.data.data.peculiarity_type}}
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../options.editable}} {{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>
@@ -65,14 +65,14 @@
<fieldset> <fieldset>
<legend class="text-block-header"> <legend class="text-block-header">
{{localize 'l5r5e.social.bonds' }} {{localize 'l5r5e.social.bonds' }}
{{#if options.editable}} {{#if data.editable_not_soft_locked}}
<a data-item-type="bond" class="bond-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="bond" class="bond-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |bond id|}} {{#each actor.items as |bond id|}}
{{#ifCond bond.data.type '==' 'bond'}} {{#ifCond bond.data.type '==' 'bond'}}
{{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../options.editable}} {{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>

View File

@@ -3,35 +3,35 @@
<label class="earth"> <label class="earth">
<i class="i_earth dice-picker rollable" data-ring="earth"></i> <i class="i_earth dice-picker rollable" data-ring="earth"></i>
<strong>{{localizeRing 'earth'}}</strong> <strong>{{localizeRing 'earth'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li id="air"> <li id="air">
<label class="air"> <label class="air">
<i class="i_air dice-picker rollable" data-ring="air"></i> <i class="i_air dice-picker rollable" data-ring="air"></i>
<strong>{{localizeRing 'air'}}</strong> <strong>{{localizeRing 'air'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li id="water"> <li id="water">
<label class="water"> <label class="water">
<i class="i_water dice-picker rollable" data-ring="water"></i> <i class="i_water dice-picker rollable" data-ring="water"></i>
<strong>{{localizeRing 'water'}}</strong> <strong>{{localizeRing 'water'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li id="fire"> <li id="fire">
<label class="fire"> <label class="fire">
<i class="i_fire dice-picker rollable" data-ring="fire"></i> <i class="i_fire dice-picker rollable" data-ring="fire"></i>
<strong>{{localizeRing 'fire'}}</strong> <strong>{{localizeRing 'fire'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li id="void"> <li id="void">
<label class="void"> <label class="void">
<i class="i_void dice-picker rollable" data-ring="void"></i> <i class="i_void dice-picker rollable" data-ring="void"></i>
<strong>{{localizeRing 'void'}}</strong> <strong>{{localizeRing 'void'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
</ul> </ul>

View File

@@ -10,6 +10,7 @@
min="0" min="0"
max="9" max="9"
placeholder="0" placeholder="0"
{{^if data.editable_not_soft_locked}}disabled{{/if}}
/> />
</label> </label>
</li> </li>

View File

@@ -2,19 +2,19 @@
<li> <li>
<label class="attribute-label centered-input"> <label class="attribute-label centered-input">
<strong>{{localize 'l5r5e.social.honor'}}</strong> <strong>{{localize 'l5r5e.social.honor'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.data.social.honor}}" data-dtype="Number" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.data.social.honor}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
<label class="attribute-label centered-input"> <label class="attribute-label centered-input">
<strong>{{localize 'l5r5e.social.glory'}}</strong> <strong>{{localize 'l5r5e.social.glory'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.data.social.glory}}" data-dtype="Number" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.data.social.glory}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
<li> <li>
<label class="attribute-label centered-input"> <label class="attribute-label centered-input">
<strong>{{localize 'l5r5e.social.status'}}</strong> <strong>{{localize 'l5r5e.social.status'}}</strong>
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.data.social.status}}" data-dtype="Number" placeholder="0"/> <input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.data.social.status}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
</label> </label>
</li> </li>
</ul> </ul>

View File

@@ -4,7 +4,7 @@
<i>{{localize 'l5r5e.techniques.type'}}</i> <i>{{localize 'l5r5e.techniques.type'}}</i>
{{#each data.techniquesList as |technique|}} {{#each data.techniquesList as |technique|}}
<label> <label>
<input type="checkbox" name="data.techniques.{{technique.id}}" {{checked (lookup ../data.data.techniques technique.id)}} /> <input type="checkbox" name="data.techniques.{{technique.id}}" {{checked (lookup ../data.data.techniques technique.id)}} {{^if ../data.editable_not_soft_locked}}disabled{{/if}} />
{{technique.label}} {{technique.label}}
</label> </label>
{{/each}} {{/each}}
@@ -13,14 +13,14 @@
{{#each data.splitTechniquesList as |list technique|}} {{#each data.splitTechniquesList as |list technique|}}
<fieldset class="section-header flexrow"> <fieldset class="section-header flexrow">
<legend class="technique-controls"> <legend class="technique-controls">
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique) }} {{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
{{#ifCond ../options.editable '&&' (lookup ../data.data.techniques technique)}} {{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.data.techniques technique)}}
<a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/ifCond}} {{/ifCond}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each list as |item id|}} {{#each list as |item id|}}
{{> 'systems/l5r5e/templates/items/technique/technique-entry.html' technique=item editable=../../options.editable}} {{> 'systems/l5r5e/templates/items/technique/technique-entry.html' technique=item editable=../../data.editable_not_soft_locked}}
{{/each}} {{/each}}
</ul> </ul>
</fieldset> </fieldset>
@@ -29,14 +29,14 @@
<fieldset class="section-header flexrow"> <fieldset class="section-header flexrow">
<legend class="text-block-header"> <legend class="text-block-header">
{{localize 'l5r5e.advancements.signature_scroll' }} {{localize 'l5r5e.advancements.signature_scroll' }}
{{#if options.editable}} {{#if data.editable_not_soft_locked}}
<a data-item-type="signature_scroll" class="signature-scroll-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="signature_scroll" class="signature-scroll-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |scroll id|}} {{#each actor.items as |scroll id|}}
{{#ifCond scroll.data.type '==' 'signature_scroll'}} {{#ifCond scroll.data.type '==' 'signature_scroll'}}
{{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../options.editable}} {{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../data.editable_not_soft_locked}}
{{/ifCond}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>

View File

@@ -1,14 +1,14 @@
<fieldset class="armors-content"> <fieldset class="armors-content">
<legend class="section-header"> <legend class="section-header">
{{localize 'l5r5e.armors.title'}} {{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> <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}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |item id|}} {{#each actor.items as |item id|}}
{{#ifCond (ifCond item.type '==' 'armor') '&&' (ifCond item.data.data.equipped '==' true)}} {{#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}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </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> <li class="item-name l5r5e-tooltip" data-item-id="{{item._id}}">{{item.name}} <sub>x{{item.data.quantity}}</sub></li>
{{#if editable}} {{#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> <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-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> <li data-item-id="{{item._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
{{/if}}
{{/if}} {{/if}}
</ul> </ul>
<ul class="item-properties"> <ul class="item-properties">

View File

@@ -1,13 +1,13 @@
{{#each data.splitItemsList as |cat type|}} {{#each data.splitItemsList as |cat type|}}
<h3 class="toggle-on-click" data-toggle="inventory-item-list-{{type}}"> <h3 class="toggle-on-click" data-toggle="inventory-item-list-{{type}}">
{{localize (localize 'l5r5e.{type}s.title' type=type)}} ({{cat.length}}) {{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> <a data-item-type="{{type}}" class="item-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</h3> </h3>
<ul class="item-list inventory-item-list-{{type}}"> <ul class="item-list inventory-item-list-{{type}}">
{{#each cat as |item id|}} {{#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}} {{/each}}
</ul> </ul>
{{/each}} {{/each}}

View File

@@ -1,14 +1,14 @@
<fieldset class="weapons-content"> <fieldset class="weapons-content">
<legend class="section-header"> <legend class="section-header">
{{localize 'l5r5e.weapons.title'}} {{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> <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}} {{/if}}
</legend> </legend>
<ul class="item-list"> <ul class="item-list">
{{#each actor.items as |item id|}} {{#each actor.items as |item id|}}
{{#ifCond (ifCond item.type '==' 'weapon') '&&' (ifCond item.data.data.equipped '==' true)}} {{#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}} {{/ifCond}}
{{/each}} {{/each}}
</ul> </ul>