Demon levels but they actually work now
This commit is contained in:
parent
de053955e8
commit
165917fafa
28 changed files with 43 additions and 31 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
BIN
assets/gdps/cnek_icon.png
Normal file
BIN
assets/gdps/cnek_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
BIN
assets/gdps/cnek_logo.png
Normal file
BIN
assets/gdps/cnek_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
assets/mod-extra.png
Normal file
BIN
assets/mod-extra.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Achievements">
|
||||
<meta id="meta-desc" property="og:description" content="View the list of achievements in Geometry Dash!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/trophies/1.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Level Analysis">
|
||||
<meta id="meta-desc" property="og:description" content="Analyze a Geometry Dash level and view it's objects, portals, color channels, code, and more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/cp.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<link href="../assets/css/browser.css?" type="text/css" rel="stylesheet">
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-135255146-3"></script><script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-135255146-3');</script>
|
||||
<link rel="icon" href="../assets/cp.png">
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<meta id="meta-title" property="og:title" content="GDBrowser API">
|
||||
<meta id="meta-desc" property="og:description" content="It's basically the Geometry Dash API, but not terrible!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/difficulties/auto.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Boomlings Leaderboard">
|
||||
<meta id="meta-desc" property="og:description" content='"Never ask me for anything ever again." - Masahiro Sakurai (probably)'>
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/boomlings/red.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Level Comments">
|
||||
<meta id="meta-desc" property="og:description" content="View the comments of a Geometry Dash level!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/like.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Demon Leaderboard">
|
||||
<meta id="meta-desc" property="og:description" content="View the victors of a very hard Geometry Dash level!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/trophy-demon.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG darkBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Level Search">
|
||||
<meta id="meta-desc" property="og:description" content="Search for Geometry Dash levels, and filter by length, difficulty, song + more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/coin.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Gauntlets">
|
||||
<meta id="meta-desc" property="og:description" content="Because RobTop wanted to leave behind the monstrosity that is Map Packs.">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/gauntlet.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG darkBG" style="overflow-y:auto;" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="GD Multiverse Navigation Terminal">
|
||||
<meta id="meta-desc" property="og:description" content="That's uhh... that's just fancy talk for GDPS Browser. Select a popular GD private server and view its levels, creators, packs, leaderboards, and more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/unlock.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG vaultBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Geometry Dash Browser!">
|
||||
<meta id="meta-desc" property="og:description" content="Browse all of Geometry Dash's online features, right from this handy little website! Levels, profiles, leaderboards, comments, and more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/coin.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta property="og:type" content="website">
|
||||
<meta name="og:image" itemprop="image" content="https://gdbrowser.com/iconkitbuttons/iconkit.png">
|
||||
<meta name="theme-color" content="#CCFF55">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<link rel="icon" href="../assets/icon.png">
|
||||
</link>
|
||||
</head>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Leaderboards">
|
||||
<meta id="meta-desc" property="og:description" content="View Geometry Dash's leaderboards, plus an accurate and updated list of the top players.">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/trophy.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="[[NAME]] by [[AUTHOR]]">
|
||||
<meta id="meta-desc" property="og:description" content="ID: [[ID]] | Stars: [[STARS]] | Difficulty: [[DIFFICULTY]] | Downloads: [[DOWNLOADS]] | Likes: [[LIKES]] | Length: [[LENGTH]] | Song: [[SONGNAME]] ([[SONGID]])">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/difficulties/[[DIFFICULTYFACE]].png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Level Leaderboard">
|
||||
<meta id="meta-desc" property="og:description" content="View the leaderboard of a Geometry Dash level!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/trophy.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Map Packs">
|
||||
<meta id="meta-desc" property="og:description" content="Collections of terrible Geometry Dash levels that people only play because of the absurd number of icons they unlock.">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/folder.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" style="overflow-y:auto;" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Messages">
|
||||
<meta id="meta-desc" property="og:description" content="Read, write, and manage your Geometry Dash messages!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/messages.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Geometry Dash Browser!">
|
||||
<meta id="meta-desc" property="og:description" content="Browse all of Geometry Dash's online features, right from this handy little website! Levels, profiles, leaderboards, comments, and more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/assets/coin.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG vaultBG" style="overflow-y:auto;" onbeforeunload="saveUrl()">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="[[USERNAME]]'s profile">
|
||||
<meta id="meta-desc" property="og:description" content="Stars: [[STARS]] | Diamonds: [[DIAMONDS]] | Coins: [[COINS]] | User Coins: [[USERCOINS]] | Demons: [[DEMONS]] | CP: [[CP]]">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/icon/[[USERNAME]]">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
@ -75,10 +76,15 @@
|
|||
|
||||
<div class="brownBox center supercenter" style="width: 135vh; height: 82%; margin-top: -0.7%">
|
||||
|
||||
<div id="globalrank0" style="position: absolute; left: 0.3%; top: 1.5%; width: 18%; text-align: left">
|
||||
<p style="margin: 0;"><img src="../assets/trophy.png" class="inline valign" width="22%" style="cursor: help" title="Global Rank"> [[RANK]]</p>
|
||||
</div>
|
||||
|
||||
<h1 class="veryBig inline">
|
||||
<img class="inline valign" id="modBadge1" style="display: none; height: 7%; margin-right: -6%; cursor:help" src="../assets/mod.png" title="[[USERNAME]] is a moderator!">
|
||||
<img class="inline valign" id="modBadge2" style="display: none; height: 7%; margin-right: -6%; cursor:help" src="../assets/mod-elder.png" title="[[USERNAME]] is an elder moderator!">
|
||||
[[USERNAME]]
|
||||
<img class="inline valign" id="modBadge1" style="display: none; height: 7%; cursor:help" src="../assets/mod.png" title="[[USERNAME]] is a moderator!"><!--
|
||||
--><img class="inline valign" id="modBadge2" style="display: none; height: 7%; cursor:help" src="../assets/mod-elder.png" title="[[USERNAME]] is an elder moderator!"><!--
|
||||
--><img class="inline valign" id="modBadge3" style="display: none; height: 7%; cursor:help" src="../assets/mod-extra.png" title="[[USERNAME]] is a custom moderator! (tier [[MODERATOR]])"><!--
|
||||
--><span style="margin-left: 1.25%">[[USERNAME]]</span>
|
||||
</h1>
|
||||
|
||||
<hr style="margin-bottom: 2%">
|
||||
|
@ -126,10 +132,6 @@
|
|||
<a id="twitch" style="display: none" target="_blank" href="https://twitch.tv/[[TWITCH]]"><img src="../assets/twitch.png" class="gdButton socialButton"></a>
|
||||
</div>
|
||||
|
||||
<div id="globalrank0" style="position: absolute; left: 0.3%; top: 1.5%; width: 25%; text-align: left">
|
||||
<p style="margin: 0;"><img src="../assets/trophy.png" class="inline valign" width="18%" style="cursor: help" title="Global Rank"> [[RANK]]</p>
|
||||
</div>
|
||||
|
||||
<div class="supercenter" id="pageDown" style="left: 5%; top: 65%; height: 10%; display: none;">
|
||||
<img class="gdButton" src="../assets/arrow-left.png" height="95%" onclick="page -= 1; appendComments()">
|
||||
</div>
|
||||
|
@ -160,6 +162,7 @@ $('#message').html(messageText)
|
|||
$('#likeMessage').html(messageText.replace("profile posts", "liking posts").replace("postProfileComment", "like"))
|
||||
|
||||
$('#modBadge[[MODERATOR]]').show()
|
||||
if ("[[MODERATOR]]" > 3) $('#modBadge3').show()
|
||||
$('#globalrank[[RANK]]').hide()
|
||||
|
||||
let followed = localStorage.followed ? JSON.parse(localStorage.followed) : []
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta id="meta-title" property="og:title" content="Level Search">
|
||||
<meta id="meta-desc" property="og:description" content="Search for Geometry Dash levels, and filter by length, difficulty, song + more!">
|
||||
<meta id="meta-image" name="og:image" itemprop="image" content="../dragscroll.js">
|
||||
<meta name="twitter:card" content="summary">
|
||||
</head>
|
||||
|
||||
<body class="levelBG" onbeforeunload="saveUrl()">
|
||||
|
|
1
index.js
1
index.js
|
@ -219,6 +219,7 @@ app.get("/", function(req, res) {
|
|||
html = html.replace('"levelBG"', '"levelBG purpleBG"')
|
||||
.replace(/Geometry Dash Browser!/g, req.server.name + " Browser!")
|
||||
.replace("/assets/gdlogo", `/assets/gdps/${req.id}_logo`)
|
||||
.replace(/coin\.png/g, 'silvercoin.png')
|
||||
gdpsHide.forEach(x => { html = html.replace(`menu-${x}`, 'changeDaWorld') })
|
||||
}
|
||||
if (req.onePointNine) onePointNineDisabled.forEach(x => { html = html.replace(`menu-${x}`, 'menuDisabled') })
|
||||
|
|
|
@ -62,10 +62,10 @@
|
|||
|
||||
{
|
||||
"name": "CnekGDPS",
|
||||
"link": "cnekgdps.7m.pl/index.html/",
|
||||
"link": "http://cnekgdps.7m.pl/index.html/",
|
||||
"author": "Cnek",
|
||||
"authorLink": "https://www.youtube.com/channel/UCDgrf89BjVyrUYSxFIDxafw",
|
||||
"id": "cnekgdps",
|
||||
"id": "cnek",
|
||||
"endpoint": "http://cnekgdps.7m.pl/cnekgdpsdtb/"
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue