Skip to content

Commit

Permalink
Plant dies if there are zero nutrients
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeKuwait committed Aug 12, 2023
1 parent 229a672 commit 8e627a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/hydroponics/hydro_tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8e627a3

Please sign in to comment.