From 8e627a3a772997156ab5cc31d67e6956a03b871d Mon Sep 17 00:00:00 2001 From: Mike Kuwait Date: Sat, 12 Aug 2023 22:34:55 +0300 Subject: [PATCH] Plant dies if there are zero nutrients --- code/modules/hydroponics/hydro_tray.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm index 3e8772f2d710..9549b8fa59c1 100644 --- a/code/modules/hydroponics/hydro_tray.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -210,12 +210,13 @@ // Make sure the plant is not starving or thirsty. Adequate // water and nutrients will cause a plant to become healthier. + // Checks if there are sufficient enough nutrients, if not the plant dies. var/healthmod = rand(1,3) * HYDRO_SPEED_MULTIPLIER if(seed.requires_nutrients && prob(35)) plant_health += (nutrilevel < 2 ? -healthmod : healthmod) if(seed.requires_water && prob(35)) plant_health += (waterlevel < 10 ? -healthmod : healthmod) - if(nutrilevel < 2) + if(nutrilevel < 1) plant_health = 0 // Check that pressure, heat and light are all within bounds.