aboutsummaryrefslogtreecommitdiff
path: root/features/lockedFeatures
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-13 19:31:35 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-13 19:31:35 +0800
commit957eed606234a4bc5e1b847580000a583ab9ee5b (patch)
tree52dc09298d0506e05f76ab82a3e1fea3bbcacf69 /features/lockedFeatures
parent68129573d5412314b1fecf5b3e576e68bc150ce2 (diff)
downloadSoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.tar.gz
SoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.tar.bz2
SoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.zip
-dungeon map border and background
-guild event lb command (sbg event only)
Diffstat (limited to 'features/lockedFeatures')
-rw-r--r--features/lockedFeatures/index.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/features/lockedFeatures/index.js b/features/lockedFeatures/index.js
index 0226859..ffe6faa 100644
--- a/features/lockedFeatures/index.js
+++ b/features/lockedFeatures/index.js
@@ -26,6 +26,8 @@ class LockedFeatures extends Feature {
.requires(this.guildEventLb))
this.hudElements.push(this.guildLbElement)
+ this.eventCommand = undefined
+
this.registerStep(true, 1, this.step)
this.registerEvent("renderOverlay", this.renderOverlay)
}
@@ -33,11 +35,29 @@ class LockedFeatures extends Feature {
step(){
if(!SoopyV2Server.lbdatathing){
this.guildEventLbPossible.set(false)
+ if(this.eventCommand){
+ this.unregisterCommand("eventlb")
+ this.eventCommand = undefined
+ }
return;
}
this.guildEventLbPossible.set(true)
+ if(!this.eventCommand){
+ this.eventCommand = this.registerCommand("eventlb", ()=>{
+ SoopyV2Server.lbdatathing.forEach((u, i)=>{
+ let text = ""
+ text += "§6#" + (i+1)
+ text += "§7 - "
+ text += "§e"+u.username
+ text += "&7: §r"+numberWithCommas(Math.round(parseFloat(u.startingAmount)))
+ if(u.progress) text += " §7("+ (u.progress>0?"+":"-")+Math.abs(Math.round(u.progress)) + "/h)"
+ ChatLib.chat(text)
+ })
+ })
+ }
+
if(!this.guildEventLb.getValue()) return
let text = ""
@@ -81,7 +101,7 @@ class LockedFeatures extends Feature {
text = "&d ^ in " + timeNumber2(timeTillIncrease) + "\n"+text
}
if((timeTillIncrease > timeTillDecrease || (timeTillDecrease>0))&&timeTillIncrease<0 && timeTillDecrease < 10000000000){
- text = "&d V in " + timeNumber2(timeTillDecrease) + "\n"+text
+ text = "&d v in " + timeNumber2(timeTillDecrease) + "\n"+text
}
this.guildLbElement.setText(text)