diff --git a/api/download.js b/api/download.js index 105d6d8..6124dd9 100644 --- a/api/download.js +++ b/api/download.js @@ -77,12 +77,6 @@ module.exports = async (app, req, res, api, ID, analyze) => { if (analyze) return app.run.analyze(app, req, res, level) - if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.endpoint - if (req.onePointNine) { - level.orbs = 0 - level.diamonds = 0 - } - function sendLevel() { if (api) return res.send(level) diff --git a/api/level.js b/api/level.js index 487600c..ae6c4f5 100644 --- a/api/level.js +++ b/api/level.js @@ -52,12 +52,6 @@ module.exports = async (app, req, res, api, analyze) => { if (level.author != "-") app.userCache(req.id, level.accountID, level.playerID, level.author) - if (req.isGDPS) level.gdps = (req.onePointNine ? "1.9/" : "") + req.endpoint - if (req.onePointNine) { - level.orbs = 0 - level.diamonds = 0 - } - function sendLevel() { if (api) return res.send(level) diff --git a/api/search.js b/api/search.js index 1c3a495..01b3f2d 100644 --- a/api/search.js +++ b/api/search.js @@ -136,11 +136,6 @@ module.exports = async (app, req, res) => { level.songID = "Level " + [parseInt(x[12]) + 1] } - if (req.onePointNine) { - level.orbs = 0 - level.diamonds = 0 - } - if (demonMode) { if (!y) level.demonList = req.server.demonList level.demonPosition = demonList[req.id].list.indexOf(level.id) + 1 diff --git a/assets/gdps/cnek_icon.png b/assets/gdps/cnek_icon.png new file mode 100644 index 0000000..0456d4b Binary files /dev/null and b/assets/gdps/cnek_icon.png differ diff --git a/assets/gdps/cnek_logo.png b/assets/gdps/cnek_logo.png new file mode 100644 index 0000000..d310993 Binary files /dev/null and b/assets/gdps/cnek_logo.png differ diff --git a/assets/mod-extra.png b/assets/mod-extra.png new file mode 100644 index 0000000..00d02be Binary files /dev/null and b/assets/mod-extra.png differ diff --git a/classes/Level.js b/classes/Level.js index 38c29f6..1556e0e 100644 --- a/classes/Level.js +++ b/classes/Level.js @@ -3,6 +3,7 @@ const XOR = require(__dirname + "/../classes/XOR"); let orbs = [0, 0, 50, 75, 125, 175, 225, 275, 350, 425, 500] let length = ['Tiny', 'Short', 'Medium', 'Long', 'XL'] let difficulty = { 0: 'Unrated', 10: 'Easy', 20: 'Normal', 30: 'Hard', 40: 'Harder', 50: 'Insane' } +let demonTypes = { 3: "Easy", 4: "Medium", 5: "Insane", 6: "Extreme" } class Level { constructor(levelInfo, server, download, author = []) { @@ -43,11 +44,8 @@ class Level { this.large = levelInfo[45] > 40000; this.cp = Number((this.stars > 0) + this.featured + this.epic) - if (levelInfo[17] > 0) this.difficulty += ' Demon' - if (this.difficulty == "Insane Demon") this.difficulty = "Extreme Demon" - else if (this.difficulty == "Harder Demon") this.difficulty = "Insane Demon" - else if (this.difficulty == "Normal Demon") this.difficulty = "Medium Demon" - else if (levelInfo[25] > 0) this.difficulty = 'Auto'; + if (levelInfo[17] > 0) this.difficulty = (demonTypes[levelInfo[43]] || "Hard") + " Demon" + if (levelInfo[25] > 0) this.difficulty = 'Auto' this.difficultyFace = `${levelInfo[17] != 1 ? this.difficulty.toLowerCase() : `demon-${this.difficulty.toLowerCase().split(' ')[0]}`}${this.epic ? '-epic' : `${this.featured ? '-featured' : ''}`}` if (this.password && this.password != 0) { @@ -57,6 +55,15 @@ class Level { else this.password = pass; } + if (server.onePointNine) { + this.orbs = 0 + this.diamonds = 0 + if (this.difficultyFace.startsWith('demon')) { + this.difficulty = "Demon" + this.difficultyFace = this.difficultyFace.replace(/demon-.+?($|-)(.+)?/, "demon$1$2") + } + } + if (this.editorTime == 1 && this.totalEditorTime == 2) { this.editorTime = 0; this.totalEditorTime = 0 } // remove GDPS default values } } diff --git a/html/achievements.html b/html/achievements.html index 6f975c1..a55b400 100644 --- a/html/achievements.html +++ b/html/achievements.html @@ -7,6 +7,7 @@ +
diff --git a/html/analyze.html b/html/analyze.html index dfa806a..2d86e48 100644 --- a/html/analyze.html +++ b/html/analyze.html @@ -5,6 +5,7 @@ + diff --git a/html/api.html b/html/api.html index 008c33a..6a596ea 100644 --- a/html/api.html +++ b/html/api.html @@ -11,6 +11,7 @@ + diff --git a/html/boomlings.html b/html/boomlings.html index eeff84d..21dae76 100644 --- a/html/boomlings.html +++ b/html/boomlings.html @@ -8,6 +8,7 @@ + diff --git a/html/comments.html b/html/comments.html index 5f874af..4f9c3c4 100644 --- a/html/comments.html +++ b/html/comments.html @@ -7,6 +7,7 @@ + diff --git a/html/demon.html b/html/demon.html index be471a9..8e63c50 100644 --- a/html/demon.html +++ b/html/demon.html @@ -7,6 +7,7 @@ + diff --git a/html/filters.html b/html/filters.html index bd5011b..394d622 100644 --- a/html/filters.html +++ b/html/filters.html @@ -7,6 +7,7 @@ + diff --git a/html/gauntlets.html b/html/gauntlets.html index ab58878..d4d9728 100644 --- a/html/gauntlets.html +++ b/html/gauntlets.html @@ -7,6 +7,7 @@ + diff --git a/html/gdps.html b/html/gdps.html index 17e0ebd..13e5caf 100644 --- a/html/gdps.html +++ b/html/gdps.html @@ -7,6 +7,7 @@ + diff --git a/html/home.html b/html/home.html index f32ff30..1c9b61e 100644 --- a/html/home.html +++ b/html/home.html @@ -7,6 +7,7 @@ + diff --git a/html/iconkit.html b/html/iconkit.html index 2c00b89..72cbeb8 100644 --- a/html/iconkit.html +++ b/html/iconkit.html @@ -8,6 +8,7 @@ + diff --git a/html/leaderboard.html b/html/leaderboard.html index 6e34a7a..3312771 100644 --- a/html/leaderboard.html +++ b/html/leaderboard.html @@ -7,6 +7,7 @@ + diff --git a/html/level.html b/html/level.html index 942c97d..ff91962 100644 --- a/html/level.html +++ b/html/level.html @@ -7,6 +7,7 @@ + diff --git a/html/levelboard.html b/html/levelboard.html index d63f389..16acefb 100644 --- a/html/levelboard.html +++ b/html/levelboard.html @@ -7,6 +7,7 @@ + diff --git a/html/mappacks.html b/html/mappacks.html index fe913a7..c7e668f 100644 --- a/html/mappacks.html +++ b/html/mappacks.html @@ -7,6 +7,7 @@ + diff --git a/html/messages.html b/html/messages.html index 9322155..2029802 100644 --- a/html/messages.html +++ b/html/messages.html @@ -8,6 +8,7 @@ + diff --git a/html/offline.html b/html/offline.html index 83616f9..bbc2da8 100644 --- a/html/offline.html +++ b/html/offline.html @@ -7,6 +7,7 @@ + diff --git a/html/profile.html b/html/profile.html index 012155d..f411305 100644 --- a/html/profile.html +++ b/html/profile.html @@ -7,6 +7,7 @@ + @@ -75,10 +76,15 @@[[RANK]]
+[[RANK]]
-