corrected Hunter's Journal algorithm

This commit is contained in:
ReznoRMichael 2022-02-19 22:37:56 +01:00
parent 701a1112d4
commit e558e621e3
3 changed files with 21 additions and 22 deletions

View file

@ -1855,23 +1855,22 @@ function CheckHuntersJournal(db, sectionName, playerData) {
} }
amountKillsLeft = playerData["kills".concat(entry)]; amountKillsLeft = playerData["kills".concat(entry)];
/* When killed at least 1, the entry has a gray symbol */
if (playerData["killed".concat(entry)] === true) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconPartialJournal)(section, entry);
/* When not killed, the entry is undiscovered */
} else {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(section, entry);
}
/* When the Hunter's Note is unlocked, the entry has a green symbol */ /* When the Hunter's Note is unlocked, the entry has a green symbol */
if (amountKillsLeft === 0) { if (amountKillsLeft === 0) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconGreen)(section, entry); (0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconGreen)(section, entry);
/* If not, show how many remain to defeat in the name */ /* If not, show how many remain to defeat in the name */
} else { } else {
name += " (".concat(amountKillsLeft, ")"); name += " (".concat(amountKillsLeft, ")");
entries[entry].name = name; entries[entry].name = name;
/* When killed at least 1, the entry has a gray symbol */
if (playerData["killed".concat(entry)] === true) {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconPartialJournal)(section, entry);
/* When not killed, the entry is undiscovered */
} else {
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(section, entry);
}
} }
/* Void Idol backwards compatibility */ /* Void Idol backwards compatibility */

File diff suppressed because one or more lines are too long

View file

@ -2073,27 +2073,27 @@ function CheckHuntersJournal(db, sectionName, playerData) {
amountKillsLeft = playerData[`kills${entry}`]; amountKillsLeft = playerData[`kills${entry}`];
/* When killed at least 1, the entry has a gray symbol */
if (playerData[`killed${entry}`] === true) {
SetIconPartialJournal(section, entry);
/* When not killed, the entry is undiscovered */
} else {
SetIconRed(section, entry);
}
/* When the Hunter's Note is unlocked, the entry has a green symbol */ /* When the Hunter's Note is unlocked, the entry has a green symbol */
if (amountKillsLeft === 0) { if (amountKillsLeft === 0) {
SetIconGreen(section, entry); SetIconGreen(section, entry);
/* If not, show how many remain to defeat in the name */ /* If not, show how many remain to defeat in the name */
} else { } else {
name += ` (${amountKillsLeft})`; name += ` (${amountKillsLeft})`;
entries[entry].name = name; entries[entry].name = name;
/* When killed at least 1, the entry has a gray symbol */
if (playerData[`killed${entry}`] === true) {
SetIconPartialJournal(section, entry);
/* When not killed, the entry is undiscovered */
} else {
SetIconRed(section, entry);
}
} }
/* Void Idol backwards compatibility */ /* Void Idol backwards compatibility */