skip counting some entries

This commit is contained in:
ReznoRMichael 2021-07-30 00:15:31 +02:00
parent c9d1bab31f
commit 958f0decc9
3 changed files with 72 additions and 14 deletions

View file

@ -446,6 +446,24 @@ function CheckExtendedCompletion(db) {
}
if (entries[entry].hasOwnProperty("icon")) {
switch (entry) {
/* Do not add these to total and done (they will be added as amount/max later instead) */
case "grubsCollected":
case "grubRewards":
case "stationsOpened":
case "areaMaps":
case "journalEntriesCompleted":
case "journalNotesCompleted":
case "whisperingRoots":
case "relicsWandererJournal":
case "relicsHallownestSeal":
case "relicsKingsIdol":
case "relicsArcaneEgg":
case "whiteDefenderDefeats":
case "greyPrinceDefeats":
break;
default:
if (entries[entry].icon !== "none") {
intro.extendedCompletionTotal++;
}
@ -454,8 +472,21 @@ function CheckExtendedCompletion(db) {
intro.extendedCompletionDone++;
}
}
/* Skip disabled entries entirely from counting */
if (entries[entry].hasOwnProperty("disabled") && entries[entry].disabled === true) {
/* Do not substract a point for WD/GPZ Defeats nr if they were not added to Total in the first place */
if (entry === "greyPrinceDefeats" || entry === "whiteDefenderDefeats") {
break;
}
intro.extendedCompletionTotal--;
if (entry === "greyPrinceDefeats" || entry === "whiteDefenderDefeats") {
console.log(entry);
}
} else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) {
/* Skip counting 3000 Fountain Geo, too much */
if (entry === "fountainGeo") {
@ -472,7 +503,7 @@ function CheckExtendedCompletion(db) {
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info("Adding amount/max: ".concat(amount, "/").concat(max), entries[entry].name);
console.info("".concat(entry, ": ").concat(amount, "/").concat(max), entries[entry].name);
amount = 0;
max = 0;
}

File diff suppressed because one or more lines are too long

View file

@ -531,6 +531,26 @@ function CheckExtendedCompletion(db) {
if (entries[entry].hasOwnProperty("icon")) {
switch (entry) {
/* Do not add these to total and done (they will be added as amount/max later instead) */
case "grubsCollected":
case "grubRewards":
case "stationsOpened":
case "areaMaps":
case "journalEntriesCompleted":
case "journalNotesCompleted":
case "whisperingRoots":
case "relicsWandererJournal":
case "relicsHallownestSeal":
case "relicsKingsIdol":
case "relicsArcaneEgg":
case "whiteDefenderDefeats":
case "greyPrinceDefeats":
break;
default:
if (entries[entry].icon !== "none") {
intro.extendedCompletionTotal++;
}
@ -538,9 +558,16 @@ function CheckExtendedCompletion(db) {
if (entries[entry].icon === "green") {
intro.extendedCompletionDone++;
}
}
/* Skip disabled entries entirely from counting (substract a point from Total) */
if (entries[entry].hasOwnProperty("disabled") && entries[entry].disabled === true) {
/* Do not substract a point for WD/GPZ Defeats nr if they were not added to Total in the first place */
if (entry === "greyPrinceDefeats" || entry === "whiteDefenderDefeats") {
break;
}
intro.extendedCompletionTotal--;
}
else if (entries[entry].hasOwnProperty("amount") && entries[entry].hasOwnProperty("max")) {
@ -561,7 +588,7 @@ function CheckExtendedCompletion(db) {
intro.extendedCompletionDone += amount;
intro.extendedCompletionTotal += max;
console.info(`Adding amount/max: ${amount}/${max}`, entries[entry].name);
console.info(`${entry}: ${amount}/${max}`, entries[entry].name);
amount = 0;
max = 0;