anchor.diff:  		qdel(prey)
   
   /datum/spacevine_mutation/aggressive_spread  //very OP, but im out of other ideas currently
  -	name = "aggressive spreading"
  -	hue = "#333333"
  +	name = "Aggressive spreading"
  +	hue = "#316b2f"
   	severity = 3
   	quality = NEGATIVE
   
   /// Checks mobs on spread-target's turf to see if they should be hit by a damaging proc or not.
  -/datum/spacevine_mutation/aggressive_spread/on_spread(obj/structure/spacevine/holder, turf/target, mob/living)
  -	for(var/mob/living/M in target)
  -		if(!isvineimmune(M) && M.stat != DEAD) // Don't kill immune creatures. Dead check to prevent log spam when a corpse is trapped between vine eaters.
  -			aggrospread_act(holder, M)
  +/datum/spacevine_mutation/aggressive_spread/on_spread(obj/structure/spacevine/holder, turf/turf, mob/living)
  +	for(var/mob/living/victim in turf)
  +		if(!isvineimmune(victim) && victim.stat != DEAD) // Don't kill immune creatures. Dead check to prevent log spam when a corpse is trapped between vine eaters.
  +			aggrospread_act(holder, victim)
   
   /// What happens if an aggr spreading vine buckles a mob.
   /datum/spacevine_mutation/aggressive_spread/on_buckle(obj/structure/spacevine/holder, mob/living/buckled)
   	aggrospread_act(holder, buckled)
   
   /// Hurts mobs. To be used when a vine with aggressive spread mutation spreads into the mob's tile or buckles them.
  -/datum/spacevine_mutation/aggressive_spread/aggrospread_act(obj/structure/spacevine/S, mob/living/M)
  -	var/mob/living/carbon/C = M //If the mob is carbon then it now also exists as a "C", and not just an M.
  -	if(istype(C)) //If the mob (M) is a carbon subtype (C) we move on to pick a more complex damage proc, with damage zones, wounds and armor mitigation.
  +/datum/spacevine_mutation/aggressive_spread/aggrospread_act(obj/structure/spacevine/vine, mob/living/living_mob)
  +	var/mob/living/carbon/victim = living_mob //If the mob is carbon then it now also exists as a victim, and not just an living mob.
  +	if(istype(victim)) //If the mob (M) is a carbon subtype (C) we move on to pick a more complex damage proc, with damage zones, wounds and armor mitigation.
   		var/obj/item/bodypart/limb = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD, BODY_ZONE_CHEST) //Picks a random bodypart. Does not runtime even if it's missing.
  -		var/armor = C.run_armor_check(limb, MELEE, null, null) //armor = the armor value of that randomly chosen bodypart. Nulls to not print a message, because it would still print on pierce.
  -		var/datum/spacevine_mutation/thorns/T = locate() in S.mutations //Searches for the thorns mutation in the "mutations"-list inside obj/structure/spacevine, and defines T if it finds it.
  -		if(T && (prob(40))) //If we found the thorns mutation there is now a chance to get stung instead of lashed or smashed.
  -			C.apply_damage(50, BRUTE, def_zone = limb, wound_bonus = rand(-20,10), sharpness = SHARP_POINTY) //This one gets a bit lower damage because it ignores armor.
  -			C.Stun(1 SECONDS) //Stopped in place for a moment.
  -			playsound(M, 'sound/weapons/pierce.ogg', 50, TRUE, -1)
  -			M.visible_message(span_danger("[M] is nailed by a sharp thorn!"), \
  +		var/armor = victim.run_armor_check(limb, MELEE, null, null) //armor = the armor value of that randomly chosen bodypart. Nulls to not print a message, because it would still print on pierce.
  +		var/datum/spacevine_mutation/thorns/thorn = locate() in vine.mutations //Searches for the thorns mutation in the "mutations"-list inside obj/structure/spacevine, and defines T if it finds it.
  +		if(thorn && (prob(40))) //If we found the thorns mutation there is now a chance to get stung instead of lashed or smashed.
  +			victim.apply_damage(50, BRUTE, def_zone = limb, wound_bonus = rand(-20,10), sharpness = SHARP_POINTY) //This one gets a bit lower damage because it ignores armor.
  +			victim.Stun(1 SECONDS) //Stopped in place for a moment.
  +			playsound(living_mob, 'sound/weapons/pierce.ogg', 50, TRUE, -1)
  +			living_mob.visible_message(span_danger("[living_mob] is nailed by a sharp thorn!"), \
   			span_userdanger("You are nailed by a sharp thorn!"))
  -			log_combat(S, M, "aggressively pierced") //"Aggressively" for easy ctrl+F'ing in the attack logs.
  +			log_combat(vine, living_mob, "aggressively pierced") //"Aggressively" for easy ctrl+F'ing in the attack logs.
   		else
   			if(prob(80))
  -				C.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = SHARP_EDGED)
  -				C.Knockdown(2 SECONDS)
  -				playsound(M, 'sound/weapons/whip.ogg', 50, TRUE, -1)
  -				M.visible_message(span_danger("[M] is lacerated by an outburst of vines!"), \
  +				victim.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = SHARP_EDGED)
  +				victim.Knockdown(2 SECONDS)
  +				playsound(victim, 'sound/weapons/whip.ogg', 50, TRUE, -1)
  +				living_mob.visible_message(span_danger("[living_mob] is lacerated by an outburst of vines!"), \
   				span_userdanger("You are lacerated by an outburst of vines!"))
  -				log_combat(S, M, "aggressively lacerated")
  +				log_combat(vine, living_mob, "aggressively lacerated")
   			else
  -				C.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = NONE)
  -				C.Knockdown(3 SECONDS)
  -				var/atom/throw_target = get_edge_target_turf(C, get_dir(S, get_step_away(C, S)))
  -				C.throw_at(throw_target, 3, 6)
  -				playsound(M, 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
  -				M.visible_message(span_danger("[M] is smashed by a large vine!"), \
  +				victim.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = NONE)
  +				victim.Knockdown(3 SECONDS)
  +				var/atom/throw_target = get_edge_target_turf(living_mob, get_dir(vine, get_step_away(living_mob, vine)))
  +				victim.throw_at(throw_target, 3, 6)
  +				playsound(victim, 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
  +				living_mob.visible_message(span_danger("[living_mob] is smashed by a large vine!"), \
   				span_userdanger("You are smashed by a large vine!"))
  -				log_combat(S, M, "aggressively smashed")
  +				log_combat(vine, living_mob, "aggressively smashed")
   	else //Living but not a carbon? Maybe a silicon? Can't be wounded so have a big chunk of simple bruteloss with no special effects. They can be entangled.
  -		M.adjustBruteLoss(75)
  -		playsound(M, 'sound/weapons/whip.ogg', 50, TRUE, -1)
  -		M.visible_message(span_danger("[M] is brutally threshed by [S]!"), \
  -		span_userdanger("You are brutally threshed by [S]!"))
  -		log_combat(S, M, "aggressively spread into") //You aren't being attacked by the vines. You just happen to stand in their way.
  +		living_mob.adjustBruteLoss(75)
  +		playsound(living_mob, 'sound/weapons/whip.ogg', 50, TRUE, -1)
  +		living_mob.visible_message(span_danger("[living_mob] is brutally threshed by [vine]!"), \
  +		span_userdanger("You are brutally threshed by [vine]!"))
  +		log_combat(vine, living_mob, "aggressively spread into") //You aren't being attacked by the vines. You just happen to stand in their way.
   
   /datum/spacevine_mutation/transparency
   	name = "transparent"
  
positive.code: 	max_integrity = 50
  	var/energy = 0
  	var/datum/spacevine_controller/master = null
  	var/list/mutations = list()
  
  /obj/structure/spacevine/Initialize(mapload)
  
negative.code: 	return ..()
  
  /datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
  	var/obj/structure/spacevine/vine = new(location)
  	growth_queue += vine
  	vines += vine
  	vine.master = src
  	if(length(muts))
  		for(var/datum/spacevine_mutation/mutation in muts)
  			mutation.add_mutation_to_vinepiece(vine)
  	if(parent)
  		vine.mutations |= parent.mutations
  		var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
  		vine.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
  		if(prob(mutativeness))
  			var/datum/spacevine_mutation/random_mutate = pick(vine_mutations_list - vine.mutations)
  			random_mutate.add_mutation_to_vinepiece(vine)
  
  	for(var/datum/spacevine_mutation/mutation in vine.mutations)
  		mutation.on_birth(vine)
  	location.Entered(vine, null)
  	return vine
  
  /datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/vine)
  	vine.master = null
  	vines -= vine
  	growth_queue -= vine
  	if(!length(vines))
  		var/obj/item/seeds/kudzu/seed = new(vine.loc)
  		seed.mutations |= vine.mutations
  		seed.set_potency(mutativeness * 10)
  		seed.set_production(11 - (spread_cap / initial(spread_cap)) * 5) //Reverts spread_cap formula so resulting seed gets original production stat or equivalent back.
  		qdel(src)
  
  /// Life cycle of a space vine
  /datum/spacevine_controller/process(delta_time)
  	if(!LAZYLEN(vines))
  		qdel(src) //space vines exterminated. Remove the controller
  