anchor.diff:  		overlays.Cut()
   	flags &= ~OVERLAY_QUEUED
   
  -/atom/proc/iconstate2appearance(iconstate)
  +/proc/iconstate2appearance(icon, iconstate)
   	var/static/image/stringbro = new()
   	var/list/icon_states_cache = SSoverlays.overlay_icon_state_caches 
   	var/list/cached_icon = icon_states_cache[icon]
  
positive.code: 		QUEUE_FOR_COMPILE
  
  /atom/proc/cut_overlay(list/overlays, priority)
  	var/static/image/appearance_bro = new()
  	if(!overlays)
  		return
  
  	if (!islist(overlays))
  		overlays = list(overlays)
  	else
  		listclearnulls(overlays)
  	for (var/i in 1 to length(overlays))
  		if (istext(overlays[i]))
  			overlays[i] = iconstate2appearance(overlays[i])
  		else
  			var/image/I = overlays[i]
  			appearance_bro.appearance = overlays[i]
  			appearance_bro.dir = I.dir
  			overlays[i] = appearance_bro.appearance
  
  	var/list/cached_overlays = our_overlays	//sanic
  	var/list/cached_priority = priority_overlays
  
negative.code: 	var/cached_appearance = stringbro.appearance
  	cached_icon["[iconstate]"] = cached_appearance
  	return cached_appearance
  
  /proc/icon2appearance(icon)
  	var/static/image/iconbro = new()
  	var/list/icon_cache = SSoverlays.overlay_icon_cache
  	. = icon_cache[icon]
  	if (!.)
  		iconbro.icon = icon
  		. = iconbro.appearance
  		icon_cache[icon] = .
  
  /atom/proc/build_appearance_list(new_overlays)
  	var/static/image/appearance_bro = new()
  	if (!islist(new_overlays))
  		new_overlays = list(new_overlays)
  	else
  		listclearnulls(new_overlays)
  	for (var/i in 1 to length(new_overlays))
  		var/image/cached_overlay = new_overlays[i]
  		if (istext(cached_overlay))
  			new_overlays[i] = iconstate2appearance(icon, cached_overlay)
  		else if(isicon(cached_overlay))
  			new_overlays[i] = icon2appearance(cached_overlay)
  		else	//image probable
  			appearance_bro.appearance = cached_overlay
  			appearance_bro.dir = cached_overlay.dir
  			new_overlays[i] = appearance_bro.appearance
  	return new_overlays
  
  #define NOT_QUEUED_ALREADY (!(flags & OVERLAY_QUEUED))
  #define QUEUE_FOR_COMPILE flags |= OVERLAY_QUEUED; SSoverlays.processing += src; 
  