major overhaul, add arrays to objects

This commit is contained in:
ReznoRMichael 2020-08-30 20:53:24 +02:00
parent 8bc7029abd
commit 3f3bcdcdf1
5 changed files with 142 additions and 184 deletions

3
.gitignore vendored
View file

@ -2,4 +2,5 @@ fontello/
css/ css/
font/ font/
images/ images/
save/ save/
config.json

View file

@ -44,189 +44,189 @@ const DIV_ID = {
}; };
const HK_BOSSES = { const HK_BOSSES = {
falseKnightDefeated: "False Knight (Forgotten Crossroads)", falseKnightDefeated: ["False Knight", "Forgotten Crossroads"],
killedMawlek: "Brooding Mawlek (Forgotten Crossroads)", killedMawlek: ["Brooding Mawlek", "Forgotten Crossroads"],
killedBurstingBouncer: "Gruz Mother (Forgotten Crossroads)", killedBurstingBouncer: ["Gruz Mother", "Forgotten Crossroads"],
defeatedDungDefender: "Dung Defender (Royal Waterways)", defeatedDungDefender: ["Dung Defender", "Royal Waterways"],
mageLordDefeated: "Soul Master (City of Tears: Soul Sanctum)", mageLordDefeated: ["Soul Master", "City of Tears: Soul Sanctum"],
killedBlackKnight: "Watcher Knights (City of Tears: Watcher's Spire)", killedBlackKnight: ["Watcher Knights", "City of Tears: Watcher's Spire"],
collectorDefeated: "The Collector (City of Tears: Tower of Love)", collectorDefeated: ["The Collector", "City of Tears: Tower of Love"],
defeatedMantisLords: "Mantis Lords (Mantis Village)", defeatedMantisLords: ["Mantis Lords", "Mantis Village"],
defeatedMegaJelly: "Uumuu (Fog Canyon: Teacher's Archives)", defeatedMegaJelly: ["Uumuu", "Fog Canyon: Teacher's Archives"],
hornet1Defeated: "Hornet Protector (Greenpath)", hornet1Defeated: ["Hornet Protector", "Greenpath"],
hornetOutskirtsDefeated: "Hornet Sentinel (Kingdom's Edge)", hornetOutskirtsDefeated: ["Hornet Sentinel", "Kingdom's Edge"],
killedInfectedKnight: "Broken Vessel (Ancient Basin)", killedInfectedKnight: ["Broken Vessel", "Ancient Basin"],
killedMimicSpider: "Nosk (Deepnest)", killedMimicSpider: ["Nosk", "Deepnest"],
killedTraitorLord: "Traitor Lord (Queen's Gardens)" killedTraitorLord: ["Traitor Lord", "Queen's Gardens"]
}; };
// reference: https://radiance.host/apidocs/Charms.html // reference: https://radiance.host/apidocs/Charms.html
const HK_CHARMS = { const HK_CHARMS = {
gotCharm_1: "Gathering Swarm", // 1 gotCharm_1: ["Gathering Swarm", ""], // 1
gotCharm_2: "Wayward Compass", // 1 gotCharm_2: ["Wayward Compass", ""], // 1
gotCharm_3: "Grubsong", // 1 gotCharm_3: ["Grubsong", ""], // 1
gotCharm_4: "Stalwart Shell", // 2 gotCharm_4: ["Stalwart Shell", ""], // 2
gotCharm_5: "Baldur Shell", // 2 gotCharm_5: ["Baldur Shell", ""], // 2
gotCharm_6: "Fury of the Fallen", // 2 gotCharm_6: ["Fury of the Fallen", ""], // 2
gotCharm_7: "Quick Focus", // 3 gotCharm_7: ["Quick Focus", ""], // 3
gotCharm_8: "Lifeblood Heart", // 2 gotCharm_8: ["Lifeblood Heart", ""], // 2
gotCharm_9: "Lifeblood Core", // 3 gotCharm_9: ["Lifeblood Core", ""], // 3
gotCharm_10: "Defender's Crest", // 1 gotCharm_10: ["Defender's Crest", ""], // 1
gotCharm_11: "Flukenest", // 3 gotCharm_11: ["Flukenest", ""], // 3
gotCharm_12: "Thorns of Agony", // 1 gotCharm_12: ["Thorns of Agony", ""], // 1
gotCharm_13: "Mark of Pride", // 3 gotCharm_13: ["Mark of Pride", ""], // 3
gotCharm_14: "Steady Body", // 1 gotCharm_14: ["Steady Body", ""], // 1
gotCharm_15: "Heavy Blow", // 2 gotCharm_15: ["Heavy Blow", ""], // 2
gotCharm_16: "Sharp Shadow", // 2 gotCharm_16: ["Sharp Shadow", ""], // 2
gotCharm_17: "Spore Shroom", // 1 gotCharm_17: ["Spore Shroom", ""], // 1
gotCharm_18: "Longnail", // 2 gotCharm_18: ["Longnail", ""], // 2
gotCharm_19: "Shaman Stone", // 3 gotCharm_19: ["Shaman Stone", ""], // 3
gotCharm_20: "Soul Catcher", // 2 gotCharm_20: ["Soul Catcher", ""], // 2
gotCharm_21: "Soul Eater", // 4 gotCharm_21: ["Soul Eater", ""], // 4
gotCharm_22: "Glowing Womb", // 2 gotCharm_22: ["Glowing Womb", ""], // 2
gotCharm_23: "Fragile / Unbreakable Heart", // 2 gotCharm_23: ["Fragile / Unbreakable Heart", ""], // 2
gotCharm_24: "Fragile / Unbreakable Greed", // 2 gotCharm_24: ["Fragile / Unbreakable Greed", ""], // 2
gotCharm_25: "Fragile / Unbreakable Strength", // 3 gotCharm_25: ["Fragile / Unbreakable Strength", ""], // 3
gotCharm_26: "Nailmasters Glory", // 1 gotCharm_26: ["Nailmasters Glory", ""], // 1
gotCharm_27: "Jonis Blessing", // 4 gotCharm_27: ["Jonis Blessing", ""], // 4
gotCharm_28: "Shape of Unn", // 2 gotCharm_28: ["Shape of Unn", ""], // 2
gotCharm_29: "Hiveblood", // 4 gotCharm_29: ["Hiveblood", ""], // 4
gotCharm_30: "Dream Wielder", // 1 gotCharm_30: ["Dream Wielder", ""], // 1
gotCharm_31: "Dashmaster", // 2 gotCharm_31: ["Dashmaster", ""], // 2
gotCharm_32: "Quick Slash", // 3 gotCharm_32: ["Quick Slash", ""], // 3
gotCharm_33: "Spell Twister", // 2 gotCharm_33: ["Spell Twister", ""], // 2
gotCharm_34: "Deep Focus", // 4 gotCharm_34: ["Deep Focus", ""], // 4
gotCharm_35: "Grubberflys Elegy", // 3 gotCharm_35: ["Grubberflys Elegy", ""], // 3
gotCharm_36: "Kingsoul / Void Heart", // 5 gotCharm_36: ["Kingsoul / Void Heart", ""], // 5
}; };
const HK_COLOSSEUM = { const HK_COLOSSEUM = {
colosseumBronzeCompleted: "Trial of the Warrior", colosseumBronzeCompleted: ["Trial of the Warrior", "Little Fool: 100 Geo"],
colosseumSilverCompleted: "Trial of the Conqueror", colosseumSilverCompleted: ["Trial of the Conqueror", "Little Fool: 450 Geo + Warrior completed"],
colosseumGoldCompleted: "Trial of the Fool" colosseumGoldCompleted: ["Trial of the Fool", "Little Fool: 800 Geo + Conqueror completed"],
}; };
const HK_DREAMERS = { const HK_DREAMERS = {
lurienDefeated: "Lurien the Watcher (City of Tears: Watcher's Spire)", lurienDefeated: ["Lurien the Watcher", "City of Tears: Watcher's Spire"],
monomonDefeated: "Monomon the Teacher (Fog Canyon: Teacher's Archives)", monomonDefeated: ["Monomon the Teacher", "Fog Canyon: Teacher's Archives"],
hegemolDefeated: "Herrah the Beast (Deepnest: Distant Village)" hegemolDefeated: ["Herrah the Beast", "Deepnest: Distant Village"]
}; };
const HK_DREAMNAIL = { const HK_DREAMNAIL = {
hasDreamNail: "Dream Nail acquired (Resting Grounds)", hasDreamNail: ["Dream Nail acquired", "Resting Grounds"],
dreamNailUpgraded: "Awoken Dream Nail (Seer: 1800 Essence)", dreamNailUpgraded: ["Awoken Dream Nail", "Seer: 1800 Essence"],
mothDeparted: "Hear the Seer's final words (Seer: 2400 Essence)" mothDeparted: ["Hear the Seer's final words", "Seer: 2400 Essence"]
}; };
const HK_EQUIPMENT = { const HK_EQUIPMENT = {
hasDash: "Mothwing Cloak (Greenpath; Dash ability)", hasDash: ["Mothwing Cloak", "Greenpath; Dash ability"],
hasWalljump: "Mantis Claw (Mantis Village; Wall Jump ability)", hasWalljump: ["Mantis Claw", "Mantis Village; Wall Jump ability"],
hasSuperDash: "Crystal Heart (Crystal Peak; Super Dash ability)", hasSuperDash: ["Crystal Heart", "Crystal Peak; Super Dash ability"],
hasAcidArmour: "Isma's Tear (Royal Waterways; Acid Armour ability)", hasAcidArmour: ["Isma's Tear", "Royal Waterways; Acid Armour ability"],
hasDoubleJump: "Monarch Wings (Ancient Basin; Double Jump ability)", hasDoubleJump: ["Monarch Wings", "Ancient Basin; Double Jump ability"],
hasKingsBrand: "King's Brand (Kingdom's Edge)", hasKingsBrand: ["King's Brand", "Kingdom's Edge"],
hasShadowDash: "Shade Cloak (The Abyss; Shadow Dash ability)" hasShadowDash: ["Shade Cloak", "The Abyss; Shadow Dash ability"]
}; };
const HK_MASKSHARDS = { const HK_MASKSHARDS = {
slyShellFrag1: "Mask Shard #1 (Sly: 150 Geo)", slyShellFrag1: ["Mask Shard #1", "Sly: 150 Geo"],
slyShellFrag2: "Mask Shard #2 (Sly: 500 Geo)", slyShellFrag2: ["Mask Shard #2", "Sly: 500 Geo"],
slyShellFrag3: "Mask Shard #3 (Sly: 800 Geo + Shopkeeper's Key)", slyShellFrag3: ["Mask Shard #3", "Sly: 800 Geo + Shopkeeper's Key"],
slyShellFrag4: "Mask Shard #4 (Sly: 1500 Geo + Shopkeeper's Key)", slyShellFrag4: ["Mask Shard #4", "Sly: 1500 Geo + Shopkeeper's Key"],
dreamReward7: "Mask Shard #5 (Seer: 1500 Essence)" dreamReward7: ["Mask Shard #5", "Seer: 1500 Essence"]
}; };
// "Heart Piece" sceneData.persistentBoolItems.id // "Heart Piece" sceneData.persistentBoolItems.id
const HK_MASKSHARDS_WORLD = { const HK_MASKSHARDS_WORLD = {
Crossroads_13: "Mask Shard #6 (Forgotten Crossroads: below Hot Springs)", Crossroads_13: ["Mask Shard #6", "Forgotten Crossroads: below Hot Springs"],
Crossroads_09: "Mask Shard #7 (Forgotten Crossroads: Brooding Mawlek)", Crossroads_09: ["Mask Shard #7", "Forgotten Crossroads: Brooding Mawlek"],
Crossroads_38: "Mask Shard #8 (Grubfather: rescue 5 Grubs)", Crossroads_38: ["Mask Shard #8", "Grubfather: rescue 5 Grubs"],
Room_Bretta: "Mask Shard #9 (Dirtmouth: Bretta's Room)", Room_Bretta: ["Mask Shard #9", "Dirtmouth: Bretta's Room"],
Fungus2_01: "Mask Shard #10 (Queen's Station)", Fungus2_01: ["Mask Shard #10", "Queen's Station"],
Waterways_04b: "Mask Shard #11 (Royal Waterways)", Waterways_04b: ["Mask Shard #11", "Royal Waterways"],
Fungus1_36: "Mask Shard #12 (Greenpath: Stone Sanctuary)", Fungus1_36: ["Mask Shard #12", "Greenpath: Stone Sanctuary"],
Mines_32: "Mask Shard #13 (Crystal Peak: Enraged Guardian)", Mines_32: ["Mask Shard #13", "Crystal Peak: Enraged Guardian"],
Fungus2_25: "Mask Shard #14 (Deepnest: entrance from Fungal Wastes)", Fungus2_25: ["Mask Shard #14", "Deepnest: entrance from Fungal Wastes"],
Hive_04: "Mask Shard #15 (The Hive)", Hive_04: ["Mask Shard #15", "The Hive"],
Room_Mansion: "Mask Shard #16 (Resting Grounds: Delicate Flower)" Room_Mansion: ["Mask Shard #16", "Resting Grounds: Delicate Flower"]
}; };
const HK_VESSELFRAGMENTS = { const HK_VESSELFRAGMENTS = {
slyVesselFrag1: "Vessel Fragment #1 (Sly: 550 Geo)", slyVesselFrag1: ["Vessel Fragment #1", "Sly: 550 Geo"],
slyVesselFrag2: "Vessel Fragment #2 (Sly: 900 Geo)", slyVesselFrag2: ["Vessel Fragment #2", "Sly: 900 Geo"],
dreamReward5: "Vessel Fragment #3 (Seer: 700 Essence)", dreamReward5: ["Vessel Fragment #3", "Seer: 700 Essence"],
vesselFragStagNest: "Vessel Fragment #4 (Stag Nest)" vesselFragStagNest: ["Vessel Fragment #4", "Stag Nest"]
}; };
// "Vessel Fragment" sceneData.persistentBoolItems.id // "Vessel Fragment" sceneData.persistentBoolItems.id
const HK_VESSELFRAGMENTS_WORLD = { const HK_VESSELFRAGMENTS_WORLD = {
Fungus1_13: "Vessel Fragment #5 (Greenpath: near Queen's Gardens exit)", Fungus1_13: ["Vessel Fragment #5", "Greenpath: near Queen's Gardens exit"],
Crossroads_37: "Vessel Fragment #6 (Forgotten Crossroads: unlock City of Tears lift)", Crossroads_37: ["Vessel Fragment #6", "Forgotten Crossroads: unlock City of Tears lift"],
Ruins2_09: "Vessel Fragment #7 (Above King's Station)", Ruins2_09: ["Vessel Fragment #7", "Above King's Station"],
Deepnest_38: "Vessel Fragment #8 (Deepnest: Goam platforming challenge)", Deepnest_38: ["Vessel Fragment #8", "Deepnest: Goam platforming challenge"],
Abyss_04: "Vessel Fragment #9 (Ancient Basin Fountain: 3000 Geo)" Abyss_04: ["Vessel Fragment #9", "Ancient Basin Fountain: 3000 Geo"]
}; };
const HK_NAILARTS = { const HK_NAILARTS = {
hasUpwardSlash: "Great Slash", hasUpwardSlash: ["Great Slash", "Nailmaster Sheo: Greenpath"],
hasDashSlash: "Dash Slash", hasDashSlash: ["Dash Slash", "Nailmaster Oro: Kingdom's Edge, 800 Geo"],
hasCyclone: "Cyclone Slash" hasCyclone: ["Cyclone Slash", " Nailmaster Mato: Howling Cliffs"],
}; };
const HK_NAILUPGRADES = [ const HK_NAILUPGRADES = [
"#0 Old Nail (Starting Weapon)", ["#0 Old Nail", "Starting Weapon"],
"#1 Sharpened Nail (Nailsmith: 250 Geo)", ["#1 Sharpened Nail", "Nailsmith: 250 Geo"],
"#2 Channeled Nail (Nailsmith: 800 Geo + 1 Pale Ore)", ["#2 Channeled Nail", "Nailsmith: 800 Geo + 1 Pale Ore"],
"#3 Coiled Nail (Nailsmith: 2000 Geo + 2 Pale Ore)", ["#3 Coiled Nail", "Nailsmith: 2000 Geo + 2 Pale Ore"],
"#4 Pure Nail (Nailsmith: 4000 Geo + 3 Pale Ore)" ["#4 Pure Nail", "Nailsmith: 4000 Geo + 3 Pale Ore"]
]; ];
const HK_SPELLS = { const HK_SPELLS = {
fireballLevel: { fireballLevel: {
1: "Vengeful Spirit", 1: ["Vengeful Spirit", "Forgotten Crossroads"],
2: "Shade Soul" 2: ["Shade Soul", "City of Tears: Soul Sanctum + Elegant Key"],
}, },
quakeLevel: { quakeLevel: {
1: "Desolate Dive", 1: ["Desolate Dive", "City of Tears: Soul Sanctum"],
2: "Descending Dark" 2: ["Descending Dark", "Crystal Peak: Crystallised Mound"],
}, },
screamLevel: { screamLevel: {
1: "Howling Wraiths", 1: ["Howling Wraiths", "Fog Canyon: Overgrown Mound"],
2: "Abyss Shriek" 2: ["Abyss Shriek", "The Abyss"],
} }
}; };
const HK_WARRIORDREAMS = { const HK_WARRIORDREAMS = {
galienDefeated: "Galien", xeroDefeated: ["Xero", "Resting Grounds"],
mumCaterpillarDefeated: "Marmu", noEyesDefeated: ["No Eyes", "Greenpath: Stone Sanctuary"],
markothDefeated: "Markoth", elderHuDefeated: ["Elder Hu", "Fungal Wastes"],
xeroDefeated: "Xero", aladarSlugDefeated: ["Gorb", "Howling Cliffs"],
noEyesDefeated: "No Eyes", mumCaterpillarDefeated: ["Marmu", "Queen's Gardens"],
elderHuDefeated: "Elder Hu", galienDefeated: ["Galien", "Deepnest"],
aladarSlugDefeated: "Gorb" markothDefeated: ["Markoth", "Kingdom's Edge"],
}; };
const HK_GRIMMTROUPE = { const HK_GRIMMTROUPE = {
gotCharm_37: "Charm #37 Sprintmaster (Sly: 400 Geo + Shopkeeper's Key)", gotCharm_37: ["Charm #37 Sprintmaster", "Sly: 400 Geo + Shopkeeper's Key"],
gotCharm_38: "Charm #38 Dreamshield (Resting Grounds)", gotCharm_38: ["Charm #38 Dreamshield", "Resting Grounds"],
gotCharm_39: "Charm #39 Weaversong (Deepnest: Weaver's Den)", gotCharm_39: ["Charm #39 Weaversong", "Deepnest: Weaver's Den"],
gotCharm_40: "Charm #40 Grimmchild / Carefree Melody (Dirtmouth)", gotCharm_40: ["Charm #40 Grimmchild / Carefree Melody", "Dirtmouth"],
killedGrimm: "Troupe Leader Grimm (Dirtmouth)" killedGrimm: ["Troupe Leader Grimm", "Dirtmouth"]
}; };
const HK_LIFEBLOOD = { const HK_LIFEBLOOD = {
killedHiveKnight: "Hive Knight (The Hive)" killedHiveKnight: ["Hive Knight", "The Hive"]
}; };
const HK_GODMASTER = { const HK_GODMASTER = {
hasGodfinder: "Godtuner (Junk Pit)" hasGodfinder: ["Godtuner", "Junk Pit"]
}; };
const HK_GODMASTER_DOORS = [ const HK_GODMASTER_DOORS = [
"#1 Pantheon of the Master (Godhome)", ["#1 Pantheon of the Master", "Godhome"],
"#2 Pantheon of the Artist (Godhome)", ["#2 Pantheon of the Artist", "Godhome"],
"#3 Pantheon of the Sage (Godhome)", ["#3 Pantheon of the Sage", "Godhome"],
"#4 Pantheon of the Knight (Godhome)" ["#4 Pantheon of the Knight", "Godhome"]
]; ];
function HKCheckCompletion(jsonObject) { function HKCheckCompletion(jsonObject) {
@ -333,7 +333,7 @@ function HKCheckCompletion(jsonObject) {
for (let j = 0; j < HK_NAILUPGRADES_temp.length; j++) { for (let j = 0; j < HK_NAILUPGRADES_temp.length; j++) {
CurrentDataFalse(); CurrentDataFalse();
if (HKPlayerData.nailSmithUpgrades >= j) CurrentDataTrue(); if (HKPlayerData.nailSmithUpgrades >= j) CurrentDataTrue();
FillHTML(DIV_ID.nailUpgrades, HK_NAILUPGRADES_temp[j]); FillHTML(DIV_ID.nailUpgrades, HK_NAILUPGRADES_temp[j][0], HK_NAILUPGRADES_temp[j][1]);
} }
} }
@ -356,7 +356,7 @@ function HKCheckCompletion(jsonObject) {
if (i === "grimmChildLevel") { if (i === "grimmChildLevel") {
if (HKPlayerData.grimmChildLevel >= 4) CurrentDataTrue(); if (HKPlayerData.grimmChildLevel >= 4) CurrentDataTrue();
else CurrentDataFalse(); else CurrentDataFalse();
FillHTML(DIV_ID.grimmTroupe, "Nightmare King Grimm / Banishment"); FillHTML(DIV_ID.grimmTroupe, "Nightmare King Grimm / Banishment", "Dirtmouth or Howling Cliffs");
} }
// ---------------- Lifeblood Content Pack --------------------- // // ---------------- Lifeblood Content Pack --------------------- //
@ -372,7 +372,8 @@ function HKCheckCompletion(jsonObject) {
CurrentDataFalse(); CurrentDataFalse();
if (i === ("bossDoorStateTier" + j)) { if (i === ("bossDoorStateTier" + j)) {
if (HKPlayerData["bossDoorStateTier" + j].completed === true) CurrentDataTrue(); if (HKPlayerData["bossDoorStateTier" + j].completed === true) CurrentDataTrue();
FillHTML(DIV_ID.godmaster, HK_GODMASTER_DOORS_temp.shift()); FillHTML(DIV_ID.godmaster, HK_GODMASTER_DOORS_temp[0][0], HK_GODMASTER_DOORS_temp[0][1]);
HK_GODMASTER_DOORS_temp.shift()
} }
} }
} }
@ -399,7 +400,9 @@ function CleanHTML(jsObj) {
} }
function FillHTML(divId = "", textPrefix = "Unknown Completion Element: ", textSuffix = "") { function FillHTML(divId = "", textPrefix = "Unknown Completion Element: ", textSuffix = "") {
document.getElementById(divId).innerHTML += divStart + completionSymbol + strongStart + textPrefix + "" + strongEnd + currentData + textSuffix + divEnd; let dash = "";
if (textSuffix.length) dash = " — ";
document.getElementById(divId).innerHTML += divStart + completionSymbol + "<b>" + textPrefix + "</b>" + dash + textSuffix + divEnd;
} }
function CurrentDataTrue(textData = isCompleted) { function CurrentDataTrue(textData = isCompleted) {
@ -414,9 +417,9 @@ function CurrentDataFalse(textData = isNotCompleted) {
function CheckIfDataTrue(divId, dataObject, playerData) { function CheckIfDataTrue(divId, dataObject, playerData) {
for (let i in dataObject) { for (let i in dataObject) {
CurrentDataFalse();
if (playerData[i] === true) CurrentDataTrue(); if (playerData[i] === true) CurrentDataTrue();
else CurrentDataFalse(); FillHTML(divId, dataObject[i][0], dataObject[i][1]);
FillHTML(divId, dataObject[i]);
delete dataObject[i]; delete dataObject[i];
} }
} }
@ -426,7 +429,7 @@ function CheckSpellLevel(divId, dataObject, playerData) {
for (let j = 1; j <= 2; j++) { for (let j = 1; j <= 2; j++) {
CurrentDataFalse(); CurrentDataFalse();
if (playerData[i] >= j) CurrentDataTrue(); if (playerData[i] >= j) CurrentDataTrue();
FillHTML(divId, dataObject[i][j]); FillHTML(divId, dataObject[i][j][0], dataObject[i][j][1]);
} }
delete dataObject[i]; delete dataObject[i];
} }
@ -436,7 +439,7 @@ function CheckWarriorDreams(divId, dataObject, playerData) {
for (let i in dataObject) { for (let i in dataObject) {
if (playerData[i] > 0) CurrentDataTrue(); if (playerData[i] > 0) CurrentDataTrue();
else CurrentDataFalse(); else CurrentDataFalse();
FillHTML(divId, dataObject[i]); FillHTML(divId, dataObject[i][0], dataObject[i][1]);
delete dataObject[i]; delete dataObject[i];
} }
} }
@ -447,14 +450,14 @@ function CheckWorldDataTrue(divId, idText, dataObject, worldData) {
// Order the items before displaying them // Order the items before displaying them
for (let i in dataObject) { for (let i in dataObject) {
orderedArray.push([i, dataObject[i], false]); orderedArray.push([i, dataObject[i][0], dataObject[i][1], false]);
} }
// Search for completed items // Search for completed items
for (let i = 0; i < worldData.length; i++) { for (let i = 0; i < worldData.length; i++) {
for (let j = 0; j < size; j++) { for (let j = 0; j < size; j++) {
if (worldData[i].id === idText && worldData[i].sceneName === orderedArray[j][0] && worldData[i].activated === true) { if (worldData[i].id === idText && worldData[i].sceneName === orderedArray[j][0] && worldData[i].activated === true) {
orderedArray[j][2] = true; orderedArray[j][3] = true;
} }
} }
} }
@ -462,8 +465,8 @@ function CheckWorldDataTrue(divId, idText, dataObject, worldData) {
// Display the items as they were initially ordered // Display the items as they were initially ordered
for (let i = 0; i < size; i++) { for (let i = 0; i < size; i++) {
CurrentDataFalse(); CurrentDataFalse();
if (orderedArray[i][2] === true) CurrentDataTrue(); if (orderedArray[i][3] === true) CurrentDataTrue();
FillHTML(divId, orderedArray[i][1]); FillHTML(divId, orderedArray[i][1], orderedArray[i][2]);
} }
} }

View file

@ -1,46 +0,0 @@
{
"name": "",
"css_prefix_text": "icon-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "1400d5103edd2fa6d2d61688fee79a5a",
"css": "ok-squared",
"code": 61770,
"src": "fontawesome"
},
{
"uid": "5211af474d3a9848f67f945e2ccaf143",
"css": "cancel",
"code": 59392,
"src": "fontawesome"
},
{
"uid": "0f4cae16f34ae243a6144c18a003f2d8",
"css": "cancel-circled",
"code": 59393,
"src": "fontawesome"
},
{
"uid": "12f4ece88e46abd864e40b35e05b11cd",
"css": "ok",
"code": 59394,
"src": "fontawesome"
},
{
"uid": "43ab845088317bd348dee1d975700c48",
"css": "ok-circled",
"code": 59395,
"src": "fontawesome"
},
{
"uid": "8663320a860b00f26e94d3d15c9ba99a",
"css": "clock",
"code": 59396,
"src": "entypo"
}
]
}

View file

@ -24,7 +24,7 @@
<link rel="icon" href="../favicon.png"> <link rel="icon" href="../favicon.png">
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <script src="loadJson.js"></script> --> <script src="loadJson.js"></script>
<script src="HKCheckCompletion.js"></script> <script src="HKCheckCompletion.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136831794-2"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-136831794-2"></script>
<script> <script>

View file

@ -31,7 +31,7 @@ function loadJSON(filename, callback) {
xobj.send(null); xobj.send(null);
} }
loadJSON(fileName[1], loadJSON(fileName[3],
function JSONparse(response) { function JSONparse(response) {
// Parse JSON string into object // Parse JSON string into object
jsonObj = JSON.parse(response); jsonObj = JSON.parse(response);