From 375f8c9a6ff7cda8a0b95bd372425e0ae573e443 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Fri, 4 Sep 2020 12:40:46 +0200 Subject: [PATCH] minor code fix --- HKCheckCompletion.js | 29 ++++++++++++++--------------- index.html | 11 ++++------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/HKCheckCompletion.js b/HKCheckCompletion.js index 263c2fe..1d1519e 100644 --- a/HKCheckCompletion.js +++ b/HKCheckCompletion.js @@ -67,16 +67,6 @@ const DIV_ID = { id: "hk-vesselfragments", maxPercent: 3 }, - dreamers: { - h2: "Dreamers", - id: "hk-dreamers", - maxPercent: 3 - }, - colosseum: { - h2: "Colosseum of Fools", - id: "hk-colosseum", - maxPercent: 3 - }, dreamNail: { h2: "Dream Nail and Essence", id: "hk-dreamnail", @@ -87,6 +77,16 @@ const DIV_ID = { id: "hk-warriordreams", maxPercent: 7 }, + dreamers: { + h2: "Dreamers", + id: "hk-dreamers", + maxPercent: 3 + }, + colosseum: { + h2: "Colosseum of Fools", + id: "hk-colosseum", + maxPercent: 3 + }, grimmTroupe: { h2: "Grimm Troupe Content Pack", id: "hk-grimmtroupe", @@ -107,8 +107,6 @@ const DIV_ID = { const HK_BOSSES = { falseKnightDefeated: ["False Knight", "Forgotten Crossroads"], // "Battle Scene" - "Crossroads_10" ? hornet1Defeated: ["Hornet Protector", "Greenpath"], - // killedBigFly: ["Gruz Mother", "Forgotten Crossroads"], // "Battle Scene" - "Crossroads_04" - // killedMawlek: ["Brooding Mawlek", "Forgotten Crossroads"], // "Battle Scene" - "Crossroads_09" ? defeatedDungDefender: ["Dung Defender", "Royal Waterways"], mageLordDefeated: ["Soul Master", "City of Tears: Soul Sanctum"], killedBlackKnight: ["Watcher Knights", "City of Tears: Watcher's Spire"], @@ -123,8 +121,8 @@ const HK_BOSSES = { // "Battle Scene" sceneData.persistentBoolItems.id const HK_BOSSES_WORLD = { - Crossroads_04: ["Gruz Mother", "Forgotten Crossroads"], - Crossroads_09: ["Brooding Mawlek", "Forgotten Crossroads"] + Crossroads_04: ["Gruz Mother", "Forgotten Crossroads"], // killedBigFly + Crossroads_09: ["Brooding Mawlek", "Forgotten Crossroads"] // killedMawlek }; // reference: https://radiance.host/apidocs/Charms.html @@ -648,12 +646,13 @@ function InitialHTMLPopulate(divIdObj) { document.getElementById(divIdObj.intro.id).innerHTML += divStart + icon + textFill + divEnd; // Game Completion - textFill = "Game Completion: 0 % (out of 112 %)"; + textFill = "Game Completion: 0 % (out of " + divIdObj.intro.maxPercent + " %)"; document.getElementById(divIdObj.intro.id).innerHTML += divStart + completionSymbol + textFill + divEnd; // Temp arrays storing references (addresses) to objects for looping through them (duplicates important) let hkObjArray = [HK_BOSSES, HK_BOSSES_WORLD, HK_CHARMS, HK_EQUIPMENT, HK_NAILARTS, HK_MASKSHARDS, HK_MASKSHARDS_WORLD, HK_VESSELFRAGMENTS, HK_VESSELFRAGMENTS_WORLD, HK_DREAMERS, HK_COLOSSEUM, HK_DREAMNAIL, HK_WARRIORDREAMS, HK_GRIMMTROUPE, HK_LIFEBLOOD, HK_GODMASTER]; + // duplicates and order important - must be the same as in hkObjArray[] let divObjArray = [divIdObj.bosses, divIdObj.bosses, divIdObj.charms, divIdObj.equipment, divIdObj.nailArts, divIdObj.maskShards, divIdObj.maskShards, divIdObj.vesselFragments, divIdObj.vesselFragments, divIdObj.dreamers, divIdObj.colosseum, divIdObj.dreamNail, divIdObj.warriorDreams, divIdObj.grimmTroupe, divIdObj.lifeblood, divIdObj.godmaster]; // Looped filling to reduce redundancy diff --git a/index.html b/index.html index 35c7ed0..ec46dd8 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,11 @@ - + + - - + + Hollow Knight Completion Check Tool @@ -18,10 +19,7 @@ - - - @@ -31,7 +29,6 @@ - Single Pale Ore locations? (required for completion) - Single Keys/Pass locations? (required for completion) - Spoiler-free hints where to go next? (ala Elderbug) - 1. (before False Knight) Explore Forgotten Crossroads. -->