Move various icon caches into a new subsystem for organization (#2538)

changes:

Blood overlays are now cached and do not involve world iteration.
Moved every global icon cache I could find into a new SS for organization & easier debugging. SS does not fire or init.
This commit is contained in:
Lohikar
2017-05-31 08:37:39 +03:00
committed by skull132
parent 00372a2872
commit 1db5663128
14 changed files with 73 additions and 48 deletions
+1 -2
View File
@@ -1,5 +1,3 @@
var/global/list/limb_icon_cache = list()
/obj/item/organ/external/set_dir()
return
@@ -140,6 +138,7 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD)
if(body_hair && islist(h_col) && h_col.len >= 3)
var/list/limb_icon_cache = SSicon_cache.limb_icon_cache
var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]"
if(!limb_icon_cache[cache_key])
var/icon/I = icon(species.icobase, "[icon_name]_[body_hair]")