From 6e1c94b549a1019d43b195759536f686f822e11c Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Tue, 17 Oct 2023 14:50:31 -0700 Subject: [PATCH 1/2] fix: now displays variant stats properly --- src/module/app/party-sheet.js | 1 + src/module/theater-of-the-mind.js | 12 ++++++++++++ src/templates/party-sheet.hbs | 26 ++++++++++---------------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/module/app/party-sheet.js b/src/module/app/party-sheet.js index c876ee1..8d6ce50 100644 --- a/src/module/app/party-sheet.js +++ b/src/module/app/party-sheet.js @@ -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 = { diff --git a/src/module/theater-of-the-mind.js b/src/module/theater-of-the-mind.js index fbaff04..6ab0056 100644 --- a/src/module/theater-of-the-mind.js +++ b/src/module/theater-of-the-mind.js @@ -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() { diff --git a/src/templates/party-sheet.hbs b/src/templates/party-sheet.hbs index c3c21e3..86c9914 100644 --- a/src/templates/party-sheet.hbs +++ b/src/templates/party-sheet.hbs @@ -7,27 +7,21 @@ - - - - - - - - + {{#each players.1.stats}} + + {{/each}} + + - - - - - - - - + {{#each players.1.stats}} + + {{/each}} + + From fdb25fae9d12334405fd5e3dbe747949bba40a2b Mon Sep 17 00:00:00 2001 From: Eddie Dover Date: Tue, 17 Oct 2023 14:51:56 -0700 Subject: [PATCH 2/2] Updated changelog and version bump --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/module.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1cb7a..eb4ddf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index 90b5d30..188c25e 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/module.json b/src/module.json index 311da5c..effc4e0 100644 --- a/src/module.json +++ b/src/module.json @@ -37,7 +37,7 @@ "url": "https://github.com/eddiedover/" } ], - "version": "1.4.6", + "version": "1.4.7", "compatibility": { "minimum": "11", "verified": "11"
{{ localize "theater-of-the-mind.party-sheet.name" }}
{{ localize "theater-of-the-mind.party-sheet.race"}}
STRDEXCONINTWISCHAACInv{{toUpperCase @key}}ACInv {{localize "theater-of-the-mind.party-sheet.senses"}}
{{localize "theater-of-the-mind.party-sheet.classes"}}PerInsPerIns