Add currency to character sheet
Changes: + add fields to track currency + show value of standard items
This commit is contained in:
parent
a5336faa94
commit
e73720f8cf
|
|
@ -91,6 +91,10 @@
|
||||||
"midgard5.origin": "Heimat",
|
"midgard5.origin": "Heimat",
|
||||||
"midgard5.faith": "Glaube",
|
"midgard5.faith": "Glaube",
|
||||||
|
|
||||||
|
"midgard5.currency-gold": "Gold",
|
||||||
|
"midgard5.currency-silver": "Silber",
|
||||||
|
"midgard5.currency-copper": "Kupfer",
|
||||||
|
|
||||||
"midgard5.exp-overall": "Erfahrungsschatz",
|
"midgard5.exp-overall": "Erfahrungsschatz",
|
||||||
"midgard5.exp-available": "Erfahrungspunkte",
|
"midgard5.exp-available": "Erfahrungspunkte",
|
||||||
"midgard5.grace": "Göttliche Gnade",
|
"midgard5.grace": "Göttliche Gnade",
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,8 @@ export class M5Character extends Actor {
|
||||||
magic: item.system.magic,
|
magic: item.system.magic,
|
||||||
calc: item.system.calc,
|
calc: item.system.calc,
|
||||||
equipped: item.system?.equipped,
|
equipped: item.system?.equipped,
|
||||||
|
value: item.system.value || 0,
|
||||||
|
currency: item.system.currency || "",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,10 @@
|
||||||
"caste": "",
|
"caste": "",
|
||||||
"occupation": "",
|
"occupation": "",
|
||||||
"origin": "",
|
"origin": "",
|
||||||
"faith": ""
|
"faith": "",
|
||||||
|
"gold": 0,
|
||||||
|
"silver": 0,
|
||||||
|
"copper": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"characterBars": {
|
"characterBars": {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.currency-gold"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.currency-silver"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.currency-copper"}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.gold" value="{{data.info.gold}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.silver" value="{{data.info.silver}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.copper" value="{{data.info.copper}}"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -106,10 +123,12 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
||||||
|
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||||
<th class="title"></th>
|
<th class="title"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
</tr>
|
||||||
{{#each data.calc.gear.items as |item itemId|}}
|
{{#each data.calc.gear.items as |item itemId|}}
|
||||||
<tr data-item="{{itemId}}">
|
<tr data-item="{{itemId}}">
|
||||||
<td class="padding">
|
<td class="padding">
|
||||||
|
|
@ -118,6 +137,11 @@
|
||||||
<span class="spell-process">{{localize "midgard5.equipped"}}</span>
|
<span class="spell-process">{{localize "midgard5.equipped"}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
|
||||||
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,15 @@
|
||||||
<td>
|
<td>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span>{{localize "midgard5.item-value"}}</span>
|
<span>{{localize "midgard5.item-value"}}</span>
|
||||||
<input name="data.value" type="text" value="{{data.value}}" data-dtype="Number" />
|
<input name="data.value" type="number" value="{{data.value}}" data-dtype="Number" />
|
||||||
|
<select class="select-mod-operation" name="data.currency" data-type="String">
|
||||||
|
{{#select data.currency}}
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="copper">{{localize "midgard5.currency-copper"}}</option>
|
||||||
|
<option value="silver">{{localize "midgard5.currency-silver"}}</option>
|
||||||
|
<option value="gold">{{localize "midgard5.currency-gold"}}</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue