mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #3131 from FalseIncarnate/master
Plant Age, Weeds, and Pest Tweaks
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
// Weeds like water and nutrients, there's a chance the weed population will increase.
|
||||
// Bonus chance if the tray is unoccupied.
|
||||
if(waterlevel > 10 && nutrilevel > 2 && prob(isnull(seed) ? 5 : 1))
|
||||
if(waterlevel > 10 && nutrilevel > 2 && prob(isnull(seed) ? 6 : 3))
|
||||
weedlevel += 1 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// There's a chance for a weed explosion to happen if the weeds take over.
|
||||
@@ -110,6 +110,11 @@
|
||||
health -= HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// Handle life and death.
|
||||
// If the plant gets too old, begin killing it each cycle
|
||||
var/lifespan = 5 * seed.get_trait(TRAIT_MATURATION)
|
||||
if(age > lifespan)
|
||||
health -= rand(5,10) * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// When the plant dies, weeds thrive and pests die off.
|
||||
check_health()
|
||||
|
||||
@@ -120,8 +125,8 @@
|
||||
harvest = 1
|
||||
lastproduce = age
|
||||
|
||||
if(prob(3)) // On each tick, there's a chance the pest population will increase
|
||||
pestlevel += 0.1 * HYDRO_SPEED_MULTIPLIER
|
||||
if(prob(5)) // On each tick, there's a chance the pest population will increase
|
||||
pestlevel += 0.5 * HYDRO_SPEED_MULTIPLIER
|
||||
|
||||
// Some seeds will self-harvest if you don't keep a lid on them.
|
||||
if(seed && seed.can_self_harvest && harvest && !closed_system && prob(5))
|
||||
|
||||
Reference in New Issue
Block a user