skip counting some entries
This commit is contained in:
parent
c9d1bab31f
commit
958f0decc9
3 changed files with 72 additions and 14 deletions
43
build/app.js
43
build/app.js
|
|
@ -446,16 +446,47 @@ function CheckExtendedCompletion(db) {
|
|||
}
|
||||
|
||||
if (entries[entry].hasOwnProperty("icon")) {
|
||||
if (entries[entry].icon !== "none") {
|
||||
intro.extendedCompletionTotal++;
|
||||
}
|
||||
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++;
|
||||
}
|
||||
|
||||
if (entries[entry].icon === "green") {
|
||||
intro.extendedCompletionDone++;
|
||||
}
|
||||
|
||||
if (entries[entry].icon === "green") {
|
||||
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
|
|
@ -531,16 +531,43 @@ function CheckExtendedCompletion(db) {
|
|||
|
||||
if (entries[entry].hasOwnProperty("icon")) {
|
||||
|
||||
if (entries[entry].icon !== "none") {
|
||||
intro.extendedCompletionTotal++;
|
||||
}
|
||||
|
||||
if (entries[entry].icon === "green") {
|
||||
intro.extendedCompletionDone++;
|
||||
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++;
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue