From 258ad582413d0e8e9392a71445a8f58736cdbf1f Mon Sep 17 00:00:00 2001 From: whatsaxis <59597828+whatsaxis@users.noreply.github.com> Date: Thu, 26 Aug 2021 09:42:56 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20Minor=20bug=20fixes=20+=20Transp?= =?UTF-8?q?arency=20Slider=20for=20Release=201.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/gamemodes/Duels/tags.tsx | 4 +-- src/gamemodes/Duels/title.tsx | 2 +- src/useCache.tsx | 53 +++++------------------------------ src/useUsers.tsx | 3 -- 5 files changed, 11 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index 3b7f986..b3f9e67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "no-lye-overlay", "author": "WhatsAxis", - "version": "1.1.0", + "version": "1.1.1", "description": "A Hypixel stats overlay for the No Lye Guild.", "main": "./.webpack/main/index.js", "scripts": { diff --git a/src/gamemodes/Duels/tags.tsx b/src/gamemodes/Duels/tags.tsx index 8c0b956..bca3e36 100644 --- a/src/gamemodes/Duels/tags.tsx +++ b/src/gamemodes/Duels/tags.tsx @@ -107,8 +107,8 @@ export const columns: { [c: string]: ColumnImplemenetation } = { [Column.WLR]: { displayName: 'WLR', getValue: (player: Player) => { - const wins = _(player.stats?.player?.stats?.Bedwars?.wins_bedwars) - const losses = player.stats?.player?.stats?.Bedwars?.losses_bedwars + const wins = _(player.stats?.player?.stats?.Duels?.wins) + const losses = player.stats?.player?.stats?.Duels?.losses return wins / (losses ? losses : 1) }, diff --git a/src/gamemodes/Duels/title.tsx b/src/gamemodes/Duels/title.tsx index 4668e1b..45d1d88 100644 --- a/src/gamemodes/Duels/title.tsx +++ b/src/gamemodes/Duels/title.tsx @@ -13,7 +13,7 @@ interface Title { const titles: Title[] = [ { name: 'Rookie', - color: 'GRAY', + color: 'DARK_GRAY', min: 50 * 2, increment: 10 * 2, bold: false diff --git a/src/useCache.tsx b/src/useCache.tsx index 8fb541c..a31aa1a 100644 --- a/src/useCache.tsx +++ b/src/useCache.tsx @@ -1,12 +1,5 @@ import { useState } from 'react' -import UnknownFace from '../assets/images/Overlays/unknown.png' - - -function c() { - console.log('════════════════════════') -} - interface UUID { [username: string]: string } @@ -33,24 +26,16 @@ export function useCache() { // UUID Cache const UUIDCacheIncludes = (username: string) => { - c() - console.log('[CALL] UUID Cache Includes') if (Object.keys(UUIDCache).includes(username)) { - console.log(true) return true } - console.log(false) - c() + return false } const UUIDCacheAdd = (entry: UUIDEntry) => { - c() - console.log('[CALL] UUID Cache Add') if (Object.keys(UUIDCache).includes(entry.username)) throw new Error('This UUID has already been cached!') - console.log('Added ' + entry.uuid + ' to UUID cache.') - setUUIDCache(c => { let tmp = c @@ -58,65 +43,45 @@ export function useCache() { return tmp }) - - c() } const UUIDCacheGet = (username: string) => { - c() - console.log('[CALL] UUID Cache Get') if (!Object.keys(UUIDCache).includes(username)) { - console.log(null) return null } - console.log(UUIDCache[username]) - c() + return UUIDCache[username] } // Nick Cache const NickCacheIncludes = (username: string) => { - c() if (NickCache.includes(username)) return true - console.log('[CALL] Nick Cache Includes') - console.log(NickCache.includes(username) ? true : false) - c() + return false } const NickCacheAdd = (username: string) => { - c() - console.log('[CALL] Nick Cache Add') if (NickCache.includes(username)) { - console.log('[ERROR] Already cached') throw new Error('This nick has already been cached!') } - console.log('[ADD] ' + username) + setNickCache(c => [...c, username]) - c() + } // Skin Cache const SkinCacheIncludes = (username: string) => { - c() - console.log('[CALL] Skin Cache Includes') - console.log(Object.keys(SkinCache).includes(username) ? true : false) if (Object.keys(SkinCache).includes(username)) return true - c() + return false } const SkinCacheAdd = (entry: SkinEntry) => { - c() if (Object.keys(SkinCache).includes(entry.username)) throw new Error('This skin has already been cached!') - console.log('[CALL] Skin Cache Add') - console.log('[ADD] ' + entry.username) - console.log(entry.skin) - setSkinCache(c => { let tmp = c @@ -124,14 +89,10 @@ export function useCache() { return tmp }) - c() + } const SkinCacheGet = (username: string) => { - c() - console.log('[CALL] Skin Cache Get') - console.log(SkinCache[username]) - c() return SkinCache[username] } diff --git a/src/useUsers.tsx b/src/useUsers.tsx index 40ea992..69f9a52 100644 --- a/src/useUsers.tsx +++ b/src/useUsers.tsx @@ -99,11 +99,9 @@ export function useUsers() { useEffect(() => { window.Main.on('server_change', (e: Electron.IpcRendererEvent) => { clearUsers() - console.log('════════════ Server Change ════════════') }) window.Main.on('who', async (e: Electron.IpcRendererEvent, Users: string[]) => { - console.log('Used /who') const notInUsersArray = Users.filter(u => !users.some((U: Player) => U.username === u)) for (const u of notInUsersArray) { new Promise(async (resolve, reject) => { @@ -124,7 +122,6 @@ export function useUsers() { window.Main.on('leave', (e: Electron.IpcRendererEvent, user: string) => { setUsers(u => u.filter(i => i.username !== user)) - console.log(user + ' left!') }) return () => {