fuck you cache (#8175)

Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
Cadyn
2024-04-10 05:37:39 -07:00
committed by GitHub
parent 68c7006bb7
commit b116966cd6
2 changed files with 22 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
var/global/list/limb_icon_cache = list()
GLOBAL_LIST_EMPTY(limb_icon_cache)
/obj/item/organ/external/set_dir()
return
@@ -173,11 +173,12 @@ var/global/list/limb_icon_cache = list()
if(body_hair && islist(h_col) && h_col.len >= 3)
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.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
limb_icon_cache[cache_key] = I
mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY)
//if(!GLOB.limb_icon_cache[cache_key]) //ChompEDIT START
var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
GLOB.limb_icon_cache[cache_key] = I
mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY)
//ChompEDIT END
// VOREStation edit start
if(nail_polish)
@@ -205,11 +206,12 @@ var/global/list/limb_icon_cache = list()
if(body_hair && islist(h_col) && h_col.len >= 3)
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.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
limb_icon_cache[cache_key] = I
mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY)
//if(!GLOB.limb_icon_cache[cache_key]) //ChompEDIT START
var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
GLOB.limb_icon_cache[cache_key] = I
mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY)
//ChompEDIT END
// VOREStation edit ends here
if (transparent && !istype(src,/obj/item/organ/external/head) && can_apply_transparency && should_apply_transparency) //VORESTATION EDIT: transparent instead of nonsolid
@@ -278,9 +280,9 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F
// This looks convoluted, but it's this way to avoid icon proc calls.
if(!hud_damage_image)
var/cache_key = "dambase-[icon_cache_key]"
if(!icon_cache_key || !limb_icon_cache[cache_key])
limb_icon_cache[cache_key] = icon(get_icon(), null, SOUTH)
var/image/temp = image(limb_icon_cache[cache_key])
if(!icon_cache_key || !GLOB.limb_icon_cache[cache_key]) //CHOMPNote - this isn't manipulated after the fact, so we leave it.
GLOB.limb_icon_cache[cache_key] = icon(get_icon(), null, SOUTH) //ChompEDIT
var/image/temp = image(GLOB.limb_icon_cache[cache_key]) //ChompEDIT
if((robotic < ORGAN_ROBOT) && species)
// Calculate the required colour matrix.
var/r = 0.30 * species.health_hud_intensity

View File

@@ -76,11 +76,12 @@
icon_cache_key += "[M][markings[M]["color"]]"
if(body_hair && islist(h_col) && h_col.len >= 3)
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.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
limb_icon_cache[cache_key] = I
mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY)
//if(!GLOB.limb_icon_cache[cache_key]) //icon cache tweak start
var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
GLOB.limb_icon_cache[cache_key] = I
mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY)
//icon cache tweak end
// VOREStation edit start
if(nail_polish && !(force_icon && !skip_forced_icon))