diff options
-rw-r--r-- | features/cosmetics/index.js | 1 | ||||
-rw-r--r-- | features/globalSettings/firstLoadPages.js | 2 | ||||
-rw-r--r-- | features/hud/index.js | 6 | ||||
-rw-r--r-- | features/soopyGui/GuiPage.js | 6 | ||||
-rw-r--r-- | features/soopyGui/index.js | 8 | ||||
-rw-r--r-- | utils/numberUtils.js | 29 |
6 files changed, 47 insertions, 5 deletions
diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js index 4803999..1eb73d7 100644 --- a/features/cosmetics/index.js +++ b/features/cosmetics/index.js @@ -39,7 +39,6 @@ class Cosmetics extends Feature { this.registerEvent("playerLeft", this.playerLeft) this.registerEvent("worldLoad", this.worldLoad) this.registerStep(false, 5, this.step) - this.registerStep(false, 1, this.step1) this.registerStep(false, 60*10, ()=>{ new Thread(()=>{this.loadCosmeticsData.call(this)}).start() }) diff --git a/features/globalSettings/firstLoadPages.js b/features/globalSettings/firstLoadPages.js index 6185bd5..50b9eee 100644 --- a/features/globalSettings/firstLoadPages.js +++ b/features/globalSettings/firstLoadPages.js @@ -70,7 +70,7 @@ class HowToOpenMenuPage extends FirstLoadPage{ this.addChild(new SoopyTextElement().setText("§0Your all set!").setLocation(0.1, 0.1,0.8,0.3).setMaxTextScale(10)); - this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopyv2§7.").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10)); + this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopy§7.").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10)); let openSettingsButton = new ButtonWithArrow().setText("§0Open settings").setLocation(0.1, 0.5,0.3,0.2).setDirectionRight(false) diff --git a/features/hud/index.js b/features/hud/index.js index f224839..c600153 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -85,7 +85,8 @@ class Hud extends Feature { this.petElement = new HudTextElement() .setToggleSetting(this.petEnabledSetting) .setLocationSetting(new LocationSetting("Pet Location", "Allows you to edit the location of the pet text", "pet_location", this, [10, 30, 1, 1]) - .requires(this.petEnabledSetting)) + .requires(this.petEnabledSetting) + .editTempText("&6Pet&7> &7[Lvl 100] &aEnderman")) this.hudElements.push(this.petElement) this.soulflowEnabledSetting = new ToggleSetting("Show Soulflow", "Whether the soulflow count is rendered onto the screen", true, "soulflow_enabled", this) @@ -94,7 +95,8 @@ class Hud extends Feature { this.soulflowElement = new HudTextElement() .setToggleSetting(this.soulflowEnabledSetting) .setLocationSetting(new LocationSetting("Soulflow Location", "Allows you to edit the location of the soulflow text", "soulflow_location", this, [10, 40, 1, 1]) - .requires(this.soulflowEnabledSetting)) + .requires(this.soulflowEnabledSetting) + .editTempText("&6Soulflow&7> &f12,345")) this.hudElements.push(this.soulflowElement) this.witherImpactCooldownSetting = new ToggleSetting("Show Wither Impact Cooldown", "This will render a small cooldown above your crosshair", true, "wither_impact_cooldown_enabled", this) diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js index fb93bbe..583eab9 100644 --- a/features/soopyGui/GuiPage.js +++ b/features/soopyGui/GuiPage.js @@ -7,7 +7,7 @@ class GuiPage{ this.soopyGui = undefined; new Thread(()=>{ - while(global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){ + while(global.soopyv2featuremanagerthing.features === undefined || global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){ Thread.sleep(100) } @@ -55,6 +55,10 @@ class GuiPage{ this.soopyGui.closeSidebarPage() } + delete(){ + this.soopyGui.deleteCategory(this); + } + //Override me :D onOpen(){ diff --git a/features/soopyGui/index.js b/features/soopyGui/index.js index cb5b241..662221d 100644 --- a/features/soopyGui/index.js +++ b/features/soopyGui/index.js @@ -35,6 +35,7 @@ class SoopyGui extends Feature { // this.gui.isDebugEnabled = true this.registerCommand("soopyv2", this.openCommand) + this.registerCommand("soopy", this.openCommand) this.mainWindowElement = new SoopyBoxElement().setLocation(0.25, 0.2, 0.5, 0.6) @@ -92,6 +93,13 @@ class SoopyGui extends Feature { this.updateButtons() } + deleteCategory(category){ + this.pages = this.pages.filter(a=>a!==category) + this.sortPages() + + this.updateButtons() + } + updateButtons(){ if(!this.buttonListElm) return; diff --git a/utils/numberUtils.js b/utils/numberUtils.js index ccc270e..63240de 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -46,5 +46,34 @@ module.exports = { } return returnVal; + }, + timeSince:function (date) { + if (typeof date !== 'object') { + date = new Date(date); + } + + var seconds = Math.floor((new Date()-date) / 1000); + var intervalType; + + var interval = Math.floor(seconds / 31536000); + interval = Math.floor(seconds / 86400); + if (interval >= 1) { + intervalType = 'd'; + } else { + interval = Math.floor(seconds / 3600); + if (interval >= 1) { + intervalType = "h"; + } else { + interval = Math.floor(seconds / 60); + if (interval >= 1) { + intervalType = "m"; + } else { + interval = seconds; + intervalType = "s"; + } + } + } + + return interval + '' + intervalType; } }
\ No newline at end of file |