aboutsummaryrefslogtreecommitdiff
path: root/features/bestiary/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 21:15:14 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 21:15:14 +0800
commitd8aa514a40f3856376e50f180da3c3f79c608004 (patch)
tree82addd0df2d34e5d3fff980d6d71cdb1ce99562d /features/bestiary/index.js
parentc1f2703faf17aa31eafb28e7ae98c1b771b6e6ff (diff)
downloadSoopyV2-d8aa514a40f3856376e50f180da3c3f79c608004.tar.gz
SoopyV2-d8aa514a40f3856376e50f180da3c3f79c608004.tar.bz2
SoopyV2-d8aa514a40f3856376e50f180da3c3f79c608004.zip
more forge side rendering changes
Diffstat (limited to 'features/bestiary/index.js')
-rw-r--r--features/bestiary/index.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/features/bestiary/index.js b/features/bestiary/index.js
index 00d5752..d21fc2a 100644
--- a/features/bestiary/index.js
+++ b/features/bestiary/index.js
@@ -59,10 +59,6 @@ class Bestiary extends Feature {
}
this.registerStep(false, 5, this.updateHudElements)
- this.registerEvent("renderOverlay", this.renderHUD)
- // TODO
- // dragon
- // headless_horseman
let lastThing = undefined
let lastThingTime = 0
this.registerChat("${chat}", (chat) => {
@@ -120,12 +116,6 @@ class Bestiary extends Feature {
}
}
- renderHUD() {
- for (let stat of this.hudStat) {
- stat.textElement.render()
- }
- }
-
getBestiaryCount(id) {
if (!this.bestiaryData[id]) return "???"
let count = this.bestiaryData[id].count
@@ -156,6 +146,8 @@ class Bestiary extends Feature {
let type = stat.type.getValue()
stat.textElement.setText(`&6${this.bestiaryData[type]?.guiName}&7> &f${numberWithCommas(this.getBestiaryCount(type))}`)
+ } else {
+ stat.textElement.setText("")
}
})
}
@@ -248,6 +240,7 @@ class Bestiary extends Feature {
}
onDisable() {
+ this.hudStat.forEach(h => h.textElement.delete())
this.saveData()
}