Skip to content

Commit

Permalink
fix: Hardcode dex for skill rolls (really, start of support for choic…
Browse files Browse the repository at this point in the history
…e of characteristic for skill rolls)
  • Loading branch information
xdy committed Aug 16, 2020
1 parent d5c9742 commit 2749a29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/module/handlebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function registerHandlebarsHelpers():void {
});

Handlebars.registerHelper('shouldShowSkill', function(skill, hideUntrainedSkills) {
console.log('shouldShowSkill', skill, hideUntrainedSkills)
// console.log('shouldShowSkill', skill, hideUntrainedSkills)
return skill.trained || hideUntrainedSkills
});

Expand Down
18 changes: 10 additions & 8 deletions static/templates/actors/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@

<label for="data.skills.{{key}}.value" class="flex3 resource-label skill-{{skill.trained}}">{{skill.label}}</label>

<span><select class="skill-stat" name="characteristic">
<option value="data.characteristics.strength.mod">{{data.strength.shortlabel}}</option>
<option value="data.characteristics.dexterity.mod">{{data.dexterity.shortlabel}}</option>
<option value="data.characteristics.endurance.mod">{{data.endurance.shortlabel}}</option>
<option value="data.characteristics.intellect.mod">{{data.intellect.shortlabel}}</option>
<option value="data.characteristics.education.mod">{{data.education.shortlabel}}</option>
<option value="data.characteristics.social.mod">{{data.social.shortlabel}}</option>
<span><select disabled class="skill-stat" name="characteristic">
<option value="data.characteristics.dexterity.mod">{{../data.characteristics.dexterity.shortlabel}}</option>
<option value="data.characteristics.strength.mod">{{../data.characteristics.strength.shortlabel}}</option>
<option value="data.characteristics.endurance.mod">{{../data.characteristics.endurance.shortlabel}}</option>
<option value="data.characteristics.intellect.mod">{{../data.characteristics.intellect.shortlabel}}</option>
<option value="data.characteristics.education.mod">{{../data.characteristics.education.shortlabel}}</option>
<option value="data.characteristics.social.mod">{{../data.characteristics.social.shortlabel}}</option>
<option value="data.characteristics.psionics.mod">{{../data.characteristics.psionics.shortlabel}}</option>
</select></span>

<span class="skill-arrows flex1">
Expand All @@ -127,9 +128,10 @@
</span>


<!-- TODO Hardcoded dexterity for now, but it should get the value from the dropdown. Also moved dexterity to the top and disabled the select to make it seem less strange. :) -->
<span class="skill-output" trainable="true" trained="{{skill.trained}}" class="flex1 skill-mod rollable"
data-label="{{skill.label}}">{{numberFormat (getSkillValueWithJoat skill @root.data.jackofalltrades) decimals=0 sign=true}}
<img class="rollable" data-roll="2d6+@skills.{{key}}.value+@characteristics.{{key}}.mod" src="./systems/twodsix/assets/d6-icon.svg"/>
<img class="rollable" data-roll="2d6+@skills.{{key}}.value+@characteristics.dexterity.mod" src="./systems/twodsix/assets/d6-icon.svg"/>
</span>


Expand Down

0 comments on commit 2749a29

Please sign in to comment.