Release 0.5.1
- Closes #49 - Fixes "eq" handlebars helper - Version incremented - Minor fixes
This commit is contained in:
parent
66aef6e05b
commit
b1eea14ec4
8 changed files with 42 additions and 43 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="item-block flex-horizontal">
|
||||
<div class="item-class-label"><a class="item-add-popup" data-distinct="true" data-item-type="heritage">Heritage</a></div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "heritage"}}
|
||||
{{#if (eq item.type "heritage")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -21,14 +21,14 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="item-block flex-horizontal">
|
||||
<div class="item-class-label"><a class="item-add-popup" data-distinct="true" data-item-type="background">Background</a></div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "background"}}
|
||||
{{#if (eq item.type "background")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -36,14 +36,14 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="item-block flex-horizontal">
|
||||
<div class="item-class-label"><a class="item-add-popup" data-distinct="true" data-item-type="vice">Vice</a></div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "vice"}}
|
||||
{{#if (eq item.type "vice")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -51,14 +51,14 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="item-block flex-horizontal">
|
||||
<div class="item-class-label"><a class="item-add-popup" data-distinct="true" data-item-type="class">Class</a></div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "class"}}
|
||||
{{#if (eq item.type "class")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
|
@ -292,7 +292,7 @@
|
|||
|
||||
<div id="abilities-list">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "ability"}}
|
||||
{{#if (eq item.type "ability")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<b><div class="item-name">{{item.name}}</div></b>
|
||||
|
@ -300,7 +300,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="item-class-label"><a class="item-add-popup" data-item-type="ability">Add Ability</a></div>
|
||||
</div>
|
||||
|
@ -314,7 +314,7 @@
|
|||
</div>
|
||||
<div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "item"}}
|
||||
{{#if (eq item.type "item")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -323,7 +323,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="item-class-label"><a class="item-add-popup" data-item-type="item">Add Item</a></div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<a class="item-add-popup" data-distinct="true" data-item-type="crew_reputation">Crew Reputation</a>
|
||||
</div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_reputation"}}
|
||||
{{#if (eq item.type "crew_reputation")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body item-sheet-open flex-horizontal">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -204,10 +204,10 @@
|
|||
|
||||
<div id="crew-class" class="class-name">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_type"}}
|
||||
{{#if (eq item.type "crew_type")}}
|
||||
<div class="big-name">{{item.name}}</div>
|
||||
<div class="big-description">{{item.data.description}}</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<nav class="tabs flex-horizontal">
|
||||
|
@ -236,9 +236,9 @@
|
|||
<div class="experience-clues-description">At the end of each session, for each item below, mark 1 xp (or instead mark 2xp if that item occurred multiple times).</div>
|
||||
<div class="experience-clues">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_type"}}
|
||||
{{#if (eq item.type "crew_type")}}
|
||||
{{html text=item.data.experience_clues}}
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -255,11 +255,11 @@
|
|||
<p><label>Turfs</label></p>
|
||||
</div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_type"}}
|
||||
{{#if (eq item.type "crew_type")}}
|
||||
<div class="item" data-item-id="{{item._id}}">
|
||||
{{> "systems/blades-in-the-dark/templates/parts/turf-list.html" turfs_data=item.data.turfs can_edit=false}}
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
|
@ -271,7 +271,7 @@
|
|||
<p><a class="item-add-popup" data-item-type="crew_upgrade"><i class="fas fa-plus-square"></i></a></p>
|
||||
</div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_upgrade"}}
|
||||
{{#if (eq item.type "crew_upgrade")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body item-sheet-open flex-horizontal">
|
||||
<b><div class="item-name">{{item.name}}</div></b>
|
||||
|
@ -279,7 +279,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
|
@ -290,7 +290,7 @@
|
|||
<p><a class="item-add-popup" data-item-type="crew_ability"><i class="fas fa-plus-square"></i></a></p>
|
||||
</div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "crew_ability"}}
|
||||
{{#if (eq item.type "crew_ability")}}
|
||||
<div class="item flex-horizontal" data-item-id="{{item._id}}">
|
||||
<div class="item-body item-sheet-open flex-horizontal">
|
||||
<b><div class="item-name">{{item.name}}</div></b>
|
||||
|
@ -298,7 +298,7 @@
|
|||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
|
@ -310,11 +310,11 @@
|
|||
</div>
|
||||
<div class="cohorts flex-horizontal">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "cohort"}}
|
||||
{{#if (eq item.type "cohort")}}
|
||||
|
||||
{{> "systems/blades-in-the-dark/templates/parts/cohort-block.html" item=item}}
|
||||
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</section>
|
||||
|
||||
<section id="gang-expert-type-selector" class="flex-vertical">
|
||||
{{#eq data.cohort.[0] "Gang"}}
|
||||
{{#if (eq data.cohort.[0] "Gang")}}
|
||||
|
||||
<div class="label-stripe">Gang Type</div>
|
||||
<div id="gang-type-boxes" class="flex-horizontal">
|
||||
|
@ -53,12 +53,12 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
|
||||
{{#eq data.cohort.[0] "Expert"}}
|
||||
{{#if (eq data.cohort.[0] "Expert")}}
|
||||
<div class="label-stripe">Expert Type</div>
|
||||
<input type="text" name="data.expert_type" value="{{../data.expert_type}}">
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
</section>
|
||||
|
||||
{{!-- Scale and Quality if attached to Actor --}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="cohort-block">
|
||||
<div class="label-stripe">
|
||||
<div class="item-sheet-open">{{#eq item.data.cohort.[0] "Gang"}}Gang of {{#each ../item.data.gang_type as |gang_type key|}}{{gang_type}} {{/each}}{{/eq}}{{#eq item.data.cohort.[0] "Expert"}}{{../item.data.cohort.[0]}} {{../item.data.expert_type}}{{/eq}} (click to edit)</div>
|
||||
<div class="item-sheet-open">{{#if (eq item.data.cohort.[0] "Gang")}}Gang of {{#each ../item.data.gang_type as |gang_type key|}}{{gang_type}} {{/each}}{{/if}}{{#if (eq item.data.cohort.[0] "Expert")}}{{../item.data.cohort.[0]}} {{../item.data.expert_type}}{{/if}} (click to edit)</div>
|
||||
<div>Q:{{item.data.quality}} S:{{item.data.scale}}</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
|
@ -17,13 +17,13 @@
|
|||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{#eq item.data.cohort.[0] "Gang"}}
|
||||
{{#if (eq item.data.cohort.[0] "Gang")}}
|
||||
{{#each ../item.data.gang_type as |gang_type key|}}
|
||||
<div>
|
||||
{{#with (lookup ../../item.data.gang_type_list gang_type)}}{{description}} {{/with}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
|
||||
<div class="flex-vertical">
|
||||
<div class="flex-vertical">
|
||||
|
|
|
@ -34,15 +34,17 @@
|
|||
{{#if turf.description}}
|
||||
<p class="turf-description">{{turf.description}}</p>
|
||||
{{/if}}
|
||||
{{#noteq id "8"}}
|
||||
<a class="turf-control turf-select" title="Select" data-turf-id="{{id}}" data-turf-status="{{turf.value}}"><i class="fas fa-circle"></i></a>
|
||||
{{/noteq}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#eq id "5"}}
|
||||
{{#if (eq id "5")}}
|
||||
</div><div class="turf-row">
|
||||
{{/eq}}
|
||||
{{#eq id "10"}}
|
||||
{{/if}}
|
||||
{{#if (eq id "10")}}
|
||||
</div><div class="turf-row">
|
||||
{{/eq}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue