set proper icons in database
This commit is contained in:
parent
e504017962
commit
bc79c3f8d3
3 changed files with 157 additions and 148 deletions
199
build/app.js
199
build/app.js
|
|
@ -221,7 +221,9 @@ function CurrentDataTrue() {
|
||||||
|
|
||||||
|
|
||||||
function CurrentDataFalse() {
|
function CurrentDataFalse() {
|
||||||
completionSymbol = SYMBOL_FALSE;
|
var section = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||||
|
var entry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
||||||
|
section.entries[entry].icon = "red";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Switches global variable to an "information" symbol
|
* Switches global variable to an "information" symbol
|
||||||
|
|
@ -237,7 +239,9 @@ function CurrentDataFalse() {
|
||||||
|
|
||||||
|
|
||||||
function CurrentDataBlank() {
|
function CurrentDataBlank() {
|
||||||
completionSymbol = SYMBOL_EMPTY;
|
var section = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||||
|
var entry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
||||||
|
section.entries[entry].icon = "none";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fills HTML with the playTime value of the save file
|
* Fills HTML with the playTime value of the save file
|
||||||
|
|
@ -281,9 +285,10 @@ function CheckCompletionPercent(section, completionPercentage) {
|
||||||
|
|
||||||
function CheckSaveFileVersion(section) {
|
function CheckSaveFileVersion(section) {
|
||||||
var saveVersion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _hk_database_js__WEBPACK_IMPORTED_MODULE_0__.default.sections.intro.entries.saveVersion.spoiler;
|
var saveVersion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _hk_database_js__WEBPACK_IMPORTED_MODULE_0__.default.sections.intro.entries.saveVersion.spoiler;
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, section.entries.saveVersion.id);
|
||||||
section.entries.saveVersion.spoiler = "".concat(saveVersion);
|
section.entries.saveVersion.spoiler = "".concat(saveVersion);
|
||||||
var textFill = "Save Version:".concat(pSpan, "<b>").concat(saveVersion, "</b>").concat(pSpan); // document.getElementById(section.id).innerHTML += divStart + completionSymbol + textFill + divEnd;
|
/* let textFill = `Save Version:${pSpan}<b>${saveVersion}</b>${pSpan}`; */
|
||||||
|
// document.getElementById(section.id).innerHTML += divStart + completionSymbol + textFill + divEnd;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fills HTML with appropriate number of health mask images
|
* Fills HTML with appropriate number of health mask images
|
||||||
|
|
@ -428,7 +433,7 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case "gotCharm_36":
|
case "gotCharm_36":
|
||||||
// prevents green checkbox and adding 1% when only got one white fragment
|
// prevents green checkbox and adding 1% when only got one white fragment
|
||||||
playerData.gotQueenFragment === true && playerData.gotKingFragment === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.gotQueenFragment === true && playerData.gotKingFragment === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "gotCharm_37":
|
case "gotCharm_37":
|
||||||
|
|
@ -441,17 +446,17 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
case "hasGodfinder":
|
case "hasGodfinder":
|
||||||
// fades out the entries if save file is from older game versions
|
// fades out the entries if save file is from older game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i === "grimmChildLevel") {
|
if (i === "grimmChildLevel") {
|
||||||
playerData.grimmChildLevel >= 4 ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.grimmChildLevel >= 4 ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "bossGruzMother":
|
case "bossGruzMother":
|
||||||
|
|
@ -472,7 +477,7 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
case "vesselFragmentCityOfTears":
|
case "vesselFragmentCityOfTears":
|
||||||
case "vesselFragmentDeepnest":
|
case "vesselFragmentDeepnest":
|
||||||
case "vesselFragmentFountain":
|
case "vesselFragmentFountain":
|
||||||
WorldDataActivated(dataObject[i].id, dataObject[i].sceneName, worldData) ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
WorldDataActivated(dataObject[i].id, dataObject[i].sceneName, worldData) ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "pantheonMaster":
|
case "pantheonMaster":
|
||||||
|
|
@ -482,20 +487,20 @@ function CheckIfDataTrue(section, dataObject, playerData) {
|
||||||
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
||||||
|
|
||||||
if (checkText === "PropertyNotFound") {
|
if (checkText === "PropertyNotFound") {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (checkText === "PantheonCompleted") {
|
} else if (checkText === "PantheonCompleted") {
|
||||||
CurrentDataTrue(section, i);
|
CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki);
|
sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki);
|
||||||
|
|
@ -517,19 +522,19 @@ function CheckSpellLevel(section, dataObject, playerData) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case "vengefulSpirit":
|
case "vengefulSpirit":
|
||||||
case "shadeSoul":
|
case "shadeSoul":
|
||||||
playerData.fireballLevel >= dataObject[i].fireballLevel ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.fireballLevel >= dataObject[i].fireballLevel ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "desolateDive":
|
case "desolateDive":
|
||||||
case "descendingDark":
|
case "descendingDark":
|
||||||
playerData.quakeLevel >= dataObject[i].quakeLevel ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.quakeLevel >= dataObject[i].quakeLevel ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "howlingWraiths":
|
case "howlingWraiths":
|
||||||
case "abyssShriek":
|
case "abyssShriek":
|
||||||
playerData.screamLevel >= dataObject[i].screamLevel ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.screamLevel >= dataObject[i].screamLevel ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -551,7 +556,7 @@ function CheckWarriorDreams(section, dataObject, playerData) {
|
||||||
var sFillText = "";
|
var sFillText = "";
|
||||||
|
|
||||||
for (var i in dataObject) {
|
for (var i in dataObject) {
|
||||||
playerData[i] >= 2 ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] >= 2 ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
} // AppendHTML(section, sFillText);
|
} // AppendHTML(section, sFillText);
|
||||||
|
|
||||||
|
|
@ -589,7 +594,7 @@ function CheckNailUpgrades(section, dataObject, playerData) {
|
||||||
var sFillText = "";
|
var sFillText = "";
|
||||||
|
|
||||||
for (var i = 0; i < 5; i++) {
|
for (var i = 0; i < 5; i++) {
|
||||||
playerData.nailSmithUpgrades >= i ? CurrentDataTrue(section, nail[i]) : CurrentDataFalse();
|
playerData.nailSmithUpgrades >= i ? CurrentDataTrue(section, nail[i]) : CurrentDataFalse(section, nail[i]);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[nail[i]].name, dataObject[nail[i]].spoiler, dataObject[nail[i]].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[nail[i]].name, dataObject[nail[i]].spoiler, dataObject[nail[i]].wiki);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -624,33 +629,35 @@ function WorldDataActivated(idText, sceneNameText, worldData) {
|
||||||
* @param {object} worldData Reference/pointer to specific data where to search
|
* @param {object} worldData Reference/pointer to specific data where to search
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* function CheckWorldDataTrue(section, idText, dataObject, worldData) {
|
||||||
|
let orderedArray = [];
|
||||||
|
let size = ObjectLength(dataObject);
|
||||||
|
let sFillText = "";
|
||||||
|
|
||||||
function CheckWorldDataTrue(section, idText, dataObject, worldData) {
|
// Order the items before displaying them (creates a copy of dataObject)
|
||||||
var orderedArray = [];
|
for (let i in dataObject) {
|
||||||
var size = (0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.ObjectLength)(dataObject);
|
orderedArray.push([i, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki, false]);
|
||||||
var sFillText = ""; // Order the items before displaying them (creates a copy of dataObject)
|
|
||||||
|
|
||||||
for (var i in dataObject) {
|
|
||||||
orderedArray.push([i, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki, false]);
|
|
||||||
} // Search for completed items and mark them for display
|
|
||||||
|
|
||||||
|
|
||||||
for (var _i3 = 0, length = worldData.length; _i3 < length; _i3++) {
|
|
||||||
for (var j = 0; j < size; j++) {
|
|
||||||
if (worldData[_i3].id === idText && worldData[_i3].sceneName === orderedArray[j][0] && worldData[_i3].activated === true) {
|
|
||||||
orderedArray[j][4] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} // Display the items as they were initially ordered
|
|
||||||
|
|
||||||
|
// Search for completed items and mark them for display
|
||||||
|
for (let i = 0, length = worldData.length; i < length; i++) {
|
||||||
|
for (let j = 0; j < size; j++) {
|
||||||
|
if (worldData[i].id === idText && worldData[i].sceneName === orderedArray[j][0] && worldData[i].activated === true) {
|
||||||
|
orderedArray[j][4] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (var _i4 = 0; _i4 < size; _i4++) {
|
// Display the items as they were initially ordered
|
||||||
CurrentDataFalse();
|
for (let i = 0; i < size; i++) {
|
||||||
if (orderedArray[_i4][4] === true) CurrentDataTrue(section);
|
CurrentDataFalse();
|
||||||
sFillText += PrepareHTMLString(section, orderedArray[_i4][1], orderedArray[_i4][2], orderedArray[_i4][3]);
|
if (orderedArray[i][4] === true) CurrentDataTrue(section);
|
||||||
} // AppendHTML(section, sFillText);
|
sFillText += PrepareHTMLString(section, orderedArray[i][1], orderedArray[i][2], orderedArray[i][3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// AppendHTML(section, sFillText);
|
||||||
|
} */
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Verifies if the data in a specific object are true or false, or checks what values they have, and appends HTML accordingly.
|
* Verifies if the data in a specific object are true or false, or checks what values they have, and appends HTML accordingly.
|
||||||
* @param {object} section ID of the HTML element for data appending
|
* @param {object} section ID of the HTML element for data appending
|
||||||
|
|
@ -726,7 +733,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
if (i === "greyPrinceDefeats") {
|
if (i === "greyPrinceDefeats") {
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
||||||
|
|
@ -737,13 +744,13 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
if (i === "whiteDefenderDefeats") {
|
if (i === "whiteDefenderDefeats") {
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
amount >= dataObject[i].max ? CurrentDataTrue(section, i) : CurrentDataBlank();
|
amount >= dataObject[i].max ? CurrentDataTrue(section, i) : CurrentDataBlank(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "geoPool":
|
case "geoPool":
|
||||||
|
|
@ -751,12 +758,12 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "jinnEggsSold":
|
case "jinnEggsSold":
|
||||||
case "xunFlowerBrokeTimes":
|
case "xunFlowerBrokeTimes":
|
||||||
textPrefix += ": " + Math.abs(playerData[i]);
|
textPrefix += ": " + Math.abs(playerData[i]);
|
||||||
i === "geoPool" && playerData[i] > 0 ? CurrentDataBlank() : CurrentDataTrue(section, i);
|
i === "geoPool" && playerData[i] > 0 ? CurrentDataBlank(section, i) : CurrentDataTrue(section, i);
|
||||||
|
|
||||||
if (i === "jinnEggsSold") {
|
if (i === "jinnEggsSold") {
|
||||||
// fade out if not on Steel Soul
|
// fade out if not on Steel Soul
|
||||||
if (playerData.permadeathMode < 1) {
|
if (playerData.permadeathMode < 1) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -781,20 +788,20 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "shopkeeperKey":
|
case "shopkeeperKey":
|
||||||
playerData.hasSlykey === true || playerData.gaveSlykey === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.hasSlykey === true || playerData.gaveSlykey === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "elegantKey":
|
case "elegantKey":
|
||||||
playerData.hasWhiteKey === true || playerData.usedWhiteKey === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.hasWhiteKey === true || playerData.usedWhiteKey === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "loveKey":
|
case "loveKey":
|
||||||
playerData.hasLoveKey === true || playerData.openedLoveDoor === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.hasLoveKey === true || playerData.openedLoveDoor === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "paleOreSeer":
|
case "paleOreSeer":
|
||||||
// #2
|
// #2
|
||||||
playerData.dreamReward3 === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData.dreamReward3 === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* -------------------- Interactables ------------------------------- */
|
/* -------------------- Interactables ------------------------------- */
|
||||||
|
|
@ -819,7 +826,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "mantisVillageFloorLever":
|
case "mantisVillageFloorLever":
|
||||||
case "pathOfPainEntrance":
|
case "pathOfPainEntrance":
|
||||||
case "whiteLadyRoom":
|
case "whiteLadyRoom":
|
||||||
FindWorldItem(dataObject[i].id, dataObject[i].sceneName) ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
FindWorldItem(dataObject[i].id, dataObject[i].sceneName) ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "relicsWandererJournal":
|
case "relicsWandererJournal":
|
||||||
|
|
@ -827,72 +834,72 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "relicsKingsIdol":
|
case "relicsKingsIdol":
|
||||||
case "relicsArcaneEgg":
|
case "relicsArcaneEgg":
|
||||||
total = playerData[dataObject[i].nameHeld] + playerData[dataObject[i].nameSold];
|
total = playerData[dataObject[i].nameHeld] + playerData[dataObject[i].nameSold];
|
||||||
total >= dataObject[i].max ? CurrentDataTrue(section, i) : CurrentDataBlank();
|
total >= dataObject[i].max ? CurrentDataTrue(section, i) : CurrentDataBlank(section, i);
|
||||||
textPrefix += ": " + total;
|
textPrefix += ": " + total;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "bossDoorStateTier5":
|
case "bossDoorStateTier5":
|
||||||
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
} else {
|
} else {
|
||||||
playerData[i].completed === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i].completed === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killsBindingSeal":
|
case "killsBindingSeal":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData[i] == 0 ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] == 0 ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killsBigBuzzer":
|
case "killsBigBuzzer":
|
||||||
playerData[i] == 0 ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] == 0 ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killedVoidIdol_1":
|
case "killedVoidIdol_1":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
if (playerData[i] === false && (playerData.killedVoidIdol_2 === true || playerData.killedVoidIdol_3 === true)) CurrentDataTrue(section, i);
|
if (playerData[i] === false && (playerData.killedVoidIdol_2 === true || playerData.killedVoidIdol_3 === true)) CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killedVoidIdol_2":
|
case "killedVoidIdol_2":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse();
|
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataFalse(section, i);
|
||||||
if (playerData[i] === false && playerData.killedVoidIdol_3 === true) CurrentDataTrue(section, i);
|
if (playerData[i] === false && playerData.killedVoidIdol_3 === true) CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "greyPrinceDefeated":
|
case "greyPrinceDefeated":
|
||||||
// compatibility with earlier game versions
|
// compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
} else if (playerData.zoteDead === true || playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true) {
|
||||||
textPrefix = "<del>".concat(textPrefix, "</del>");
|
textPrefix = "<del>".concat(textPrefix, "</del>");
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataBlank();
|
playerData[i] === true ? CurrentDataTrue(section, i) : CurrentDataBlank(section, i);
|
||||||
if (playerData.zoteRescuedBuzzer === true && playerData[i] === false) CurrentDataFalse();
|
if (playerData.zoteRescuedBuzzer === true && playerData[i] === false) CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "zoteStatus":
|
case "zoteStatus":
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
|
|
||||||
if (playerData.zoteDead === true) {
|
if (playerData.zoteDead === true) {
|
||||||
textPrefix = dataObject[i].nameNeglect;
|
textPrefix = dataObject[i].nameNeglect;
|
||||||
|
|
@ -925,7 +932,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "nailsmithStatus":
|
case "nailsmithStatus":
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
|
|
||||||
if (playerData.nailsmithKilled === true) {
|
if (playerData.nailsmithKilled === true) {
|
||||||
textPrefix = dataObject[i].namePurity;
|
textPrefix = dataObject[i].namePurity;
|
||||||
|
|
@ -958,13 +965,13 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
default:
|
default:
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
textPrefix = "<del>".concat(dataObject[i].name, "</del>");
|
||||||
break;
|
break;
|
||||||
} else if (playerData[i] === true) {
|
} else if (playerData[i] === true) {
|
||||||
CurrentDataTrue(section, i);
|
CurrentDataTrue(section, i);
|
||||||
} else {
|
} else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end switch (i)
|
} // end switch (i)
|
||||||
|
|
@ -988,8 +995,8 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
var idText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
var idText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
||||||
var sceneNameText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
var sceneNameText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
||||||
|
|
||||||
for (var _i5 = 0, length = worldData.length; _i5 < length; _i5++) {
|
for (var _i3 = 0, length = worldData.length; _i3 < length; _i3++) {
|
||||||
if (worldData[_i5].id === idText && worldData[_i5].sceneName === sceneNameText && worldData[_i5].activated === true) {
|
if (worldData[_i3].id === idText && worldData[_i3].sceneName === sceneNameText && worldData[_i3].activated === true) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1007,9 +1014,9 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
var itemId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
var itemId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
|
||||||
for (var _i6 = 0, length = worldData.length; _i6 < length; _i6++) {
|
for (var _i4 = 0, length = worldData.length; _i4 < length; _i4++) {
|
||||||
if (worldData[_i6].id === itemId) {
|
if (worldData[_i4].id === itemId) {
|
||||||
if (worldData[_i6].activated === true) total++;
|
if (worldData[_i4].activated === true) total++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1025,8 +1032,8 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
function CountMaps(mapArray) {
|
function CountMaps(mapArray) {
|
||||||
var totalMaps = 0;
|
var totalMaps = 0;
|
||||||
|
|
||||||
for (var _i7 = 0, len = mapArray.length; _i7 < len; _i7++) {
|
for (var _i5 = 0, len = mapArray.length; _i5 < len; _i5++) {
|
||||||
if (playerData[mapArray[_i7]] === true) totalMaps++;
|
if (playerData[mapArray[_i5]] === true) totalMaps++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return totalMaps;
|
return totalMaps;
|
||||||
|
|
@ -1044,10 +1051,10 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
var geoRocksLog = [];
|
var geoRocksLog = [];
|
||||||
|
|
||||||
if (mode === "unbroken") {
|
if (mode === "unbroken") {
|
||||||
for (var _i8 = 0; _i8 < arrayLength; _i8++) {
|
for (var _i6 = 0; _i6 < arrayLength; _i6++) {
|
||||||
if (sceneData.geoRocks[_i8].hitsLeft > 0) {
|
if (sceneData.geoRocks[_i6].hitsLeft > 0) {
|
||||||
countTotal++;
|
countTotal++;
|
||||||
geoRocksLog.push("#".concat(countTotal, " \uD83C\uDFD4\uFE0F ").concat(sceneData.geoRocks[_i8].id, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(sceneData.geoRocks[_i8].sceneName), " \u2328\uFE0F ").concat(sceneData.geoRocks[_i8].sceneName));
|
geoRocksLog.push("#".concat(countTotal, " \uD83C\uDFD4\uFE0F ").concat(sceneData.geoRocks[_i6].id, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(sceneData.geoRocks[_i6].sceneName), " \u2328\uFE0F ").concat(sceneData.geoRocks[_i6].sceneName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1056,15 +1063,15 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
} else {
|
} else {
|
||||||
console.groupCollapsed("%cUnbroken Geo Rocks (".concat(countTotal, "):"), "color: #16c60c; font-weight: 700;");
|
console.groupCollapsed("%cUnbroken Geo Rocks (".concat(countTotal, "):"), "color: #16c60c; font-weight: 700;");
|
||||||
|
|
||||||
for (var _i9 = 0, length = geoRocksLog.length; _i9 < length; _i9++) {
|
for (var _i7 = 0, length = geoRocksLog.length; _i7 < length; _i7++) {
|
||||||
console.log(geoRocksLog[_i9]);
|
console.log(geoRocksLog[_i7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (var _i10 = 0; _i10 < arrayLength; _i10++) {
|
for (var _i8 = 0; _i8 < arrayLength; _i8++) {
|
||||||
if (sceneData.geoRocks[_i10].hitsLeft === 0) countTotal++;
|
if (sceneData.geoRocks[_i8].hitsLeft === 0) countTotal++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1083,10 +1090,10 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
var itemsLog = [];
|
var itemsLog = [];
|
||||||
|
|
||||||
if (mode === "notActivated") {
|
if (mode === "notActivated") {
|
||||||
for (var _i11 = 0; _i11 < arrayLength; _i11++) {
|
for (var _i9 = 0; _i9 < arrayLength; _i9++) {
|
||||||
if (worldData[_i11].activated === false && worldData[_i11].semiPersistent === false) {
|
if (worldData[_i9].activated === false && worldData[_i9].semiPersistent === false) {
|
||||||
countTotal++;
|
countTotal++;
|
||||||
itemsLog.push("#".concat(countTotal, " ").concat(worldData[_i11].id, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(worldData[_i11].sceneName), " \u2328\uFE0F ").concat(worldData[_i11].sceneName));
|
itemsLog.push("#".concat(countTotal, " ").concat(worldData[_i9].id, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(worldData[_i9].sceneName), " \u2328\uFE0F ").concat(worldData[_i9].sceneName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1095,15 +1102,15 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
} else {
|
} else {
|
||||||
console.groupCollapsed("%cNot Activated Interactables (".concat(countTotal, "):"), "color: #16c60c; font-weight: 700;");
|
console.groupCollapsed("%cNot Activated Interactables (".concat(countTotal, "):"), "color: #16c60c; font-weight: 700;");
|
||||||
|
|
||||||
for (var _i12 = 0, length = itemsLog.length; _i12 < length; _i12++) {
|
for (var _i10 = 0, length = itemsLog.length; _i10 < length; _i10++) {
|
||||||
console.log(itemsLog[_i12]);
|
console.log(itemsLog[_i10]);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (var _i13 = 0; _i13 < arrayLength; _i13++) {
|
for (var _i11 = 0; _i11 < arrayLength; _i11++) {
|
||||||
if (worldData[_i13].activated === true) countTotal++;
|
if (worldData[_i11].activated === true) countTotal++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1117,9 +1124,9 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
function LogMissingGrubs() {
|
function LogMissingGrubs() {
|
||||||
var rescuedGrubsSceneList = [];
|
var rescuedGrubsSceneList = [];
|
||||||
|
|
||||||
for (var _i14 = 0, _length = worldData.length; _i14 < _length; _i14++) {
|
for (var _i12 = 0, _length = worldData.length; _i12 < _length; _i12++) {
|
||||||
if (worldData[_i14].id.includes("Grub Bottle")) {
|
if (worldData[_i12].id.includes("Grub Bottle")) {
|
||||||
if (worldData[_i14].activated === true) {
|
if (worldData[_i12].activated === true) {
|
||||||
// There are 3 duplicates of the same map scene name from older game save files. Prevents adding duplicates
|
// There are 3 duplicates of the same map scene name from older game save files. Prevents adding duplicates
|
||||||
|
|
||||||
/* if (worldData[i].sceneName === "Ruins2_11" && worldData[i].id === "Grub Bottle (1)") {
|
/* if (worldData[i].sceneName === "Ruins2_11" && worldData[i].id === "Grub Bottle (1)") {
|
||||||
|
|
@ -1127,7 +1134,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
} else if (worldData[i].sceneName === "Ruins2_11" && worldData[i].id === "Grub Bottle (2)") {
|
} else if (worldData[i].sceneName === "Ruins2_11" && worldData[i].id === "Grub Bottle (2)") {
|
||||||
continue;
|
continue;
|
||||||
} else { */
|
} else { */
|
||||||
rescuedGrubsSceneList.push(worldData[_i14].sceneName); // }
|
rescuedGrubsSceneList.push(worldData[_i12].sceneName); // }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Filtering the reference database Grub list to include only the missing values
|
} // Filtering the reference database Grub list to include only the missing values
|
||||||
|
|
@ -1143,8 +1150,8 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
} else {
|
} else {
|
||||||
console.groupCollapsed("%cUnrescued Grubs (".concat(length, "):"), "color: #16c60c; font-weight: 700;");
|
console.groupCollapsed("%cUnrescued Grubs (".concat(length, "):"), "color: #16c60c; font-weight: 700;");
|
||||||
|
|
||||||
for (var _i15 = 0; _i15 < length; _i15++) {
|
for (var _i13 = 0; _i13 < length; _i13++) {
|
||||||
console.log("#".concat(section.grubsList.indexOf(missingGrubsList[_i15]) + 1, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(missingGrubsList[_i15]), " \u2328\uFE0F ").concat(missingGrubsList[_i15]));
|
console.log("#".concat(section.grubsList.indexOf(missingGrubsList[_i13]) + 1, " \uD83D\uDDFA\uFE0F ").concat((0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.TranslateMapName)(missingGrubsList[_i13]), " \u2328\uFE0F ").concat(missingGrubsList[_i13]));
|
||||||
}
|
}
|
||||||
|
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
|
|
@ -1167,7 +1174,7 @@ function CheckMrMushroomState(section, entry) {
|
||||||
if (mrMushroomState >= entry.state) {
|
if (mrMushroomState >= entry.state) {
|
||||||
CurrentDataTrue(section, "mrMushroomState".concat(entry.state));
|
CurrentDataTrue(section, "mrMushroomState".concat(entry.state));
|
||||||
} else {
|
} else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, "mrMushroomState".concat(entry.state));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -1281,8 +1288,8 @@ function HKReadTextArea() {
|
||||||
|
|
||||||
|
|
||||||
function InitialHTMLPopulate(db) {
|
function InitialHTMLPopulate(db) {
|
||||||
var sFillText = "";
|
/* let sFillText = "";
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(); */
|
||||||
(0,_page_functions_js__WEBPACK_IMPORTED_MODULE_1__.GenerateInnerHTML)(db); // PrefillHTML(sections);
|
(0,_page_functions_js__WEBPACK_IMPORTED_MODULE_1__.GenerateInnerHTML)(db); // PrefillHTML(sections);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -293,8 +293,9 @@ function CurrentDataTrue(section = {}, entry = "") {
|
||||||
/**
|
/**
|
||||||
* Switches global variable to a "not completed" symbol
|
* Switches global variable to a "not completed" symbol
|
||||||
*/
|
*/
|
||||||
function CurrentDataFalse() {
|
function CurrentDataFalse(section = {}, entry = "") {
|
||||||
completionSymbol = SYMBOL_FALSE;
|
|
||||||
|
section.entries[entry].icon = "red";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -307,8 +308,9 @@ function CurrentDataFalse() {
|
||||||
/**
|
/**
|
||||||
* Switches global variable to no symbol (span with left padding)
|
* Switches global variable to no symbol (span with left padding)
|
||||||
*/
|
*/
|
||||||
function CurrentDataBlank() {
|
function CurrentDataBlank(section = {}, entry = "") {
|
||||||
completionSymbol = SYMBOL_EMPTY;
|
|
||||||
|
section.entries[entry].icon = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -360,11 +362,11 @@ function CheckCompletionPercent(section, completionPercentage) {
|
||||||
*/
|
*/
|
||||||
function CheckSaveFileVersion(section, saveVersion = HK.sections.intro.entries.saveVersion.spoiler) {
|
function CheckSaveFileVersion(section, saveVersion = HK.sections.intro.entries.saveVersion.spoiler) {
|
||||||
|
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, section.entries.saveVersion.id);
|
||||||
|
|
||||||
section.entries.saveVersion.spoiler = `${saveVersion}`;
|
section.entries.saveVersion.spoiler = `${saveVersion}`;
|
||||||
|
|
||||||
let textFill = `Save Version:${pSpan}<b>${saveVersion}</b>${pSpan}`;
|
/* let textFill = `Save Version:${pSpan}<b>${saveVersion}</b>${pSpan}`; */
|
||||||
// document.getElementById(section.id).innerHTML += divStart + completionSymbol + textFill + divEnd;
|
// document.getElementById(section.id).innerHTML += divStart + completionSymbol + textFill + divEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -522,7 +524,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case "gotCharm_36":
|
case "gotCharm_36":
|
||||||
// prevents green checkbox and adding 1% when only got one white fragment
|
// prevents green checkbox and adding 1% when only got one white fragment
|
||||||
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "gotCharm_37":
|
case "gotCharm_37":
|
||||||
|
|
@ -535,15 +537,15 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
case "hasGodfinder":
|
case "hasGodfinder":
|
||||||
// fades out the entries if save file is from older game versions
|
// fades out the entries if save file is from older game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i === "grimmChildLevel") {
|
if (i === "grimmChildLevel") {
|
||||||
(playerData.grimmChildLevel >= 4) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.grimmChildLevel >= 4) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "bossGruzMother":
|
case "bossGruzMother":
|
||||||
|
|
@ -564,7 +566,7 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
case "vesselFragmentCityOfTears":
|
case "vesselFragmentCityOfTears":
|
||||||
case "vesselFragmentDeepnest":
|
case "vesselFragmentDeepnest":
|
||||||
case "vesselFragmentFountain":
|
case "vesselFragmentFountain":
|
||||||
(WorldDataActivated(dataObject[i].id, dataObject[i].sceneName, worldData)) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(WorldDataActivated(dataObject[i].id, dataObject[i].sceneName, worldData)) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "pantheonMaster":
|
case "pantheonMaster":
|
||||||
|
|
@ -573,19 +575,19 @@ function CheckIfDataTrue(section, dataObject, playerData, worldData = []) {
|
||||||
case "pantheonKnight":
|
case "pantheonKnight":
|
||||||
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
checkText = CheckGodmasterDoors(dataObject[i], playerData);
|
||||||
if (checkText === "PropertyNotFound") {
|
if (checkText === "PropertyNotFound") {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (checkText === "PantheonCompleted") {
|
} else if (checkText === "PantheonCompleted") {
|
||||||
CurrentDataTrue(section, i);
|
CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki);
|
sFillText += PrepareHTMLString(section, textPrefix, textSuffix, wiki);
|
||||||
|
|
@ -608,17 +610,17 @@ function CheckSpellLevel(section, dataObject, playerData) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case "vengefulSpirit":
|
case "vengefulSpirit":
|
||||||
case "shadeSoul":
|
case "shadeSoul":
|
||||||
(playerData.fireballLevel >= dataObject[i].fireballLevel) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.fireballLevel >= dataObject[i].fireballLevel) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
case "desolateDive":
|
case "desolateDive":
|
||||||
case "descendingDark":
|
case "descendingDark":
|
||||||
(playerData.quakeLevel >= dataObject[i].quakeLevel) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.quakeLevel >= dataObject[i].quakeLevel) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
case "howlingWraiths":
|
case "howlingWraiths":
|
||||||
case "abyssShriek":
|
case "abyssShriek":
|
||||||
(playerData.screamLevel >= dataObject[i].screamLevel) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.screamLevel >= dataObject[i].screamLevel) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -640,7 +642,7 @@ function CheckWarriorDreams(section, dataObject, playerData) {
|
||||||
let sFillText = "";
|
let sFillText = "";
|
||||||
|
|
||||||
for (let i in dataObject) {
|
for (let i in dataObject) {
|
||||||
(playerData[i] >= 2) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] >= 2) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[i].name, dataObject[i].spoiler, dataObject[i].wiki);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -678,7 +680,7 @@ function CheckNailUpgrades(section, dataObject, playerData) {
|
||||||
let sFillText = "";
|
let sFillText = "";
|
||||||
|
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 5; i++) {
|
||||||
(playerData.nailSmithUpgrades >= i) ? CurrentDataTrue(section, nail[i]): CurrentDataFalse();
|
(playerData.nailSmithUpgrades >= i) ? CurrentDataTrue(section, nail[i]): CurrentDataFalse(section, nail[i]);
|
||||||
sFillText += PrepareHTMLString(section, dataObject[nail[i]].name, dataObject[nail[i]].spoiler, dataObject[nail[i]].wiki);
|
sFillText += PrepareHTMLString(section, dataObject[nail[i]].name, dataObject[nail[i]].spoiler, dataObject[nail[i]].wiki);
|
||||||
}
|
}
|
||||||
if (section.percent) section.percent--; // subject one for the Old Nail
|
if (section.percent) section.percent--; // subject one for the Old Nail
|
||||||
|
|
@ -712,7 +714,7 @@ function WorldDataActivated(idText, sceneNameText, worldData) {
|
||||||
* @param {object} dataObject Object containing data to be verified
|
* @param {object} dataObject Object containing data to be verified
|
||||||
* @param {object} worldData Reference/pointer to specific data where to search
|
* @param {object} worldData Reference/pointer to specific data where to search
|
||||||
*/
|
*/
|
||||||
function CheckWorldDataTrue(section, idText, dataObject, worldData) {
|
/* function CheckWorldDataTrue(section, idText, dataObject, worldData) {
|
||||||
let orderedArray = [];
|
let orderedArray = [];
|
||||||
let size = ObjectLength(dataObject);
|
let size = ObjectLength(dataObject);
|
||||||
let sFillText = "";
|
let sFillText = "";
|
||||||
|
|
@ -739,7 +741,7 @@ function CheckWorldDataTrue(section, idText, dataObject, worldData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppendHTML(section, sFillText);
|
// AppendHTML(section, sFillText);
|
||||||
}
|
} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies if the data in a specific object are true or false, or checks what values they have, and appends HTML accordingly.
|
* Verifies if the data in a specific object are true or false, or checks what values they have, and appends HTML accordingly.
|
||||||
|
|
@ -819,7 +821,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
if (i === "greyPrinceDefeats") {
|
if (i === "greyPrinceDefeats") {
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
||||||
|
|
@ -830,12 +832,12 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
if (i === "whiteDefenderDefeats") {
|
if (i === "whiteDefenderDefeats") {
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(amount >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank();
|
(amount >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "geoPool":
|
case "geoPool":
|
||||||
|
|
@ -843,12 +845,12 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "jinnEggsSold":
|
case "jinnEggsSold":
|
||||||
case "xunFlowerBrokeTimes":
|
case "xunFlowerBrokeTimes":
|
||||||
textPrefix += ": " + Math.abs(playerData[i]);
|
textPrefix += ": " + Math.abs(playerData[i]);
|
||||||
(i === "geoPool" && playerData[i] > 0) ? CurrentDataBlank(): CurrentDataTrue(section, i);
|
(i === "geoPool" && playerData[i] > 0) ? CurrentDataBlank(section, i): CurrentDataTrue(section, i);
|
||||||
|
|
||||||
if (i === "jinnEggsSold") {
|
if (i === "jinnEggsSold") {
|
||||||
// fade out if not on Steel Soul
|
// fade out if not on Steel Soul
|
||||||
if (playerData.permadeathMode < 1) {
|
if (playerData.permadeathMode < 1) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -877,19 +879,19 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "shopkeeperKey":
|
case "shopkeeperKey":
|
||||||
(playerData.hasSlykey === true || playerData.gaveSlykey === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.hasSlykey === true || playerData.gaveSlykey === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "elegantKey":
|
case "elegantKey":
|
||||||
(playerData.hasWhiteKey === true || playerData.usedWhiteKey === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.hasWhiteKey === true || playerData.usedWhiteKey === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "loveKey":
|
case "loveKey":
|
||||||
(playerData.hasLoveKey === true || playerData.openedLoveDoor === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.hasLoveKey === true || playerData.openedLoveDoor === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "paleOreSeer": // #2
|
case "paleOreSeer": // #2
|
||||||
(playerData.dreamReward3 === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData.dreamReward3 === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* -------------------- Interactables ------------------------------- */
|
/* -------------------- Interactables ------------------------------- */
|
||||||
|
|
@ -906,7 +908,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "mantisVillageFloorLever":
|
case "mantisVillageFloorLever":
|
||||||
case "pathOfPainEntrance":
|
case "pathOfPainEntrance":
|
||||||
case "whiteLadyRoom":
|
case "whiteLadyRoom":
|
||||||
(FindWorldItem(dataObject[i].id, dataObject[i].sceneName)) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(FindWorldItem(dataObject[i].id, dataObject[i].sceneName)) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "relicsWandererJournal":
|
case "relicsWandererJournal":
|
||||||
|
|
@ -914,67 +916,67 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
case "relicsKingsIdol":
|
case "relicsKingsIdol":
|
||||||
case "relicsArcaneEgg":
|
case "relicsArcaneEgg":
|
||||||
total = playerData[dataObject[i].nameHeld] + playerData[dataObject[i].nameSold];
|
total = playerData[dataObject[i].nameHeld] + playerData[dataObject[i].nameSold];
|
||||||
(total >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank();
|
(total >= dataObject[i].max) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
|
||||||
textPrefix += ": " + total;
|
textPrefix += ": " + total;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "bossDoorStateTier5":
|
case "bossDoorStateTier5":
|
||||||
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
if (playerData.hasOwnProperty("bossDoorStateTier5") === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
} else {
|
} else {
|
||||||
(playerData[i].completed === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i].completed === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killsBindingSeal":
|
case "killsBindingSeal":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(playerData[i] == 0) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] == 0) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killsBigBuzzer":
|
case "killsBigBuzzer":
|
||||||
(playerData[i] == 0) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] == 0) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killedVoidIdol_1":
|
case "killedVoidIdol_1":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
if (playerData[i] === false && (playerData.killedVoidIdol_2 === true || playerData.killedVoidIdol_3 === true)) CurrentDataTrue(section, i);
|
if (playerData[i] === false && (playerData.killedVoidIdol_2 === true || playerData.killedVoidIdol_3 === true)) CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killedVoidIdol_2":
|
case "killedVoidIdol_2":
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataFalse(section, i);
|
||||||
if (playerData[i] === false && playerData.killedVoidIdol_3 === true) CurrentDataTrue(section, i);
|
if (playerData[i] === false && playerData.killedVoidIdol_3 === true) CurrentDataTrue(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "greyPrinceDefeated":
|
case "greyPrinceDefeated":
|
||||||
// compatibility with earlier game versions
|
// compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
break;
|
break;
|
||||||
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
} else if (playerData.zoteDead === true || (playerData.zoteRescuedBuzzer === false && playerData.hasWalljump === true)) {
|
||||||
textPrefix = `<del>${textPrefix}</del>`;
|
textPrefix = `<del>${textPrefix}</del>`;
|
||||||
}
|
}
|
||||||
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataBlank();
|
(playerData[i] === true) ? CurrentDataTrue(section, i): CurrentDataBlank(section, i);
|
||||||
if (playerData.zoteRescuedBuzzer === true && playerData[i] === false) CurrentDataFalse();
|
if (playerData.zoteRescuedBuzzer === true && playerData[i] === false) CurrentDataFalse(section, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "zoteStatus":
|
case "zoteStatus":
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
if (playerData.zoteDead === true) {
|
if (playerData.zoteDead === true) {
|
||||||
textPrefix = dataObject[i].nameNeglect;
|
textPrefix = dataObject[i].nameNeglect;
|
||||||
textSuffix = dataObject[i].spoilerNeglect;
|
textSuffix = dataObject[i].spoilerNeglect;
|
||||||
|
|
@ -1005,7 +1007,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "nailsmithStatus":
|
case "nailsmithStatus":
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
if (playerData.nailsmithKilled === true) {
|
if (playerData.nailsmithKilled === true) {
|
||||||
textPrefix = dataObject[i].namePurity;
|
textPrefix = dataObject[i].namePurity;
|
||||||
textSuffix = dataObject[i].spoilerPurity;
|
textSuffix = dataObject[i].spoilerPurity;
|
||||||
|
|
@ -1036,7 +1038,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
default:
|
default:
|
||||||
// backwards compatibility with earlier game versions
|
// backwards compatibility with earlier game versions
|
||||||
if (playerData.hasOwnProperty(i) === false) {
|
if (playerData.hasOwnProperty(i) === false) {
|
||||||
CurrentDataBlank();
|
CurrentDataBlank(section, i);
|
||||||
textPrefix = `<del>${dataObject[i].name}</del>`;
|
textPrefix = `<del>${dataObject[i].name}</del>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1044,7 +1046,7 @@ function CheckAdditionalThings(section, dataObject, playerData, worldData, scene
|
||||||
CurrentDataTrue(section, i);
|
CurrentDataTrue(section, i);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, i);
|
||||||
}
|
}
|
||||||
} // end switch (i)
|
} // end switch (i)
|
||||||
|
|
||||||
|
|
@ -1229,7 +1231,7 @@ function CheckMrMushroomState(section, entry, mrMushroomState = 0) {
|
||||||
if (mrMushroomState >= entry.state) {
|
if (mrMushroomState >= entry.state) {
|
||||||
CurrentDataTrue(section, `mrMushroomState${entry.state}`);
|
CurrentDataTrue(section, `mrMushroomState${entry.state}`);
|
||||||
} else {
|
} else {
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(section, `mrMushroomState${entry.state}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1338,9 +1340,9 @@ function HKReadTextArea(textAreaId = "") {
|
||||||
*/
|
*/
|
||||||
function InitialHTMLPopulate(db) {
|
function InitialHTMLPopulate(db) {
|
||||||
|
|
||||||
let sFillText = "";
|
/* let sFillText = "";
|
||||||
|
|
||||||
CurrentDataFalse();
|
CurrentDataFalse(); */
|
||||||
|
|
||||||
GenerateInnerHTML(db);
|
GenerateInnerHTML(db);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue