diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index 7c3f955974c..099655c37d9 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -119,7 +119,7 @@
/obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj)
//Don't act on seeds like dionaea that shouldn't change.
- if(seed && seed.immutable > 0)
+ if(seed && seed.immutable)
return
//Override for somatoray projectiles.
@@ -169,11 +169,6 @@
// Advance plant age.
if(prob(25)) age += 1 * HYDRO_SPEED_MULTIPLIER
- //Highly mutable plants have a chance of mutating every tick.
- if(seed.immutable == -1)
- var/mut_prob = rand(1,100)
- if(mut_prob <= 5) mutate(mut_prob == 1 ? 2 : 1)
-
// Maintain tray nutrient and water levels.
if(seed.nutrient_consumption > 0 && nutrilevel > 0 && prob(25))
nutrilevel -= max(0,seed.nutrient_consumption * HYDRO_SPEED_MULTIPLIER)
@@ -201,23 +196,10 @@
// If atmos input is not there, grab from turf.
if(!environment)
if(istype(T))
- environment = T.air
- if(!environment)
+ environment = T.return_air()
+ if(!environment) //We're in a crate or nullspace, bail out.
return
- // Handle gas consumption.
- if(seed.consume_gasses && seed.consume_gasses.len)
- var/missing_gas = 0
- for(var/gas in seed.consume_gasses)
- if(environment && environment.gas && environment.gas[gas] && \
- environment.gas[gas] >= seed.consume_gasses[gas])
- environment.adjust_gas(gas,-seed.consume_gasses[gas],1)
- else
- missing_gas++
-
- if(missing_gas > 0)
- health -= missing_gas * HYDRO_SPEED_MULTIPLIER
-
// Process it.
var/pressure = environment.return_pressure()
if(pressure < seed.lowkpa_tolerance || pressure > seed.highkpa_tolerance)
@@ -226,13 +208,6 @@
if(abs(environment.temperature - seed.ideal_heat) > seed.heat_tolerance)
health -= healthmod
- // Handle gas production.
- if(seed.exude_gasses && seed.exude_gasses.len)
- var/datum/gas_mixture/exuded = new
- for(var/gas in seed.exude_gasses)
- exuded.adjust_gas(gas,seed.exude_gasses[gas*seed.potency],1) //This will need adjustment since it produces moles.
- loc.assume_air(exuded)
-
// Handle light requirements.
var/area/A = T.loc
if(A)
@@ -282,14 +257,13 @@
pestlevel = 0
// If enough time (in cycles, not ticks) has passed since the plant was harvested, we're ready to harvest again.
- else if(seed.products && seed.products.len && age > seed.production && \
- (age - lastproduce) > seed.production && (!harvest && !dead))
-
+ else if(age > seed.production && (age - lastproduce) > seed.production && (!harvest && !dead))
harvest = 1
lastproduce = age
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
pestlevel += 1 * HYDRO_SPEED_MULTIPLIER
+
check_level_sanity()
update_icon()
return
@@ -783,30 +757,7 @@
usr << "[src] is \red filled with weeds!"
if(pestlevel >= 5)
usr << "[src] is \red filled with tiny worms!"
- if(!istype(src,/obj/machinery/portable_atmospherics/hydroponics/soil))
-
- var/turf/T = loc
- var/datum/gas_mixture/environment
-
- if(closed_system && (connected_port || holding))
- environment = air_contents
-
- if(!environment)
- if(istype(T))
- environment = T.return_air()
-
- if(!environment) //We're in a crate or nullspace, bail out.
- return
-
- var/area/A = T.loc
- var/light_available
- if(A)
- if(A.lighting_use_dynamic)
- light_available = max(0,min(10,T.lighting_lumcount)-5)
- else
- light_available = 5
-
- usr << "The tray's sensor suite is reporting a light level of [light_available] lumens and a temperature of [environment.temperature]K."
+ usr << text ("")
/obj/machinery/portable_atmospherics/hydroponics/verb/close_lid()
set name = "Toggle Tray Lid"
diff --git a/code/modules/hydroponics/hydro_tools.dm b/code/modules/hydroponics/hydro_tools.dm
index 82e0ca33eee..8a435ef88d4 100644
--- a/code/modules/hydroponics/hydro_tools.dm
+++ b/code/modules/hydroponics/hydro_tools.dm
@@ -71,9 +71,7 @@
if(grown_seed.harvest_repeat)
dat += "This plant can be harvested repeatedly.
"
- if(grown_seed.immutable == -1)
- dat += "This plant is highly mutable.
"
- else if(grown_seed.immutable > 0)
+ if(grown_seed.immutable)
dat += "This plant does not possess genetics that are alterable.
"
if(grown_seed.products && grown_seed.products.len)
diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm
index fa5af7c78c7..1a30949ca3a 100644
--- a/code/modules/hydroponics/seed_datums.dm
+++ b/code/modules/hydroponics/seed_datums.dm
@@ -83,7 +83,7 @@ proc/populate_seed_list()
var/spread = 0 // 0 limits plant to tray, 1 = creepers, 2 = vines.
var/carnivorous = 0 // 0 = none, 1 = eat pests in tray, 2 = eat living things (when a vine).
var/parasite = 0 // 0 = no, 1 = gain health from weed level.
- var/immutable = 0 // If set, plant will never mutate. If -1, plant has a chance of mutating during process().
+ var/immutable // If set, plant will never mutate.
var/alter_temp // If set, the plant will periodically alter local temp by this amount.
// Cosmetics.
@@ -99,13 +99,13 @@ proc/populate_seed_list()
//Returns a key corresponding to an entry in the global seed list.
/datum/seed/proc/get_mutant_variant()
- if(!mutants || !mutants.len || immutable > 0) return 0
+ if(!mutants || !mutants.len || immutable) return 0
return pick(mutants)
//Mutates the plant overall (randomly).
/datum/seed/proc/mutate(var/degree,var/turf/source_turf)
- if(!degree || immutable > 0) return
+ if(!degree || immutable) return
source_turf.visible_message("\blue \The [display_name] quivers!")
@@ -179,7 +179,7 @@ proc/populate_seed_list()
//Mutates a specific trait/set of traits.
/datum/seed/proc/apply_gene(var/datum/plantgene/gene)
- if(!gene || !gene.values || immutable > 0) return
+ if(!gene || !gene.values || immutable) return
switch(gene.genetype)
@@ -209,12 +209,11 @@ proc/populate_seed_list()
else
chems[rid] = gene.values[2][rid]
- var/list/new_gasses = gene.values[3]
- if(istype(new_gasses))
- if(!exude_gasses) exude_gasses = list()
- exude_gasses |= new_gasses
- for(var/gas in exude_gasses)
- exude_gasses[gas] = max(1,round(exude_gasses[gas]*0.8))
+ //TODO.
+ //if(!exude_gasses) exude_gasses = list()
+ //exude_gasses |= gene.values[3]
+ //for(var/gas in exude_gasses)
+ // exude_gasses[gas] = max(1,round(exude_gasses[gas]/2))
alter_temp = gene.values[4]
potency = gene.values[5]
@@ -349,6 +348,7 @@ proc/populate_seed_list()
if(!user)
return
+ //TODO: check for failing to harvest.
var/got_product
if(!isnull(products) && products.len && yield > 0)
got_product = 1
@@ -389,6 +389,7 @@ proc/populate_seed_list()
handle_living_product(product)
// Make sure the product is inheriting the correct seed type reference.
+ // TODO: can this be collapsed into one type check since they share vars?
else if(istype(product,/obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/current_product = product
current_product.plantname = name
@@ -402,7 +403,7 @@ proc/populate_seed_list()
// be put into the global datum list until the product is harvested, though.
/datum/seed/proc/diverge(var/modified)
- if(immutable > 0) return
+ if(immutable) return
//Set up some basic information.
var/datum/seed/new_seed = new
@@ -1169,7 +1170,6 @@ proc/populate_seed_list()
yield = -1
potency = -1
growth_stages = 4
- immutable = -1
/datum/seed/whitebeets
name = "whitebeet"
diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm
index 837abe7211a..e1cf0dfaccc 100644
--- a/code/modules/hydroponics/seed_machines.dm
+++ b/code/modules/hydroponics/seed_machines.dm
@@ -88,7 +88,7 @@
user << "There is already a seed loaded."
var/obj/item/seeds/S =W
- if(S.seed && S.seed.immutable > 0)
+ if(S.seed && S.seed.immutable)
user << "That seed is not compatible with our genetics technology."
else
user.drop_item(W)