Adds skintone to FBPs

This commit is contained in:
Anewbe
2017-03-25 13:35:24 -05:00
parent eb73ee4b44
commit d90699998b
2 changed files with 28 additions and 14 deletions
+10 -3
View File
@@ -17,7 +17,9 @@ var/global/list/limb_icon_cache = list()
s_col = null
h_col = null
if(robotic >= ORGAN_ROBOT)
return
var/datum/robolimb/franchise = all_robolimbs[model]
if(!(franchise && franchise.lifelike))
return
if(species && human.species && species.name != human.species.name)
return
if(!isnull(human.s_tone) && (human.species.appearance_flags & HAS_SKIN_TONE))
@@ -31,7 +33,9 @@ var/global/list/limb_icon_cache = list()
s_col = null
h_col = null
if(robotic >= ORGAN_ROBOT)
return
var/datum/robolimb/franchise = all_robolimbs[model]
if(!(franchise && franchise.lifelike))
return
if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.appearance_flags & HAS_SKIN_TONE))
s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE)
if(species.appearance_flags & HAS_SKIN_COLOR)
@@ -124,12 +128,15 @@ var/global/list/limb_icon_cache = list()
if(model)
icon_cache_key += "_model_[model]"
apply_colouration(mob_icon)
dir = EAST
icon = mob_icon
return mob_icon
/obj/item/organ/external/proc/apply_colouration(var/icon/applying)
if(robotic == ORGAN_ROBOT)
return applying
if(nonsolid)
applying.MapColors("#4D4D4D","#969696","#1C1C1C", "#000000")
@@ -188,7 +195,7 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F
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((robotic < ORGAN_ROBOT) && species)
if((robotic == ORGAN_ROBOT) && species)
// Calculate the required colour matrix.
var/r = 0.30 * species.health_hud_intensity
var/g = 0.59 * species.health_hud_intensity