_FindGeoRock method
This commit is contained in:
parent
8032b74275
commit
232b8dacc9
1 changed files with 16 additions and 0 deletions
|
|
@ -2428,6 +2428,11 @@ function ResetCompletion(db) {
|
||||||
|
|
||||||
class DataChecker {
|
class DataChecker {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used for checking and verifying data (like Grubs, Items or Geo Rocks) inside a player's save file.
|
||||||
|
* Pass a save to the object and it will be split automatically to playerData, boolData and geoRocksData.
|
||||||
|
* @param {object} saveFile The whole player's save file, in JSON format
|
||||||
|
*/
|
||||||
constructor(saveFile) {
|
constructor(saveFile) {
|
||||||
this.saveFile = saveFile;
|
this.saveFile = saveFile;
|
||||||
this.playerData = saveFile.playerData;
|
this.playerData = saveFile.playerData;
|
||||||
|
|
@ -2446,6 +2451,17 @@ class DataChecker {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_FindGeoRock(id = "", sceneName = "") {
|
||||||
|
|
||||||
|
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) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
checkItems(section) {
|
checkItems(section) {
|
||||||
this.section = section;
|
this.section = section;
|
||||||
this.entries = section.entries;
|
this.entries = section.entries;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue