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
@@ -216,5 +216,12 @@ export const registerHandlebarsHelpers = function () {
.map(function(num) { return options.fn(num); })
.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",
"title": "Vermine 2047",
"description": "The Vermine 2047 system for FoundryVTT!",
"version": "0.1.6",
"version": "0.1.7",
"compatibility": {
"minimum": "10",
"verified": "10.287",
+7 -8
View File
@@ -15,21 +15,20 @@
<h4 class="item-name effect-name flexrow">{{ localize "VERMINE.wounds.name"}}</h4>
<ul class="unstyled">
<li class="row mdb">{{ localize 'VERMINE.wounds.light'}} ({{ system.minorWound.threshold }})
{{#range system.minorWound.max }}
<input type="radio" name="system.minorWound.value" value="{{this}}" {{#if (eq @root.system.minorWound.value this) }}checked="checked"{{/if}} />
{{#range system.minorWound.max }}
<input type="radio" data-dtype="Number" name="system.minorWound.value" value="{{this}}" {{#ife @root.system.minorWound.value this }}checked="checked"{{/ife}} />
{{/range}}</li>
<li class="row mdb">{{ localize 'VERMINE.wounds.heavy'}} ({{ system.majorWound.threshold }})
{{#range system.majorWound.max }}
<input type="radio" name="system.majorWound.value" value="{{this}}" {{#if (eq @root.system.majorWound.value this) }}checked{{/if}} />
{{#range system.majorWound.max }}
<input type="radio" name="system.majorWound.value" value="{{this}}" {{#ife @root.system.majorWound.value this }}checked="checked"{{/ife}} />
{{/range}}
</li>
<li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}} ({{ system.deadlyWound.threshold }})
{{#range system.deadlyWound.max }}
<input type="radio" name="system.deadlyWound.value" value="{{this}}" {{#if (eq @root.system.deadlyWound.value this) }}checked{{/if}} />
{{#range system.deadlyWound.max }}
<input type="radio" name="system.deadlyWound.value" value="{{this}}" {{#ife @root.system.deadlyWound.value this }}checked="checked"{{/ife}} />
{{/range}}
</li>
</l>
</ul>
<h4 class="item-name effect-name flexrow">{{ localize "UI.effects.name"}}</h4>
<ol class="items-list effects-list">
{{#each effects as |section sid|}}