From 4fdc813b38e383b560f7d133f4a205844bcb008e Mon Sep 17 00:00:00 2001 From: Justin Pridgen <52604018+bokuwaboingo@users.noreply.github.com> Date: Fri, 2 Apr 2021 02:10:52 -0400 Subject: [PATCH 1/6] Coins in Level Analysis: Part 1 --- misc/analysis/objects.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/analysis/objects.json b/misc/analysis/objects.json index 5f8f8b73..72a4742d 100644 --- a/misc/analysis/objects.json +++ b/misc/analysis/objects.json @@ -20,6 +20,10 @@ "1334": "4x" }, + "coins": { + "1329": "coin" + }, + "orbs": { "36": "yellow", "84": "blue", @@ -109,4 +113,4 @@ "monsters": ["Monsters", 918, 1327, 1328, 1584], "fires": ["Fire", 920, 923, 924, 921] } -} \ No newline at end of file +} From 7e0ae6c0182ac6572cc6c5d9781dacbb5c0605d0 Mon Sep 17 00:00:00 2001 From: Justin Pridgen <52604018+bokuwaboingo@users.noreply.github.com> Date: Fri, 2 Apr 2021 02:11:41 -0400 Subject: [PATCH 2/6] Coins in Level Analysis: Part 2 --- api/analyze.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/analyze.js b/api/analyze.js index a51d0093..7521792e 100644 --- a/api/analyze.js +++ b/api/analyze.js @@ -78,6 +78,7 @@ function analyze_level(level, rawData) { const header = data.shift(); let level_portals = []; + let level_coins = []; let level_text = []; let orb_array = {}; @@ -94,6 +95,9 @@ function analyze_level(level, rawData) { if (id in ids.portals) { obj.portal = ids.portals[id]; level_portals.push(obj); + } else if (id in ids.coins) { + obj.coin = ids.coins[id]; + level_coins.push(obj); } else if (id in ids.orbs) { obj.orb = ids.orbs[id]; @@ -153,6 +157,8 @@ function analyze_level(level, rawData) { response.settings = {} response.portals = level_portals.sort(function (a, b) {return parseInt(a.x) - parseInt(b.x)}).map(x => x.portal + " " + Math.floor(x.x / (Math.max(last, 529.0) + 340.0) * 100) + "%").join(", ") + response.coins = level_coins.sort(function (a, b) {return parseInt(a.x) - parseInt(b.x)}).map(x => x.coin + " " + Math.floor(x.x / (Math.max(last, 529.0) + 340.0) * 100) + "%").join(", ") + response.coinsVerified = level.verifiedCoins response.orbs = orb_array response.orbs.total = Object.values(orb_array).reduce((a, x) => a + x, 0); // we already have an array of objects, use it From bfebde806990ff3c5091b3b21075912896321195 Mon Sep 17 00:00:00 2001 From: Justin Pridgen <52604018+bokuwaboingo@users.noreply.github.com> Date: Fri, 2 Apr 2021 02:12:23 -0400 Subject: [PATCH 3/6] Coins in Level Analysis: Part 3 --- html/analyze.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/html/analyze.html b/html/analyze.html index 20457ef4..435adb07 100644 --- a/html/analyze.html +++ b/html/analyze.html @@ -6,7 +6,7 @@ - + @@ -44,6 +44,9 @@

Low Detail Mode

+

Coin order

+
+

Portal order

@@ -144,6 +147,7 @@

Level Data

let colorList = Object.keys(res.colors) let portals = res.portals.split(", ").map(x => x.split(" ")) +let coins = res.coins.split(", ").map(x => x.split(" ")) function commafy(num) { return (+num || 0).toString().replace(/(\d)(?=(\d\d\d)+$)/g, "$1,") } @@ -169,6 +173,14 @@

Level Data

appendPortals() + coins.forEach(x => { + if (!x || x[0] == "") { + $('#coinText').remove() + $('#coins').remove() + } + else $('#coins').append(`

${x[1]}

`) + }) + triggerList.forEach(x => { if (x == "total") $('#triggerText').text(`Triggers (${commafy(res.triggers[x])})`) else $('#triggers').append(`

x${commafy(res.triggers[x])}

`) @@ -311,4 +323,4 @@

Brightness

}); - \ No newline at end of file + From ddaca744acb6695df4f6bfc03f9288d46fe98878 Mon Sep 17 00:00:00 2001 From: Justin Pridgen Date: Sat, 9 Jul 2022 00:23:25 -0400 Subject: [PATCH 4/6] Fix outdated credits --- html/home.html | 8 +++++++- misc/credits.json | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/html/home.html b/html/home.html index 99ed630f..8b90754c 100644 --- a/html/home.html +++ b/html/home.html @@ -134,6 +134,12 @@

No active daily level! { @@ -149,7 +155,7 @@

- +

diff --git a/misc/credits.json b/misc/credits.json index a7698780..5170fdad 100644 --- a/misc/credits.json +++ b/misc/credits.json @@ -27,7 +27,7 @@ { "header": "Demon List", - "name": "stadust", + "name": "Patrick", "ign": "stardust1971", "youtube": ["https://youtube.com/user/stardust19710", "youtube"], "twitter": ["https://twitter.com/stadust1971", "twitter"], @@ -38,8 +38,8 @@ "header": "API Help", "name": "SMJS", "ign": "SMJSGaming", - "youtube": ["https://youtube.com/channel/UCwEsWDs9kGN2vvoiNTJKdaQ", "youtube"], - "twitter": ["https://twitter.com/SMJS90708001", "twitter"], + "youtube": ["https://www.youtube.com/c/SMJSProductions", "youtube"], + "twitter": ["https://twitter.com/SMJSGaming", "twitter"], "github": ["https://github.com/SMJSGaming", "github"] }, @@ -54,10 +54,10 @@ { "header": "Level Analyzing Help", - "name": "Alten", + "name": "Naoei", "youtube": ["https://youtube.com/channel/UC9M8hLqh2yZIPSDvpyL7o8g", "youtube"], - "twitter": ["https://twitter.com/altenhh", "twitter"], - "github": ["https://github.com/Altenhh", "github"] + "twitter": ["https://twitter.com/___Laica", "twitter"], + "github": ["https://github.com/naoei", "github"] }, { From 7607fd73148b0a235a1f8998917803df12c85427 Mon Sep 17 00:00:00 2001 From: Justin Pridgen Date: Sat, 9 Jul 2022 01:03:24 -0400 Subject: [PATCH 5/6] Revert changes, now committing to patch branches, as not to force Colon to git cherry-pick --- html/home.html | 8 +------- misc/credits.json | 12 ++++++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/html/home.html b/html/home.html index 8b90754c..99ed630f 100644 --- a/html/home.html +++ b/html/home.html @@ -134,12 +134,6 @@

No active daily level! { @@ -155,7 +149,7 @@

- +
diff --git a/misc/credits.json b/misc/credits.json index 5170fdad..a7698780 100644 --- a/misc/credits.json +++ b/misc/credits.json @@ -27,7 +27,7 @@ { "header": "Demon List", - "name": "Patrick", + "name": "stadust", "ign": "stardust1971", "youtube": ["https://youtube.com/user/stardust19710", "youtube"], "twitter": ["https://twitter.com/stadust1971", "twitter"], @@ -38,8 +38,8 @@ "header": "API Help", "name": "SMJS", "ign": "SMJSGaming", - "youtube": ["https://www.youtube.com/c/SMJSProductions", "youtube"], - "twitter": ["https://twitter.com/SMJSGaming", "twitter"], + "youtube": ["https://youtube.com/channel/UCwEsWDs9kGN2vvoiNTJKdaQ", "youtube"], + "twitter": ["https://twitter.com/SMJS90708001", "twitter"], "github": ["https://github.com/SMJSGaming", "github"] }, @@ -54,10 +54,10 @@ { "header": "Level Analyzing Help", - "name": "Naoei", + "name": "Alten", "youtube": ["https://youtube.com/channel/UC9M8hLqh2yZIPSDvpyL7o8g", "youtube"], - "twitter": ["https://twitter.com/___Laica", "twitter"], - "github": ["https://github.com/naoei", "github"] + "twitter": ["https://twitter.com/altenhh", "twitter"], + "github": ["https://github.com/Altenhh", "github"] }, { From 27b74a3fcec2268bd4adcadd96e32f6274727ad7 Mon Sep 17 00:00:00 2001 From: Justin Pridgen Date: Sat, 9 Jul 2022 01:44:41 -0400 Subject: [PATCH 6/6] =?UTF-8?q?Swap=20featured=20and=20hall=20of=20fame=20?= =?UTF-8?q?=F0=9F=A6=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/home.html | 6 +++--- index.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/html/home.html b/html/home.html index 99ed630f..b882e708 100644 --- a/html/home.html +++ b/html/home.html @@ -54,13 +54,13 @@

Note

- + - + @@ -77,7 +77,7 @@

Note

- +
diff --git a/index.js b/index.js index 019a5f75..dc71880a 100644 --- a/index.js +++ b/index.js @@ -246,9 +246,9 @@ app.get("/", function(req, res) { html = html.replace('id="dl" style="display: none', 'style="display: block') .replace('No active daily level!', '[Blocked by RobTop]') } - if (html.includes('menuDisabled" src="../assets/category-weekly')) { // if weekly disabled, replace with featured + if (html.includes('menuDisabled" src="../assets/category-weekly')) { // if weekly disabled, replace with hall of fame html = html.replace('block" id="menu_weekly', 'none" id="menu_weekly') - .replace('none" id="menu_featured', 'block" id="menu_featured') + .replace('none" id="menu_hof', 'block" id="menu_hof') } return res.status(200).send(html) })