diff --git a/api/icon.js b/api/icon.js index 045821a..41db63b 100644 --- a/api/icon.js +++ b/api/icon.js @@ -4,36 +4,8 @@ const fs = require('fs'); const path = require('path'); const icons = require('../icons/gameSheet.json'); const colors = require('../misc/colors.json'); -const queryMapper = { - ship: { - form: 'ship', - ind: 22 - }, - ball: { - form: 'player_ball', - ind: 23 - }, - ufo: { - form: 'bird', - ind: 24 - }, - wave: { - form: 'dart', - ind: 25 - }, - robot: { - form: 'robot', - ind: 26 - }, - spider: { - form: 'spider', - ind: 43 - }, - cursed: { - form: 'spider', - ind: 43 - } -} +const forms = require('../icons/forms.json') + function recolor(img, col) { return img.scan(0, 0, img.bitmap.width, img.bitmap.height, function (x, y, idx) { if (img.bitmap.data.slice(idx, idx+3).every(function(val) {return val >= 20 && val <= 255})) { // If it's not "black, i.e. we want to recolor it" @@ -54,6 +26,7 @@ function fromIcons(filename) { return `./icons/${filename}`; } let cache = {}; + module.exports = async (app, req, res) => { let username = req.params.text @@ -83,7 +56,7 @@ module.exports = async (app, req, res) => { account[response2[i]] = response2[i + 1] } - let { form, ind } = queryMapper[req.query.form] || {}; + let { form, ind } = forms[req.query.form] || {}; form = form || 'player'; ind = ind || 21; diff --git a/assets/css/level.css b/assets/css/level.css index 4c8df64..6815977 100644 --- a/assets/css/level.css +++ b/assets/css/level.css @@ -619,6 +619,18 @@ input::-webkit-inner-spin-button { height: 5.5%; } +.githubChad { + display: inline-block; + width: 30%; + height: 20%; + margin: 1% 0%; +} + +.githubChad h2 { + margin-bottom: 3%; + font-size: 4vh; +} + .analysis { height: 20%; width: 90%; diff --git a/servers.code-workspace b/browser.code-workspace similarity index 100% rename from servers.code-workspace rename to browser.code-workspace diff --git a/html/filters.html b/html/filters.html index f0bc200..ebfd25e 100644 --- a/html/filters.html +++ b/html/filters.html @@ -150,7 +150,7 @@ $('.levelSearch').click(function() { if (url.endsWith('?type=0')) url = url.slice(0, -7) - window.location.href = url + window.location.href = url.replace(/\?type=0&/, "?") }) diff --git a/html/home.html b/html/home.html index c30418b..ae0e519 100644 --- a/html/home.html +++ b/html/home.html @@ -16,121 +16,6 @@