Prevent Dionaea from being passively overfed. Fixes #9643

This commit is contained in:
MarinaGryphon
2021-07-13 21:41:53 -05:00
parent 35b4635e90
commit fc38b2a5df
@@ -618,7 +618,9 @@
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = T.get_lumcount() * 10
H.adjust_nutrition(light_amount)
// Don't overfeed, just make them full without going over.
if((H.nutrition + light_amount) < initial(H.nutrition))
H.adjust_nutrition(light_amount)
H.shock_stage -= light_amount
if(light_amount >= 3) //if there's enough light, heal