Tweak logic for showing level up notifs

This commit is contained in:
thepaperpilot 2023-05-19 08:20:31 -05:00
parent 51ed914f39
commit 4f80e00eb2

View file

@ -180,7 +180,11 @@ export const main = createLayer("main", function (this: BaseLayer) {
() => resourceLevels.value[resource], () => resourceLevels.value[resource],
(level, prevLevel) => { (level, prevLevel) => {
const diff = Decimal.sub(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( toast.info(
<div> <div>
<h3> <h3>