aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--features/dungeonSolvers/index.js2
-rw-r--r--utils/nonPooledThread.js14
-rw-r--r--utils/statUtils.js18
3 files changed, 24 insertions, 10 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index e04c98a..53d1d2d 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -98,7 +98,7 @@ class DungeonSolvers extends Feature {
}
});
this.forgorEnabled = new ToggleSetting("Change withermancer death message to forgor ", "", true, "withermancer_forgor", this);
- this.f7waypoints = new ToggleSetting("Waypoints for P3 F7/M7", "", true, "f7_waypoints", this);
+ this.f7waypoints = new ToggleSetting("Waypoints for P3 F7/M7", "(Only shows unfinished ones)", true, "f7_waypoints", this);
this.registerChat("&r&c ☠ &r${player} were killed by Withermancer&r&7 and became a ghost&r&7.&r", (player, e) => {
if (this.forgorEnabled.getValue()) {
diff --git a/utils/nonPooledThread.js b/utils/nonPooledThread.js
index 2061db1..4720700 100644
--- a/utils/nonPooledThread.js
+++ b/utils/nonPooledThread.js
@@ -1,14 +1,14 @@
let Executors = Java.type("java.util.concurrent.Executors")
class NonPooledThread {
- constructor(fun) {
- this.fun = fun
- this.executor = Executors.newSingleThreadExecutor()
- }
+ constructor(fun) {
+ this.fun = fun
+ this.executor = Executors.newSingleThreadExecutor()
+ }
- start() {
- this.executor.execute(this.fun)
- }
+ start() {
+ this.executor.execute(this.fun)
+ }
}
export default NonPooledThread \ No newline at end of file
diff --git a/utils/statUtils.js b/utils/statUtils.js
index ae064cf..89b467d 100644
--- a/utils/statUtils.js
+++ b/utils/statUtils.js
@@ -280,14 +280,28 @@ function getLevelByXp(xp, type, levelCap) {
level++
xpCurrent -= 200000000
}
- if(level < levelCap){
+ if (level < levelCap) {
progress = xpCurrent / 200000000
xpForNext = 200000000
- }else{
+ } else {
progress = 0
xpForNext = NaN
}
}
+ if (type === 0 && level === 60 && levelCap === Infinity) {
+ maxLevel = Infinity
+ let slope = 600000
+ let xpForCurr = 7000000 + slope
+ while (xpCurrent > xpForCurr) {
+ level++
+ xpCurrent -= xpForCurr
+ xpForCurr += slope
+ if (level % 10 === 0) slope *= 2
+ }
+
+ progress = xpCurrent / xpForCurr
+ xpForNext = xpForCurr
+ }
return {
xp,
level,