This commit is contained in:
François-Xavier Guillois
2023-09-05 16:07:04 +02:00
parent 848366e05c
commit 3ceac1194e
3 changed files with 15 additions and 9 deletions
+7
View File
@@ -217,4 +217,11 @@ export const registerHandlebarsHelpers = function () {
.join(''); .join('');
}); });
// return age type information
Handlebars.registerHelper('ife', function(arg1, arg2, options) {
return (arg1 == arg2) ? options.fn(this) : options.inverse(this);
});
} }
+1 -1
View File
@@ -2,7 +2,7 @@
"id": "vermine2047", "id": "vermine2047",
"title": "Vermine 2047", "title": "Vermine 2047",
"description": "The Vermine 2047 system for FoundryVTT!", "description": "The Vermine 2047 system for FoundryVTT!",
"version": "0.1.6", "version": "0.1.7",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10.287", "verified": "10.287",
+4 -5
View File
@@ -16,20 +16,19 @@
<ul class="unstyled"> <ul class="unstyled">
<li class="row mdb">{{ localize 'VERMINE.wounds.light'}} ({{ system.minorWound.threshold }}) <li class="row mdb">{{ localize 'VERMINE.wounds.light'}} ({{ system.minorWound.threshold }})
{{#range system.minorWound.max }} {{#range system.minorWound.max }}
<input type="radio" name="system.minorWound.value" value="{{this}}" {{#if (eq @root.system.minorWound.value this) }}checked="checked"{{/if}} /> <input type="radio" data-dtype="Number" name="system.minorWound.value" value="{{this}}" {{#ife @root.system.minorWound.value this }}checked="checked"{{/ife}} />
{{/range}}</li> {{/range}}</li>
<li class="row mdb">{{ localize 'VERMINE.wounds.heavy'}} ({{ system.majorWound.threshold }}) <li class="row mdb">{{ localize 'VERMINE.wounds.heavy'}} ({{ system.majorWound.threshold }})
{{#range system.majorWound.max }} {{#range system.majorWound.max }}
<input type="radio" name="system.majorWound.value" value="{{this}}" {{#if (eq @root.system.majorWound.value this) }}checked{{/if}} /> <input type="radio" name="system.majorWound.value" value="{{this}}" {{#ife @root.system.majorWound.value this }}checked="checked"{{/ife}} />
{{/range}} {{/range}}
</li> </li>
<li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}} ({{ system.deadlyWound.threshold }}) <li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}} ({{ system.deadlyWound.threshold }})
{{#range system.deadlyWound.max }} {{#range system.deadlyWound.max }}
<input type="radio" name="system.deadlyWound.value" value="{{this}}" {{#if (eq @root.system.deadlyWound.value this) }}checked{{/if}} /> <input type="radio" name="system.deadlyWound.value" value="{{this}}" {{#ife @root.system.deadlyWound.value this }}checked="checked"{{/ife}} />
{{/range}} {{/range}}
</li> </li>
</ul>
</l>
<h4 class="item-name effect-name flexrow">{{ localize "UI.effects.name"}}</h4> <h4 class="item-name effect-name flexrow">{{ localize "UI.effects.name"}}</h4>
<ol class="items-list effects-list"> <ol class="items-list effects-list">
{{#each effects as |section sid|}} {{#each effects as |section sid|}}