fix botany growthstage rounding error

This commit is contained in:
yorii
2020-10-03 22:39:33 +02:00
committed by GitHub
parent 6e10e0800e
commit 25150a2a7a
+1 -1
View File
@@ -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