From 229a672f29a74fdbd934204cc4375fd31ab4e027 Mon Sep 17 00:00:00 2001 From: Mike Kuwait Date: Sat, 12 Aug 2023 00:59:35 +0300 Subject: [PATCH 1/2] Bug fix --- code/modules/hydroponics/hydro_tray.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm index 65cf76b19a4a..3e8772f2d710 100644 --- a/code/modules/hydroponics/hydro_tray.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -215,6 +215,8 @@ plant_health += (nutrilevel < 2 ? -healthmod : healthmod) if(seed.requires_water && prob(35)) plant_health += (waterlevel < 10 ? -healthmod : healthmod) + if(nutrilevel < 2) + plant_health = 0 // Check that pressure, heat and light are all within bounds. // First, handle an open system or an unconnected closed system. From 8e627a3a772997156ab5cc31d67e6956a03b871d Mon Sep 17 00:00:00 2001 From: Mike Kuwait Date: Sat, 12 Aug 2023 22:34:55 +0300 Subject: [PATCH 2/2] 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.