aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/objectives.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/cleaners/skyblock/objectives.js')
-rw-r--r--build/cleaners/skyblock/objectives.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/build/cleaners/skyblock/objectives.js b/build/cleaners/skyblock/objectives.js
new file mode 100644
index 0000000..d45307c
--- /dev/null
+++ b/build/cleaners/skyblock/objectives.js
@@ -0,0 +1,16 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.cleanObjectives = void 0;
+function cleanObjectives(data) {
+ const rawObjectives = (data === null || data === void 0 ? void 0 : data.objectives) || {};
+ const objectives = [];
+ for (const rawObjectiveName in rawObjectives) {
+ const rawObjectiveValue = rawObjectives[rawObjectiveName];
+ objectives.push({
+ name: rawObjectiveName,
+ completed: rawObjectiveValue.status === 'COMPLETE',
+ });
+ }
+ return objectives;
+}
+exports.cleanObjectives = cleanObjectives;