WorldDataActivated() function, Soul Warrior data

This commit is contained in:
ReznoRMichael 2021-02-19 19:20:16 +01:00
parent 05c5487c39
commit 291b0950a4
2 changed files with 27 additions and 1 deletions

View file

@ -646,6 +646,25 @@ function CheckNailUpgrades(divId, dataObject, playerData) {
AppendHTML(divId, sFillText); AppendHTML(divId, sFillText);
} }
/**
* Verifies if the specific Interactable is activated. Returns true or false.
* @param {string} idText Text string inside save data to search for
* @param {object} worldData Reference/pointer to specific data where to search (sceneData.persistentBoolItems)
*/
function WorldDataActivated(idText, sceneNameText, worldData) {
// Search for the Interactable
for (let i = 0, length = worldData.length; i < length; i++) {
// Verify if the Interactable is activated and return the result
if (worldData[i].id === idText && worldData[i].sceneName === sceneNameText && worldData[i].activated === true) {
return true;
}
else {
return false;
}
}
}
/** /**
* Verifies if the data in a specific object are true or false, and appends HTML accordingly. Creates a copy of dataObject. * Verifies if the data in a specific object are true or false, and appends HTML accordingly. Creates a copy of dataObject.
* @param {object} divId ID of the HTML element for data appending * @param {object} divId ID of the HTML element for data appending

View file

@ -984,7 +984,14 @@ const HK = {
name: "P#1 Massive Moss Charger", name: "P#1 Massive Moss Charger",
spoiler: "Greenpath, near Fog Canyon", spoiler: "Greenpath, near Fog Canyon",
wiki: "Massive_Moss_Charger" wiki: "Massive_Moss_Charger"
} },
pantheonSoulWarrior: {
name: "P#1 Soul Warrior",
spoiler: "City of Tears, Soul Sanctum",
id: "Battle Scene v2",
sceneName: "Ruins1_23",
wiki: "Soul_Warrior"
},
}, },
GRUBS_LIST: ["Crossroads_35", "Crossroads_03", "Crossroads_05", "Crossroads_48", "Crossroads_31", "Fungus1_06", "Fungus1_07", "Fungus1_21", "Fungus1_28", "Fungus2_18", "Ruins1_05", "Mines_04", "Mines_03", "Mines_31", "Mines_19", "Ruins1_32", "RestingGrounds_10", "Ruins_House_01", "Mines_35", "Mines_16", "Waterways_04", "Waterways_13", "Abyss_19", "Abyss_17", "Mines_24", "Fungus1_13", "Fungus3_47", "Fungus3_10", "Fungus3_48", "Fungus3_22", "Ruins2_07", "Ruins2_11", "Ruins2_11", "Ruins2_11", "Deepnest_East_11", "Deepnest_East_14", "Fungus2_20", "Ruins2_03", "Deepnest_36", "Deepnest_03", "Deepnest_31", "Deepnest_39", "Deepnest_Spider_Town", "Waterways_14", "Hive_03", "Hive_04"], GRUBS_LIST: ["Crossroads_35", "Crossroads_03", "Crossroads_05", "Crossroads_48", "Crossroads_31", "Fungus1_06", "Fungus1_07", "Fungus1_21", "Fungus1_28", "Fungus2_18", "Ruins1_05", "Mines_04", "Mines_03", "Mines_31", "Mines_19", "Ruins1_32", "RestingGrounds_10", "Ruins_House_01", "Mines_35", "Mines_16", "Waterways_04", "Waterways_13", "Abyss_19", "Abyss_17", "Mines_24", "Fungus1_13", "Fungus3_47", "Fungus3_10", "Fungus3_48", "Fungus3_22", "Ruins2_07", "Ruins2_11", "Ruins2_11", "Ruins2_11", "Deepnest_East_11", "Deepnest_East_14", "Fungus2_20", "Ruins2_03", "Deepnest_36", "Deepnest_03", "Deepnest_31", "Deepnest_39", "Deepnest_Spider_Town", "Waterways_14", "Hive_03", "Hive_04"],
ACHIEVEMENTS: { ACHIEVEMENTS: {