Skip to content

Commit

Permalink
Merge pull request #19 from EddieDover/variants
Browse files Browse the repository at this point in the history
Fixes Variant Stats
  • Loading branch information
EddieDover authored Oct 17, 2023
2 parents 37cb4b1 + fdb25fa commit be2c111
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.4.7 (2023-10-17)

##### Bug Fixes

* now displays variant stats properly ([6e1c94b5]('https://github.com/EddieDover/theater-of-the-mind'/commit/6e1c94b549a1019d43b195759536f686f822e11c))

## 1.4.6 (2023-10-17)

##### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theater-of-the-mind",
"version": "1.4.6",
"version": "1.4.7",
"description": "A FoundryVTT module for DMs",
"main": "index.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"url": "https://github.com/eddiedover/"
}
],
"version": "1.4.6",
"version": "1.4.7",
"compatibility": {
"minimum": "11",
"verified": "11"
Expand Down
1 change: 1 addition & 0 deletions src/module/app/party-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class PartySheetForm extends FormApplication {
const userChar = character;
const userSys = userChar.system;
const stats = userSys.abilities;

const ac = userSys.attributes.ac.value;

const passives = {
Expand Down
12 changes: 12 additions & 0 deletions src/module/theater-of-the-mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ Handlebars.registerHelper("hcifgte", function (v1, v2, options) {
return options.inverse(this);
});

Handlebars.registerHelper("eachInMap", function (map, block) {
var out = "";
Object.keys(map).map(function (prop) {
out += block.fn({ key: prop, value: map[prop] });
});
return out;
});

Handlebars.registerHelper("toUpperCase", function (str) {
return str.toUpperCase();
});

let currentPartySheet = null;

function togglePartySheet() {
Expand Down
26 changes: 10 additions & 16 deletions src/templates/party-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,21 @@
<table id='totm-ps-table'>
<tr>
<th class="namerace"><div>{{ localize "theater-of-the-mind.party-sheet.name" }}</div><div>{{ localize "theater-of-the-mind.party-sheet.race"}}</div></th>
<th class="p-1">STR</th>
<th class="p-1">DEX</th>
<th class="p-1">CON</th>
<th class="p-1">INT</th>
<th class="p-1">WIS</th>
<th class="p-1">CHA</th>
<th>AC</th>
<th>Inv</th>
{{#each players.1.stats}}
<th class="p-1">{{toUpperCase @key}}</th>
{{/each}}
<th class="p-1">AC</th>
<th class="p-1" title="Passive Investigation">Inv</th>
<th>{{localize "theater-of-the-mind.party-sheet.senses"}}</th>
</tr>

<tr>
<th>{{localize "theater-of-the-mind.party-sheet.classes"}}</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th class="p-1">Per</th>
<th class="p-1">Ins</th>
{{#each players.1.stats}}
<th class="p-1"></th>
{{/each}}
<th class="p-1" title="Passive Perception">Per</th>
<th class="p-1" title="Passive Insight">Ins</th>
<th></th>
</tr>

Expand Down

0 comments on commit be2c111

Please sign in to comment.