From a98323442455b0e3c8e29469eed81dc36bc1a1be Mon Sep 17 00:00:00 2001 From: Nate Stringham <44071655+nstringham@users.noreply.github.com> Date: Mon, 6 Feb 2023 13:49:17 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20enchanted=20glint?= =?UTF-8?q?=20to=20golden=20apples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/resources/ts/stats-defer.ts | 5 +++++ views/stats.ejs | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/public/resources/ts/stats-defer.ts b/public/resources/ts/stats-defer.ts index 3bdec3138c..85b0179400 100644 --- a/public/resources/ts/stats-defer.ts +++ b/public/resources/ts/stats-defer.ts @@ -177,6 +177,11 @@ export function isEnchanted(item: Item): boolean { return true; } + // enchanted golden apple + if (item.id === 322 && item.Damage === 1) { + return true; + } + //potions with actual effects (not water bottles) if (item.id === 373 && item.Damage !== 0) { return true; diff --git a/views/stats.ejs b/views/stats.ejs index 9a88ff9990..1f604459f7 100644 --- a/views/stats.ejs +++ b/views/stats.ejs @@ -299,6 +299,11 @@ function isEnchanted(item) { return true; } + // enchanted golden apple + if (item.id === 322 && item.Damage === 1) { + return true; + } + // potions potions with actual effects (not water bottles) if (item.id === 373 && item.Damage !== 0) { return true; @@ -2804,7 +2809,7 @@ const metaDescription = getMetaDescription()

<% } %> - <% if('effects' in calculated.misc){ + <% if('effects' in calculated.misc){ if (Object.keys(calculated.misc.effects).some((key) => Object.keys(calculated.misc.effects[key]).length > 0)) { %>
@@ -2812,7 +2817,7 @@ const metaDescription = getMetaDescription()
Potions
- <% + <% let effects_tooltips = []; for (const key of Object.keys(calculated.misc.effects).sort()) { effects_tooltips[key] ??= []; @@ -2820,7 +2825,7 @@ const metaDescription = getMetaDescription() if (key === "active") { if (potion?.effect === undefined || potion?.level === null) continue; effects_tooltips[key].push(`${constants.POTION_EFFECTS[potion.effect]?.[potion.level].name.replace('Potion', '') || potion.effect.split('_').map((effect) => helper.capitalizeFirstLetter(effect.toLowerCase())).join(' ')}
`) - + } else { potion = potion?.effect || potion @@ -2833,7 +2838,7 @@ const metaDescription = getMetaDescription() > Active Potion Effects: <%= calculated.misc.effects.active.length %>
- + > Paused Potion Effects: <%= calculated.misc.effects.paused.length %>