Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor

This commit is contained in:
Aurorablade
2016-01-15 08:10:24 -05:00
349 changed files with 23852 additions and 21659 deletions
+6
View File
@@ -33,6 +33,7 @@
// Mechanical concerns.
var/health = 0 // Plant health.
var/lastproduce = 0 // Last time tray was harvested
var/current_cycle = 0 // Used for tracking number of cycles for aging
var/lastcycle = 0 // Cycle timing/tracking var.
var/cycledelay = 150 // Delay per cycle.
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
@@ -350,6 +351,7 @@
seed = null
dead = 0
age = 0
lastproduce = 0
sampled = 0
mutation_mod = 0
@@ -369,6 +371,7 @@
sampled = 0
age = 0
lastproduce = 0
yield_mod = 0
mutation_mod = 0
@@ -389,6 +392,7 @@
health = seed.get_trait(TRAIT_ENDURANCE)
lastcycle = world.time
harvest = 0
lastproduce = 0
weedlevel = 0
pestlevel = 0
sampled = 0
@@ -544,6 +548,7 @@
age = 0
health = seed.get_trait(TRAIT_ENDURANCE)
lastcycle = world.time
lastproduce = 0
harvest = 0
weedlevel = 0
@@ -705,6 +710,7 @@
seed = S.seed //Grab the seed datum.
dead = 0
age = 1
lastproduce = 0
//Snowflakey, maybe move this to the seed datum
health = (istype(S, /obj/item/seeds/cutting) ? round(seed.get_trait(TRAIT_ENDURANCE)/rand(2,5)) : seed.get_trait(TRAIT_ENDURANCE))
lastcycle = world.time
+12 -4
View File
@@ -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.
@@ -35,7 +35,10 @@
return
// Advance plant age.
if(prob(30)) age += 1 * HYDRO_SPEED_MULTIPLIER
current_cycle++
if(current_cycle == 3)
age += 1 * HYDRO_SPEED_MULTIPLIER
current_cycle = 0
//Highly mutable plants have a chance of mutating every tick.
if(seed.get_trait(TRAIT_IMMUTABLE) == -1)
@@ -107,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()
@@ -117,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))