minor code fix

This commit is contained in:
ReznoRMichael 2020-09-04 12:40:46 +02:00
parent 345af8b859
commit 375f8c9a6f
2 changed files with 18 additions and 22 deletions

View file

@ -67,16 +67,6 @@ const DIV_ID = {
id: "hk-vesselfragments", id: "hk-vesselfragments",
maxPercent: 3 maxPercent: 3
}, },
dreamers: {
h2: "Dreamers",
id: "hk-dreamers",
maxPercent: 3
},
colosseum: {
h2: "Colosseum of Fools",
id: "hk-colosseum",
maxPercent: 3
},
dreamNail: { dreamNail: {
h2: "Dream Nail and Essence", h2: "Dream Nail and Essence",
id: "hk-dreamnail", id: "hk-dreamnail",
@ -87,6 +77,16 @@ const DIV_ID = {
id: "hk-warriordreams", id: "hk-warriordreams",
maxPercent: 7 maxPercent: 7
}, },
dreamers: {
h2: "Dreamers",
id: "hk-dreamers",
maxPercent: 3
},
colosseum: {
h2: "Colosseum of Fools",
id: "hk-colosseum",
maxPercent: 3
},
grimmTroupe: { grimmTroupe: {
h2: "Grimm Troupe Content Pack", h2: "Grimm Troupe Content Pack",
id: "hk-grimmtroupe", id: "hk-grimmtroupe",
@ -107,8 +107,6 @@ const DIV_ID = {
const HK_BOSSES = { const HK_BOSSES = {
falseKnightDefeated: ["False Knight", "Forgotten Crossroads"], // "Battle Scene" - "Crossroads_10" ? falseKnightDefeated: ["False Knight", "Forgotten Crossroads"], // "Battle Scene" - "Crossroads_10" ?
hornet1Defeated: ["Hornet Protector", "Greenpath"], 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"], 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"],
@ -123,8 +121,8 @@ const HK_BOSSES = {
// "Battle Scene" sceneData.persistentBoolItems.id // "Battle Scene" sceneData.persistentBoolItems.id
const HK_BOSSES_WORLD = { const HK_BOSSES_WORLD = {
Crossroads_04: ["Gruz Mother", "Forgotten Crossroads"], Crossroads_04: ["Gruz Mother", "Forgotten Crossroads"], // killedBigFly
Crossroads_09: ["Brooding Mawlek", "Forgotten Crossroads"] Crossroads_09: ["Brooding Mawlek", "Forgotten Crossroads"] // killedMawlek
}; };
// reference: https://radiance.host/apidocs/Charms.html // reference: https://radiance.host/apidocs/Charms.html
@ -648,12 +646,13 @@ function InitialHTMLPopulate(divIdObj) {
document.getElementById(divIdObj.intro.id).innerHTML += divStart + icon + textFill + divEnd; document.getElementById(divIdObj.intro.id).innerHTML += divStart + icon + textFill + divEnd;
// Game Completion // Game Completion
textFill = "Game Completion: <b>0 %</b> (out of 112 %)"; textFill = "Game Completion: <b>0 %</b> (out of " + divIdObj.intro.maxPercent + " %)";
document.getElementById(divIdObj.intro.id).innerHTML += divStart + completionSymbol + textFill + divEnd; document.getElementById(divIdObj.intro.id).innerHTML += divStart + completionSymbol + textFill + divEnd;
// Temp arrays storing references (addresses) to objects for looping through them (duplicates important) // 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]; 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]; 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 // Looped filling to reduce redundancy

View file

@ -3,10 +3,11 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="../favicon.png" rel="icon">
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700&display=swap" rel="stylesheet">
<link href="css/fontello.css" rel="stylesheet" type="text/css"> <link href="css/fontello.css" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css"> <link href="style.css" rel="stylesheet">
<title>Hollow Knight Completion Check Tool</title> <title>Hollow Knight Completion Check Tool</title>
<meta name="description" content="A simple open source tool for checking what you missed for your Game Completion Percentage."> <meta name="description" content="A simple open source tool for checking what you missed for your Game Completion Percentage.">
<meta name="keywords" content="hollow knight, tool, online, save, game, completion, check, checker, percentage, percent, left"> <meta name="keywords" content="hollow knight, tool, online, save, game, completion, check, checker, percentage, percent, left">
@ -18,10 +19,7 @@
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta property="og:site_name" content="rezno[R].tech"> <meta property="og:site_name" content="rezno[R].tech">
<meta name="twitter:image:alt" content="Hollow Knight Completion Check Tool"> <meta name="twitter:image:alt" content="Hollow Knight Completion Check Tool">
<meta name="author" content="ReznoR Michael"> <meta name="author" content="ReznoR Michael">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="icon" href="../favicon.png">
</head> </head>
<body> <body>
@ -31,7 +29,6 @@
- Single Pale Ore locations? (required for completion) - Single Pale Ore locations? (required for completion)
- Single Keys/Pass locations? (required for completion) - Single Keys/Pass locations? (required for completion)
- Spoiler-free hints where to go next? (ala Elderbug) - Spoiler-free hints where to go next? (ala Elderbug)
1. (before False Knight) Explore Forgotten Crossroads.
--> -->
<div id="content"> <div id="content">