Add customizable rolls to items

This commit is contained in:
mstein
2022-07-23 18:50:08 +02:00
parent 58ed9d7d74
commit b3e2771e91
24 changed files with 361 additions and 155 deletions
@@ -43,6 +43,9 @@
</tr>
</tbody>
</table>
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>
+22
View File
@@ -0,0 +1,22 @@
<table class="rolls-table">
<thead>
<tr>
<th class="col-enabled"></th>
<th class="col-label">{{localize "midgard5.label"}}</th>
<th class="col-formula">{{localize "midgard5.formula"}}</th>
<th class="col-delete"><button class="roll-create">+</button></th>
</tr>
</thead>
<tbody>
{{#each data.rolls.formulas as |roll rollIndex|}}
{{#if roll}}
<tr data-roll="{{rollIndex}}">
<td><input type="checkbox" name="data.rolls.formulas.{{rollIndex}}.enabled" {{checked roll.enabled}} /></td>
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.label" value="{{roll.label}}" data-dtype="String" /></td>
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.formula" value="{{roll.formula}}" data-dtype="String" /></td>
<td class="fixed-value"><a class="roll-delete" title="Delete Roll"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
+2
View File
@@ -29,6 +29,8 @@
</tbody>
</table>
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>
+3
View File
@@ -62,6 +62,9 @@
</tr>
</tbody>
</table>
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>
+4 -1
View File
@@ -48,7 +48,7 @@
{{/select}}
</select>
{{else}}
<span>Assign item to character to select weapon skill</span>
<span>{{localize "midgard5.assignItemToCharacter"}}</span>
{{/if}}
</td>
</tr>
@@ -60,6 +60,9 @@
</tr>
</tbody>
</table>
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>