From 960a17c0d55060795887f43b50a1efdcbb7aca3b Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Thu, 28 Jan 2021 20:16:15 +0100 Subject: [PATCH] docs, capital names for constant images --- src/js/HKCheckCompletion.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/js/HKCheckCompletion.js b/src/js/HKCheckCompletion.js index bc9968d..de1110b 100644 --- a/src/js/HKCheckCompletion.js +++ b/src/js/HKCheckCompletion.js @@ -1,12 +1,17 @@ /* eslint-disable no-unused-vars */ /* eslint-disable no-prototype-builtins */ +// ---------------- Load main Hollow Knight database file ----------------- // + import * as HK from "./hk-database.js"; -import healthMaskImage from "../img/health-mask.png"; -import healthMaskSteelImage from "../img/health-mask-steel.png"; -import soulOrbImage from "../img/soul-orb.png"; -import notchImage from "../img/notch.png"; -import geoImage from "../img/geo.png"; + +// ---------------- Load image files (necessary for Webpack) ----------------- // + +import HEALTH_MASK_IMAGE from "../img/health-mask.png"; +import HEALTH_MASK_STEEL_IMAGE from "../img/health-mask-steel.png"; +import SOUL_ORB_IMAGE from "../img/soul-orb.png"; +import NOTCH_IMAGE from "../img/notch.png"; +import GEO_IMAGE from "../img/geo.png"; // ---------------- Constants ----------------- // @@ -426,8 +431,8 @@ function CheckHealthMasks(divId, masks = 5, permadeathMode = 0) { let icon = SYMBOL_EMPTY; let textFill = "Health:"; let maskImages = ""; - let maskNormal = `health mask image`; - let maskSteel = `steel health mask image`; + let maskNormal = `health mask image`; + let maskSteel = `steel health mask image`; let maskImg = ""; (permadeathMode === 1) ? maskImg = maskSteel: maskImg = maskNormal; @@ -449,7 +454,7 @@ function CheckSoulOrbs(divId, totalSoul) { let icon = SYMBOL_EMPTY; let textFill = "Soul:"; let soulImages = ""; - let soulNormal = `soul orb image`; + let soulNormal = `soul orb image`; let soulImg = soulNormal; for (let i = 0, total = totalSoul / 33; i < total; i++) { @@ -467,7 +472,7 @@ function CheckSoulOrbs(divId, totalSoul) { function CheckGeo(divId, geoValue) { let icon = SYMBOL_EMPTY; - let textFill = `Geo:geo symbol image${geoValue}`; + let textFill = `Geo:geo symbol image${geoValue}`; document.getElementById(divId.id).innerHTML += divStartCenter + icon + textFill + divEnd; } @@ -482,7 +487,7 @@ function CheckNotches(divId, totalNotches = 3) { let icon = SYMBOL_EMPTY; let textFill = `Notches:${pSpan}`; let notchImages = ""; - let notchImg = `notch image`; + let notchImg = `notch image`; for (let i = 0; i < totalNotches; i++) { notchImages += notchImg;