anchor.diff:  			var/atom/A = R
   			if(A.smooth)
   				smooth_icon(A)
  +
  +/atom/proc/clear_smooth_overlays()
  +	overlays -= top_left_corner
  +	overlays -= top_right_corner
  +	overlays -= bottom_right_corner
  +	overlays -= bottom_left_corner
  
positive.code: 	spawn(0) //don't remove this, otherwise smoothing breaks
  		if(A && A.smooth)
  			var/adjacencies = calculate_adjacencies(A)
  			A.clear_smooth_overlays()
  
  			A.top_left_corner = make_nw_corner(adjacencies)
  			A.top_right_corner = make_ne_corner(adjacencies)
  			A.bottom_left_corner = make_sw_corner(adjacencies)
  			A.bottom_right_corner = make_se_corner(adjacencies)
  
  			A.overlays += A.top_left_corner
  			A.overlays += A.top_right_corner
  			A.overlays += A.bottom_right_corner
  			A.overlays += A.bottom_left_corner
  
  /proc/make_nw_corner(adjacencies)
  	var/sdir = "i"
  	if((adjacencies & N_NORTH) && (adjacencies & N_WEST))
  		if(adjacencies & N_NORTHWEST)
  			sdir = "f"
  		else
  			sdir = "nw"
  	else
  		if(adjacencies & N_NORTH)
  			sdir = "n"
  		else if(adjacencies & N_WEST)
  			sdir = "w"
  	return "1-[sdir]"
  
  /proc/make_ne_corner(adjacencies)
  	var/sdir = "i"
  	if((adjacencies & N_NORTH) && (adjacencies & N_EAST))
  		if(adjacencies & N_NORTHEAST)
  			sdir = "f"
  		else
  			sdir = "ne"
  	else
  		if(adjacencies & N_NORTH)
  			sdir = "n"
  		else if(adjacencies & N_EAST)
  			sdir = "e"
  	return "2-[sdir]"
  
  /proc/make_sw_corner(adjacencies)
  	var/sdir = "i"
  	if((adjacencies & N_SOUTH) && (adjacencies & N_WEST))
  		if(adjacencies & N_SOUTHWEST)
  			sdir = "f"
  		else
  			sdir = "sw"
  	else
  		if(adjacencies & N_SOUTH)
  			sdir = "s"
  		else if(adjacencies & N_WEST)
  			sdir = "w"
  	return "3-[sdir]"
  
  /proc/make_se_corner(adjacencies)
  	var/sdir = "i"
  	if((adjacencies & N_SOUTH) && (adjacencies & N_EAST))
  		if(adjacencies & N_SOUTHEAST)
  			sdir = "f"
  		else
  			sdir = "se"
  	else
  		if(adjacencies & N_SOUTH)
  			sdir = "s"
  		else
  			if(adjacencies & N_EAST)
  				sdir = "e"
  	return "4-[sdir]"
  
  /proc/smooth_icon_neighbors(atom/A)
  	for(var/V in orange(1,A))
  		var/atom/T = V
  		if(T.smooth)
  			smooth_icon(T)
  
  /proc/find_type_in_direction(atom/source, direction, range=1)
  	var/x_offset = 0
  
negative.code: 
  //Icon smoothing helpers
  
  /proc/smooth_icon_neighbors(atom/A)
  	for(var/V in orange(1,A))
  		var/atom/T = V
  		if(T.smooth)
  			smooth_icon(T)
  
  /proc/smooth_zlevel(var/zlevel)
  	var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
  