Custom skin tone preferences.

This commit is contained in:
Ghommie
2020-04-14 19:10:28 +02:00
parent 8f71aafde5
commit 571584901c
30 changed files with 210 additions and 185 deletions
@@ -319,7 +319,7 @@
genital_overlay = center_image(genital_overlay, dim_x, dim_y)
if(dna.species.use_skintones && dna.features["genitals_use_skintone"])
genital_overlay.color = "#[skintone2hex(skin_tone)]"
genital_overlay.color = SKINTONE2HEX(skin_tone)
else
switch(S.color_src)
if("cock_color")
@@ -331,7 +331,7 @@
if("vag_color")
genital_overlay.color = "#[dna.features["vag_color"]]"
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][dna.species.use_skintones ? "_s" : ""]_[aroused_state]_[layertext]"
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "_s" : ""]_[aroused_state]_[layertext]"
if(layers_num[layer] == GENITALS_FRONT_LAYER && G.genital_flags & GENITAL_THROUGH_CLOTHES)
genital_overlay.layer = -GENITALS_EXPOSED_LAYER
@@ -361,9 +361,8 @@
var/willyCheck = getorganslot(ORGAN_SLOT_PENIS)
if(organCheck == FALSE)
if(ishuman(src) && dna.species.id == "human")
if(ishuman(src) && dna.species.use_skintones)
dna.features["genitals_use_skintone"] = TRUE
dna.species.use_skintones = TRUE
if(src.dna.species.fixed_mut_color)
dna.features["cock_color"] = "[dna.species.fixed_mut_color]"
dna.features["breasts_color"] = "[dna.species.fixed_mut_color]"
@@ -55,13 +55,14 @@
var/datum/sprite_accessory/S = GLOB.breasts_shapes_list[shape]
var/icon_shape = S ? S.icon_state : "pair"
var/icon_size = CLAMP(breast_values[size], BREASTS_ICON_MIN_SIZE, BREASTS_ICON_MAX_SIZE)
icon_state = "breasts_[icon_shape]_[breast_values[icon_size]]"
icon_state = "breasts_[icon_shape]_[icon_size]"
if(owner)
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
var/mob/living/carbon/human/H = owner // only human mobs have skin_tone, which we need.
color = "#[skintone2hex(H.skin_tone)]"
icon_state += "_s"
color = SKINTONE2HEX(H.skin_tone)
if(!H.dna.skin_tone_override)
icon_state += "_s"
else
color = "#[owner.dna.features["breasts_color"]]"
@@ -117,7 +118,7 @@
/obj/item/organ/genital/breasts/get_features(mob/living/carbon/human/H)
var/datum/dna/D = H.dna
if(D.species.use_skintones && D.features["genitals_use_skintone"])
color = "#[skintone2hex(H.skin_tone)]"
color = SKINTONE2HEX(H.skin_tone)
else
color = "#[D.features["breasts_color"]]"
size = D.features["breasts_size"]
@@ -84,8 +84,9 @@
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
var/mob/living/carbon/human/H = owner // only human mobs have skin_tone, which we need.
color = "#[skintone2hex(H.skin_tone)]"
icon_state += "_s"
color = SKINTONE2HEX(H.skin_tone)
if(!H.dna.skin_tone_override)
icon_state += "_s"
else
color = "#[owner.dna.features["cock_color"]]"
if(genital_flags & GENITAL_CAN_TAUR && S?.taur_icon && (!S.feat_taur || owner.dna.features[S.feat_taur]) && owner.dna.species.mutant_bodyparts["taur"])
@@ -98,7 +99,7 @@
/obj/item/organ/genital/penis/get_features(mob/living/carbon/human/H)
var/datum/dna/D = H.dna
if(D.species.use_skintones && D.features["genitals_use_skintone"])
color = "#[skintone2hex(H.skin_tone)]"
color = SKINTONE2HEX(H.skin_tone)
else
color = "#[D.features["cock_color"]]"
length = D.features["cock_length"]
@@ -49,15 +49,16 @@
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
var/mob/living/carbon/human/H = owner // only human mobs have skin_tone, which we need.
color = "#[skintone2hex(H.skin_tone)]"
icon_state += "_s"
color = SKINTONE2HEX(H.skin_tone)
if(!H.dna.skin_tone_override)
icon_state += "_s"
else
color = "#[owner.dna.features["balls_color"]]"
/obj/item/organ/genital/testicles/get_features(mob/living/carbon/human/H)
var/datum/dna/D = H.dna
if(D.species.use_skintones && D.features["genitals_use_skintone"])
color = "#[skintone2hex(H.skin_tone)]"
color = SKINTONE2HEX(H.skin_tone)
else
color = "#[D.features["balls_color"]]"
shape = D.features["balls_shape"]
@@ -55,8 +55,9 @@
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
var/mob/living/carbon/human/H = owner // only human mobs have skin_tone, which we need.
color = "#[skintone2hex(H.skin_tone)]"
icon_state += "_s"
color = SKINTONE2HEX(H.skin_tone)
if(!H.dna.skin_tone_override)
icon_state += "_s"
else
color = "#[owner.dna.features["vag_color"]]"
if(ishuman(owner))
@@ -66,7 +67,7 @@
/obj/item/organ/genital/vagina/get_features(mob/living/carbon/human/H)
var/datum/dna/D = H.dna
if(D.species.use_skintones && D.features["genitals_use_skintone"])
color = "#[skintone2hex(H.skin_tone)]"
color = SKINTONE2HEX(H.skin_tone)
else
color = "[D.features["vag_color"]]"
shape = "[D.features["vag_shape"]]"
@@ -68,11 +68,11 @@
B = new
if(H.dna.species.use_skintones && H.dna.features["genitals_use_skintone"])
B.color = skintone2hex(H.skin_tone)
B.color = SKINTONE2HEX(H.skin_tone)
else if(M.dna.features["breasts_color"])
B.color = "#[M.dna.features["breasts_color"]]"
else
B.color = skintone2hex(H.skin_tone)
B.color = SKINTONE2HEX(H.skin_tone)
B.size = "flat"
B.cached_size = 0
B.prev_size = 0