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

Attempt at Solving Issue #443 #471

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion code/modules/hydroponics/trays/tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
var/plant_health = 0 // Plant health.
var/lastproduce = 0 // Last time tray was harvested
var/lastcycle = 0 // Cycle timing/tracking var.
var/cycledelay = 150 // Delay per cycle.
var/cycledelay = 1500 // Delay per cycle.
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
var/force_update // Set this to bypass the cycle time check.
var/obj/temp_chem_holder // Something to hold reagents during process_reagents()
Expand Down
10 changes: 5 additions & 5 deletions code/modules/hydroponics/trays/tray_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// Advance plant age.
var/cur_stage = seed.get_overlay_stage(age)
if(prob(30))
if(prob(15))
age += 1 * HYDRO_SPEED_MULTIPLIER
if(seed.get_overlay_stage(age) != cur_stage)
needs_icon_update |= 1
Expand All @@ -58,17 +58,17 @@
mutation_level = 0

// Maintain tray nutrient and water levels.
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) && seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) > 0 && nutrilevel > 0 && prob(25))
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) && seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) > 0 && nutrilevel > 0 && prob(10))
nutrilevel -= max(0,seed.get_trait(TRAIT_NUTRIENT_CONSUMPTION) * HYDRO_SPEED_MULTIPLIER)
if(seed.get_trait(TRAIT_REQUIRES_WATER) && seed.get_trait(TRAIT_WATER_CONSUMPTION) > 0 && waterlevel > 0 && prob(25))
if(seed.get_trait(TRAIT_REQUIRES_WATER) && seed.get_trait(TRAIT_WATER_CONSUMPTION) > 0 && waterlevel > 0 && prob(10))
waterlevel -= max(0,seed.get_trait(TRAIT_WATER_CONSUMPTION) * HYDRO_SPEED_MULTIPLIER)

// Make sure the plant is not starving or thirsty. Adequate
// water and nutrients will cause a plant to become healthier.
var/healthmod = rand(1,3) * HYDRO_SPEED_MULTIPLIER
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) && prob(35))
if(seed.get_trait(TRAIT_REQUIRES_NUTRIENTS) && prob(15))
plant_health += (nutrilevel < 2 ? -healthmod : healthmod)
if(seed.get_trait(TRAIT_REQUIRES_WATER) && prob(35))
if(seed.get_trait(TRAIT_REQUIRES_WATER) && prob(15))
plant_health += (waterlevel < 10 ? -healthmod : healthmod)

// Check that pressure, heat and light are all within bounds.
Expand Down