From b1eea14ec4845d6e565ce51cbf84cc966936664f Mon Sep 17 00:00:00 2001 From: megastruktur Date: Mon, 18 May 2020 16:59:47 +0300 Subject: [PATCH] Release 0.5.1 - Closes #49 - Fixes "eq" handlebars helper - Version incremented - Minor fixes --- module/blades.js | 3 --- module/crew-sheet.js | 2 +- system.json | 4 ++-- templates/actor-sheet.html | 24 ++++++++++++------------ templates/crew-sheet.html | 28 ++++++++++++++-------------- templates/items/cohort.html | 8 ++++---- templates/parts/cohort-block.html | 6 +++--- templates/parts/turf-list.html | 10 ++++++---- 8 files changed, 42 insertions(+), 43 deletions(-) diff --git a/module/blades.js b/module/blades.js index ea7a11a..8dc46f9 100644 --- a/module/blades.js +++ b/module/blades.js @@ -63,9 +63,6 @@ Hooks.once("init", async function() { }); // Equals handlebar. - Handlebars.registerHelper('eq', (a, b, options) => { - return (a === b) ? options.fn(this) : ''; - }); // NotEquals handlebar. Handlebars.registerHelper('noteq', (a, b, options) => { diff --git a/module/crew-sheet.js b/module/crew-sheet.js index c1ec1d1..4292fa5 100644 --- a/module/crew-sheet.js +++ b/module/crew-sheet.js @@ -117,7 +117,7 @@ export class BladesCrewSheet extends BladesSheet { // Update the Item super._updateObject(event, formData); - if (event.target.name === "data.tier") { + if (event.target && event.target.name === "data.tier") { this.render(true); } } diff --git a/system.json b/system.json index b1de4d3..62f9157 100644 --- a/system.json +++ b/system.json @@ -2,9 +2,9 @@ "name": "blades-in-the-dark", "title": "Blades in the Dark", "description": "Blades in the dark game system.", - "version": 0.5, + "version": "0.5.1", "minimumCoreVersion": "0.5.3", - "compatibleCoreVersion": "0.5.5", + "compatibleCoreVersion": "0.5.7", "templateVersion": 1, "author": "megastruktur", "esmodules": ["module/blades.js"], diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index de8647f..04ff48d 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -13,7 +13,7 @@
{{#each actor.items as |item id|}} - {{#eq item.type "heritage"}} + {{#if (eq item.type "heritage")}}
@@ -21,14 +21,14 @@
- {{/eq}} + {{/if}} {{/each}}
{{#each actor.items as |item id|}} - {{#eq item.type "background"}} + {{#if (eq item.type "background")}}
@@ -36,14 +36,14 @@
- {{/eq}} + {{/if}} {{/each}}
{{#each actor.items as |item id|}} - {{#eq item.type "vice"}} + {{#if (eq item.type "vice")}}
@@ -51,14 +51,14 @@
- {{/eq}} + {{/if}} {{/each}}
{{#each actor.items as |item id|}} - {{#eq item.type "class"}} + {{#if (eq item.type "class")}}
@@ -66,7 +66,7 @@
- {{/eq}} + {{/if}} {{/each}}
@@ -292,7 +292,7 @@
{{#each actor.items as |item id|}} - {{#eq item.type "ability"}} + {{#if (eq item.type "ability")}}
{{item.name}}
@@ -300,7 +300,7 @@
- {{/eq}} + {{/if}} {{/each}}
@@ -314,7 +314,7 @@
{{#each actor.items as |item id|}} - {{#eq item.type "item"}} + {{#if (eq item.type "item")}}
@@ -323,7 +323,7 @@
- {{/eq}} + {{/if}} {{/each}}
diff --git a/templates/crew-sheet.html b/templates/crew-sheet.html index aa9f1a1..1ddc902 100644 --- a/templates/crew-sheet.html +++ b/templates/crew-sheet.html @@ -13,7 +13,7 @@ Crew Reputation {{#each actor.items as |item id|}} - {{#eq item.type "crew_reputation"}} + {{#if (eq item.type "crew_reputation")}}
@@ -21,7 +21,7 @@
- {{/eq}} + {{/if}} {{/each}} @@ -204,10 +204,10 @@
{{#each actor.items as |item id|}} - {{#eq item.type "crew_type"}} + {{#if (eq item.type "crew_type")}}
{{item.name}}
{{item.data.description}}
- {{/eq}} + {{/if}} {{/each}}