anchor.diff:  	smoothing_flags = SMOOTH_BITMASK
   	smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WEEDS)
   	canSmoothWith = list(SMOOTH_GROUP_ALIEN_WEEDS, SMOOTH_GROUP_WALLS)
  -	var/last_expand = 0 //last world.time this weed expanded
  -	var/growth_cooldown_low = 150
  -	var/growth_cooldown_high = 200
  -	var/static/list/blacklisted_turfs
  -
  +	///the range of the weeds going to be affected by the node
  +	var/node_range = NODERANGE
  +	///the parent node that will determine if we grow or die
  +	var/obj/structure/alien/weeds/node/parent_node
  +	///the list of turfs that the weeds will not be able to grow over
  +	var/static/list/blacklisted_turfs = list(
  +		/turf/open/space,
  +		/turf/open/chasm,
  +		/turf/open/lava,
  +		/turf/open/water,
  +		/turf/open/openspace,
  +	)
   
   /obj/structure/alien/weeds/Initialize(mapload)
  +	//so the sprites line up right in the map editor
   	pixel_x = -4
  -	pixel_y = -4 //so the sprites line up right in the map editor
  -
  -	. = ..()
  -
  -	if(!blacklisted_turfs)
  -		blacklisted_turfs = typecacheof(list(
  -			/turf/open/space,
  -			/turf/open/chasm,
  -			/turf/open/lava,
  -			/turf/open/openspace))
  +	pixel_y = -4
  +
  +	. = ..()
   
   	set_base_icon()
   
  -	last_expand = world.time + rand(growth_cooldown_low, growth_cooldown_high)
   	AddElement(/datum/element/atmos_sensitive, mapload)
   
  +/obj/structure/alien/weeds/Destroy()
  +	if(parent_node)
  +		UnregisterSignal(parent_node, COMSIG_PARENT_QDELETING)
  +		parent_node = null
  +	return ..()
   
   ///Randomizes the weeds' starting icon, gets redefined by children for them not to share the behavior.
   /obj/structure/alien/weeds/proc/set_base_icon()
  
positive.code: /obj/structure/alien/weeds/atmos_expose(datum/gas_mixture/air, exposed_temperature)
  	take_damage(5, BURN, 0, 0)
  
  //Weed nodes
  /obj/structure/alien/weeds/node
  	name = "glowing resin"
  	desc = "Blue bioluminescence shines from beneath the surface."
  
negative.code: 			base_icon_state = "weeds3"
  	set_smoothed_icon_state(smoothing_junction)
  
  /**
   * Called when the node is trying to grow/expand
   */
  /obj/structure/alien/weeds/proc/try_expand()
  	//we cant grow without a parent node
  	if(!parent_node)
  		return
  	//lets make sure we are still on a valid location
  	var/turf/src_turf = get_turf(src)
  	if(is_type_in_list(src_turf, blacklisted_turfs))
  		qdel(src)
  		return
  	//lets try to grow in a direction
  	for(var/turf/check_turf in src_turf.get_atmos_adjacent_turfs())
  		//we cannot grow on blacklisted turfs
  		if(is_type_in_list(check_turf, blacklisted_turfs))
  			continue
  		var/obj/structure/alien/weeds/check_weed = locate() in check_turf
  		//we cannot grow onto other weeds
  		if(check_weed)
  			continue
  		//spawn a new one in the turf
  		check_weed = new(check_turf)
  		//set the new one's parent node to our parent node
  		check_weed.parent_node = parent_node
  		check_weed.RegisterSignal(parent_node, COMSIG_PARENT_QDELETING, .proc/after_parent_destroyed)
  
  /**
   * Called when the parent node is destroyed
   */
  /obj/structure/alien/weeds/proc/after_parent_destroyed()
  	if(!find_new_parent())
  		var/random_time = rand(2 SECONDS, 8 SECONDS)
  		addtimer(CALLBACK(src, .proc/do_qdel), random_time)
  
  /**
   * Called when trying to find a new parent after our previous parent died
   * Will return false if it can't find a new_parent
   * Will return the new parent if it can find one
   */
  /obj/structure/alien/weeds/proc/find_new_parent()
  	var/previous_node = parent_node
  	parent_node = null
  	for(var/obj/structure/alien/weeds/node/new_parent in range(node_range, src))
  		if(new_parent == previous_node)
  			continue
  		parent_node = new_parent
  		RegisterSignal(parent_node, COMSIG_PARENT_QDELETING, .proc/after_parent_destroyed)
  		return parent_node
  	return FALSE
  
  /**
   * Called to delete the weed
   */
  /obj/structure/alien/weeds/proc/do_qdel()
  	qdel(src)
  
  /obj/structure/alien/weeds/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
  	return exposed_temperature > 300
  