fix npc dice roll, and with category id instead of skill id

This commit is contained in:
Vlyan
2020-12-18 23:25:00 +01:00
parent b152018607
commit d3bcfba723
8 changed files with 47 additions and 21 deletions

View File

@@ -1,7 +1,6 @@
<li class="skill skill-wrapper" data-skill="{{skillId}}">
<label class="skill-content">
<span class="skill-name attribute-label rollable">{{ localizeSkill categoryId skillId }}</span>
<input type="text" name="data.skills.{{categoryId}}.{{skillId}}.value" value="{{skill.value}}" data-dtype="Number" placeholder="0"/>
<input type="text" name="data.skills.{{categoryId}}.{{skillId}}" value="{{skill}}" data-dtype="Number" placeholder="0"/>
</label>
<!-- Roll button -->
</li>

View File

@@ -1,10 +1,10 @@
<ul class="npc-skill">{{!-- Skills --}}
{{#each data.skills as |skillValue skillCatId|}}
<li>
<label>
<li class="skill skill-wrapper" data-skillcat="{{skillCatId}}">
<label for="skill_{{skillCatId}}" class="skill-name">
{{localizeSkill skillCatId "title"}}
<input type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
</label>
<input id="skill_{{skillCatId}}" type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
</li>
{{/each}}
</ul>

View File

@@ -19,7 +19,11 @@
</span>
<span class="chat-profil-element-skill">
{{#if l5r5e.skillId}}{{localizeSkillId l5r5e.skillId}}{{/if}}
{{#if l5r5e.skillId}}
{{localizeSkillId l5r5e.skillId}}
{{else}}
{{#if l5r5e.skillCatId}}{{localizeSkill l5r5e.skillCatId 'title'}}{{/if}}
{{/if}}
</span>
<span class="chat-profil-element">

View File

@@ -30,7 +30,11 @@
</div>
<label class="attribute-value checkbox">
<input type="checkbox" name="data.equipped" {{checked item.data.equipped}} />
equipped
equipped / sheathed (rengainée)
</label>
<label class="attribute-value checkbox">
<input type="checkbox" name="data.readied" {{checked item.data.readied}} />
readied (apprêté)
</label>
</div>