Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug plant keep growing #4173

Merged
merged 3 commits into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/modules/hydroponics/hydro_tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,14 @@

// 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 < 1)
plant_health = 0

// Check that pressure, heat and light are all within bounds.
// First, handle an open system or an unconnected closed system.
Expand Down