shorten _FindGeoRock()
This commit is contained in:
parent
6e3e789141
commit
a634f44c67
3 changed files with 9 additions and 8 deletions
|
|
@ -2248,11 +2248,10 @@ var DataChecker = /*#__PURE__*/function () {
|
|||
}, {
|
||||
key: "_FindGeoRock",
|
||||
value: function _FindGeoRock() {
|
||||
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
||||
var sceneName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
||||
var entry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
for (var i = 0, length = this.geoRocksData.length; i < length; i++) {
|
||||
if (this.geoRocksData[i].id === id && this.geoRocksData[i].sceneName === sceneName && this.geoRocksData[i].hitsLeft === 0) {
|
||||
if (this.geoRocksData[i].id === entry.id && this.geoRocksData[i].sceneName === entry.sceneName && this.geoRocksData[i].hitsLeft === 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2296,7 +2295,7 @@ var DataChecker = /*#__PURE__*/function () {
|
|||
for (var i in this.entries) {
|
||||
switch (i) {
|
||||
default:
|
||||
if (this._FindGeoRock(this.entries[i].id, this.entries[i].sceneName)) {
|
||||
if (this._FindGeoRock(this.entries[i])) {
|
||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconGreen)(this.section, i);
|
||||
} else {
|
||||
(0,_hk_functions_js__WEBPACK_IMPORTED_MODULE_2__.SetIconRed)(this.section, i);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2467,10 +2467,12 @@ class DataChecker {
|
|||
* @param {string} sceneName the Geo Rock's sceneName in the database.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
_FindGeoRock(id = "", sceneName = "") {
|
||||
_FindGeoRock(entry = {}) {
|
||||
|
||||
for (let i = 0, length = this.geoRocksData.length; i < length; i++) {
|
||||
if (this.geoRocksData[i].id === id && this.geoRocksData[i].sceneName === sceneName && this.geoRocksData[i].hitsLeft === 0) {
|
||||
if (this.geoRocksData[i].id === entry.id &&
|
||||
this.geoRocksData[i].sceneName === entry.sceneName &&
|
||||
this.geoRocksData[i].hitsLeft === 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2513,7 +2515,7 @@ class DataChecker {
|
|||
switch(i) {
|
||||
|
||||
default:
|
||||
if (this._FindGeoRock(this.entries[i].id, this.entries[i].sceneName)) {
|
||||
if (this._FindGeoRock(this.entries[i])) {
|
||||
SetIconGreen(this.section, i);
|
||||
} else {
|
||||
SetIconRed(this.section, i);
|
||||
|
|
|
|||
Loading…
Reference in a new issue