fix missing icon cache key generation data + poopy preview refresh (thanks verk <3)

This commit is contained in:
Raeschen
2021-08-26 08:21:57 +02:00
parent 838eed8d81
commit f6003256e5
3 changed files with 12 additions and 14 deletions

View File

@@ -1301,15 +1301,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
//CHOMPEdit START
else if(href_list["digitigrade"])
pref.digitigrade = !pref.digitigrade
//I don't know how else to force a sprite update that doing the stupid thing below
pref.r_skin = 0
pref.b_skin = 0
if(pref.g_skin != 128)
pref.g_skin = 128
else
pref.g_skin = 135
return TOPIC_REFRESH_UPDATE_PREVIEW
//CHOMPEdit END
return ..()

View File

@@ -293,6 +293,12 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
if(tail_style.clip_mask) //VOREStation Edit.
icon_key += tail_style.clip_mask_state
//ChompEDIT START
//icon_key addition for digitigrade switch
if(part.species.digitigrade && (part.organ_tag == BP_R_LEG || part.organ_tag == BP_L_LEG || part.organ_tag == BP_R_FOOT || part.organ_tag == BP_L_FOOT))
icon_key += "_digi"
//ChompEDIT END
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
var/icon/base_icon
if(human_icon_cache[icon_key])

View File

@@ -6,6 +6,7 @@
var/IB = species.icobase
species.icobase = species.icodigi
. = ..()
icon_cache_key += "_digi"
species.icobase = IB
else
. = ..()