docs for CountGeoRocks
This commit is contained in:
parent
2b552afe6f
commit
eab973158a
2 changed files with 8 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -706,6 +706,11 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData, sceneDa
|
||||||
return totalMaps;
|
return totalMaps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Counts the total amount of Geo Rocks Unbroken or Broken. Logs to console all the Unbroken IDs and Map locations.
|
||||||
|
* @param {number} arrayLength How many items the Geo Rocks array is currently storing (for iteration)
|
||||||
|
* @param {string} mode Choose which Geo Rocks to count (broken or unbroken)
|
||||||
|
*/
|
||||||
function CountGeoRocks(arrayLength, mode = "unbroken") {
|
function CountGeoRocks(arrayLength, mode = "unbroken") {
|
||||||
|
|
||||||
let countTotal = 0;
|
let countTotal = 0;
|
||||||
|
|
@ -726,6 +731,7 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData, sceneDa
|
||||||
return countTotal;
|
return countTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start main loop
|
||||||
for (let i in dataObject) {
|
for (let i in dataObject) {
|
||||||
textPrefix = dataObject[i][0];
|
textPrefix = dataObject[i][0];
|
||||||
(dataObject[i][1]) ? textSuffix = dataObject[i][1]: textSuffix = "";
|
(dataObject[i][1]) ? textSuffix = dataObject[i][1]: textSuffix = "";
|
||||||
|
|
@ -846,7 +852,7 @@ function CheckAdditionalThings(divId, dataObject, playerData, worldData, sceneDa
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
(playerData[i] === true) ? CurrentDataTrue(): CurrentDataFalse();
|
(playerData[i] === true) ? CurrentDataTrue(): CurrentDataFalse();
|
||||||
}
|
} // end main for loop
|
||||||
|
|
||||||
FillHTML(divId, textPrefix, textSuffix);
|
FillHTML(divId, textPrefix, textSuffix);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue