Human icon key & preferences tweaks (#3274)

changes:

Reworked how human body icon keys are generated; resulting keys should be much shorter now and involve less duplication of the same string.
Players are now shown a message when they try to add markings to a species that has none available.
Admin revive for human-types will now also re-apply their organ and marking prefs.
Admin revive now also resets shock_stage (fixes rejuv'd mobs being slow for a while)
This commit is contained in:
Lohikar
2017-08-14 01:01:40 +03:00
committed by Erki
parent 7ce566f472
commit eace452b30
10 changed files with 114 additions and 68 deletions
+25
View File
@@ -189,3 +189,28 @@
damage_state = n_is
return 1
return 0
// This is NOT safe for caching the organ's own icon, it's only meant to be used for the mob icon cache.
/obj/item/organ/external/proc/get_mob_cache_key()
var/list/keyparts = list()
if (is_stump())
keyparts += "stump"
else if (status & ORGAN_ROBOT)
keyparts += "robot:[model || "nomodel"]"
else if (status & ORGAN_DEAD)
keyparts += "dead"
else
keyparts += "norm"
keyparts += "[species.race_key]"
keyparts += "[dna.GetUIState(DNA_UI_GENDER)]"
keyparts += "[dna.GetUIValue(DNA_UI_SKIN_TONE)]"
if (skin_color)
keyparts += "[skin_color]"
if (body_hair && hair_color)
keyparts += "[hair_color]"
for (var/marking in markings)
keyparts += "[marking][markings[marking]["color"]]"
. = keyparts.Join("_")