diff --git a/system/scripts/actors/base-character-sheet.js b/system/scripts/actors/base-character-sheet.js index 897f67b..eee548e 100644 --- a/system/scripts/actors/base-character-sheet.js +++ b/system/scripts/actors/base-character-sheet.js @@ -31,6 +31,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e { // Split Items by types 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; } diff --git a/system/template.json b/system/template.json index 5be8476..1601767 100644 --- a/system/template.json +++ b/system/template.json @@ -2,6 +2,9 @@ "Actor": { "types": ["character", "npc", "army"], "templates": { + "softlock": { + "soft_locked": false + }, "identity": { "identity": { "clan": "", @@ -115,7 +118,7 @@ } }, "character": { - "templates": ["identity", "rings", "social", "skills", "techniques", "conflict", "advancement"], + "templates": ["softlock", "identity", "rings", "social", "skills", "techniques", "conflict", "advancement"], "template": "core", "twenty_questions": {}, "zeni": 0 diff --git a/system/templates/actors/character-sheet.html b/system/templates/actors/character-sheet.html index 53ae5eb..09ca450 100644 --- a/system/templates/actors/character-sheet.html +++ b/system/templates/actors/character-sheet.html @@ -3,7 +3,7 @@
-

+

{{> 'systems/l5r5e/templates/actors/character/identity.html'}}
@@ -29,7 +29,7 @@
    {{#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}}
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}} diff --git a/system/templates/actors/character/category.html b/system/templates/actors/character/category.html index 249c4e0..599ec82 100644 --- a/system/templates/actors/character/category.html +++ b/system/templates/actors/character/category.html @@ -2,7 +2,7 @@

{{localizeSkill categoryId 'title'}}

    {{#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}}
    diff --git a/system/templates/actors/character/identity.html b/system/templates/actors/character/identity.html index 4c340fa..c8029a5 100644 --- a/system/templates/actors/character/identity.html +++ b/system/templates/actors/character/identity.html @@ -6,7 +6,7 @@ {{else}} {{localize 'l5r5e.clan'}} {{/ifCond}} - +
  • @@ -16,25 +16,25 @@ {{else}} {{localize 'l5r5e.family'}} {{/ifCond}} - +
\ No newline at end of file diff --git a/system/templates/actors/character/inventory.html b/system/templates/actors/character/inventory.html index 2801e26..b007242 100644 --- a/system/templates/actors/character/inventory.html +++ b/system/templates/actors/character/inventory.html @@ -2,7 +2,7 @@ {{localize 'l5r5e.money.title'}}
@@ -33,14 +33,14 @@
{{localize 'l5r5e.social.advantages'}} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}} @@ -49,14 +49,14 @@
{{localize 'l5r5e.social.disadvantages'}} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}}
    {{#each actor.items as |item id|}} {{#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}} {{/each}}
@@ -65,14 +65,14 @@
{{localize 'l5r5e.social.bonds' }} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}}
    {{#each actor.items as |bond id|}} {{#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}} {{/each}}
diff --git a/system/templates/actors/character/rings.html b/system/templates/actors/character/rings.html index d4556a0..aa74a24 100644 --- a/system/templates/actors/character/rings.html +++ b/system/templates/actors/character/rings.html @@ -3,35 +3,35 @@
  • \ No newline at end of file diff --git a/system/templates/actors/character/skill.html b/system/templates/actors/character/skill.html index 5fdcde3..1c276f1 100644 --- a/system/templates/actors/character/skill.html +++ b/system/templates/actors/character/skill.html @@ -10,6 +10,7 @@ min="0" max="9" placeholder="0" + {{^if data.editable_not_soft_locked}}disabled{{/if}} /> diff --git a/system/templates/actors/character/social.html b/system/templates/actors/character/social.html index ddf35cc..eb6050a 100644 --- a/system/templates/actors/character/social.html +++ b/system/templates/actors/character/social.html @@ -2,19 +2,19 @@
  • \ No newline at end of file diff --git a/system/templates/actors/character/techniques.html b/system/templates/actors/character/techniques.html index a246039..40ed7e6 100644 --- a/system/templates/actors/character/techniques.html +++ b/system/templates/actors/character/techniques.html @@ -4,7 +4,7 @@ {{localize 'l5r5e.techniques.type'}} {{#each data.techniquesList as |technique|}} {{/each}} @@ -13,14 +13,14 @@ {{#each data.splitTechniquesList as |list technique|}}
    - {{localize (localize 'l5r5e.techniques.{technique}' technique=technique) }} - {{#ifCond ../options.editable '&&' (lookup ../data.data.techniques technique)}} + {{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}} + {{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.data.techniques technique)}} {{/ifCond}}
      {{#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}}
    @@ -29,14 +29,14 @@
    {{localize 'l5r5e.advancements.signature_scroll' }} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}}
      {{#each actor.items as |scroll id|}} {{#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}} {{/each}}
    diff --git a/system/templates/items/armor/armors.html b/system/templates/items/armor/armors.html index 068611a..7b61431 100644 --- a/system/templates/items/armor/armors.html +++ b/system/templates/items/armor/armors.html @@ -1,14 +1,14 @@
    {{localize 'l5r5e.armors.title'}} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}}
      {{#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}}
    diff --git a/system/templates/items/item/item-entry.html b/system/templates/items/item/item-entry.html index 713b0f3..3af5b6c 100644 --- a/system/templates/items/item/item-entry.html +++ b/system/templates/items/item/item-entry.html @@ -4,8 +4,10 @@
  • {{item.name}} x{{item.data.quantity}}
  • {{#if editable}}
  • + {{^if soft_locked}}
  • + {{/if}} {{/if}}
      diff --git a/system/templates/items/item/items.html b/system/templates/items/item/items.html index 99c10d0..910f187 100644 --- a/system/templates/items/item/items.html +++ b/system/templates/items/item/items.html @@ -1,13 +1,13 @@ {{#each data.splitItemsList as |cat type|}}

      {{localize (localize 'l5r5e.{type}s.title' type=type)}} ({{cat.length}}) - {{#if ../options.editable}} + {{#if ../data.editable_not_soft_locked}} {{/if}}

        {{#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}} \ No newline at end of file diff --git a/system/templates/items/weapon/weapons.html b/system/templates/items/weapon/weapons.html index f352256..99c71e5 100644 --- a/system/templates/items/weapon/weapons.html +++ b/system/templates/items/weapon/weapons.html @@ -1,14 +1,14 @@
      {{localize 'l5r5e.weapons.title'}} - {{#if options.editable}} + {{#if data.editable_not_soft_locked}} {{/if}}
        {{#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}}