Fix Treasure Bug

Fixed #32.
master
The Happy Anarchist 2020-10-24 23:00:09 -10:00
parent c3b1dd3ce1
commit 72cf7cc910
2 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,11 @@ export const registerHelpers = async function () {
});
Handlebars.registerHelper("multround", function (lh, rh) {
return Math.round((parseFloat(lh) * parseFloat(rh)) * 100) / 100;
return Math.round(parseFloat(lh) * parseFloat(rh) * 100) / 100;
})
Handlebars.registerHelper("roundTreas", function (value) {
return Math.round(value * 100) / 100;
})
Handlebars.registerHelper("roundWeight", function (weight) {

View File

@ -155,7 +155,7 @@
<li class="item-titles flexrow">
<div class="item-caret"><i class="fas fa-caret-down"></i></div>
<div class="item-name">{{localize "ACKS.items.Treasure"}}</div>
<div class="field-long">{{data.treasure}} <i class="fas fa-circle"></i></div>
<div class="field-long">{{roundTreas data.treasure}} <i class="fas fa-circle"></i></div>
<div class="field-short"><i class="fas fa-hashtag"></i></div>
<div class="field-short"><i class="fas fa-weight-hanging"></i></div>
<div class="item-controls">