anchor.diff:  	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)
  
positive.code: 			AM = find_type_in_direction(A, direction)
  			if(istype(AM))
  				if(AM.anchored)
  					adjacencies |= transform_dir(direction)
  			else
  				if(AM)
  					adjacencies |= transform_dir(direction)
  	else
  		for(var/direction in alldirs)
  			if(find_type_in_direction(A, direction))
  				adjacencies |= transform_dir(direction)
  	return adjacencies
  
  /proc/smooth_icon(atom/A)
  
negative.code: 
  /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]"
  
  