From 4f80e00eb2866a3d14a34ec7f3b7024daf8317fc Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 19 May 2023 08:20:31 -0500 Subject: [PATCH] Tweak logic for showing level up notifs --- src/data/projEntry.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index fc02dbc..bb0a577 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -180,7 +180,11 @@ export const main = createLayer("main", function (this: BaseLayer) { () => resourceLevels.value[resource], (level, prevLevel) => { const diff = Decimal.sub(level, prevLevel); - if (Decimal.gt(diff, 1) && settings.active === player.id) { + if ( + (Decimal.eq(level, 1) || Decimal.gt(diff, 1)) && + Decimal.gt(diff, Decimal.div(prevLevel, 100)) && + settings.active === player.id + ) { toast.info(