diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 8d22fc546d..bb9b0e8b30 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -61,6 +61,7 @@ var/list/neighbors = list() var/obj/effect/plant/parent var/datum/seed/seed + var/sampled = 0 var/floor = 0 var/spread_chance = 40 var/spread_distance = 3 @@ -234,11 +235,18 @@ plant_controller.add_plant(src) if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) + if(sampled) + user << "\The [src] has already been sampled recently." + return + if(!is_mature()) + user << "\The [src] is not mature enough to yield a sample yet." + return if(!seed) - user << "There is nothing to take a sample from." + user << "There is nothing to take a sample from." return seed.harvest(user,0,1) - health -= (rand(3,5)*10) + health -= (rand(3,5)*5) + sampled = 1 else ..() if(W.force) diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 716d58c645..32ca7ed33e 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -69,6 +69,12 @@ last_tick = world.time update_neighbors() + if(sampled) + //Should be between 2-7 for given the default range of values for TRAIT_PRODUCTION + var/chance = max(1, round(30/seed.get_trait(TRAIT_PRODUCTION))) + if(prob(chance)) + sampled = 0 + if(is_mature() && neighbors.len && prob(spread_chance)) //spread to 1-3 adjacent turfs depending on yield trait. var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3)