From 8f3c1fe03a8fbddbb0e27d36afac0a1801a5841d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 19 Jun 2021 07:02:51 -0700 Subject: [PATCH] Update glowshroom.dm --- code/game/objects/effects/glowshroom.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 0d544f7a7d..bba8f680e6 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -195,8 +195,14 @@ /obj/structure/glowshroom/proc/Decay(spread, amount) if (spread) // Decay due to spread myseed.endurance -= amount + max_integrity = min(max_integrity, 10 + myseed.endurance / 2) + if(integrity > max_integrity) + integrity = max_integrity else // Timed decay myseed.endurance -= 1 + max_integrity = min(max_integrity, 10 + myseed.endurance / 2) + if(integrity > max_integrity) + integrity = max_integrity if (myseed.endurance > 0) addtimer(CALLBACK(src, .proc/Decay), delay_decay, FALSE) // Recall decay timer return