From 78b25d3bbe1d4189dc30defe5f5503d1630ecee4 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Wed, 19 Jan 2022 20:42:36 +0100 Subject: [PATCH] update DataChecker class --- src/js/HKCheckCompletion.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/js/HKCheckCompletion.js b/src/js/HKCheckCompletion.js index 32a5058..53e1c07 100644 --- a/src/js/HKCheckCompletion.js +++ b/src/js/HKCheckCompletion.js @@ -2400,9 +2400,33 @@ class DataChecker { this.geoRocksData = saveFile.sceneData.geoRocks; } + _FindItem(id = "", sceneName = "") { + + for (let i = 0, length = this.boolData.length; i < length; i++) { + if (this.boolData[i].id === id && this.boolData[i].sceneName === sceneName && this.boolData[i].activated === true) { + return true; + } + } + + return false; + } + checkItems(section) { this.section = section; this.entries = section.entries; + + for (let i of this.entries) { + + switch(i) { + + default: + if (this._FindItem(this.entries[i].id, this.entries[i].sceneName)) { + SetIconGreen(this.section, i); + } else { + SetIconRed(this.section, i); + } + } + } } }