display amounts

This commit is contained in:
ReznoRMichael 2021-07-08 10:39:17 +02:00
commit d3055983de
4 changed files with 23 additions and 3 deletions

View file

@ -817,9 +817,11 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
}
countTotal = amount;
dataObject[i].amount = amount;
if (i === "journalEntriesCompleted" || i === "journalNotesCompleted") {
countTotal = `${amount} / ${playerData.journalEntriesTotal}`;
dataObject[i].amountTotal = playerData.journalEntriesTotal;
}
if (i === "grubsCollected") {

View file

@ -437,6 +437,14 @@ function SingleEntryFill(section, entry) {
span = ["<span class='spoiler-span'>", "</span>"];
spoiler = ["<span class='spoiler-text'>", "</span>"];
if (entry.hasOwnProperty("amount")) {
textPrefix += `: ${entry.amount}`;
}
if (entry.hasOwnProperty("amountTotal")) {
textPrefix += ` / ${entry.amountTotal}`;
}
if (textSuffix.length && textPrefix.length) textSuffix = `— ${textSuffix}`;
if (textPrefix.includes("<del>")) textSuffix = `<del>${textSuffix}</del>`;