From 25150a2a7ab46be34ed31d339a2e0005b9a467b4 Mon Sep 17 00:00:00 2001 From: yorii Date: Sat, 3 Oct 2020 22:39:33 +0200 Subject: [PATCH] fix botany growthstage rounding error --- code/modules/hydroponics/hydroponics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index d79a8030a59..134e337fa4e 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -323,7 +323,7 @@ else I = image(icon = myseed.growing_icon, icon_state = myseed.icon_harvest) else - var/t_growthstate = min(round((age / myseed.maturation) * myseed.growthstages), myseed.growthstages) + var/t_growthstate = clamp(round((age / myseed.maturation) * myseed.growthstages), 1, myseed.growthstages) I = image(icon = myseed.growing_icon, icon_state = "[myseed.icon_grow][t_growthstate]") I.layer = OBJ_LAYER + 0.01 overlays += I