Custom skin tone preferences.
This commit is contained in:
@@ -71,6 +71,11 @@
|
||||
#define MUT_EXTRA 2
|
||||
#define MUT_OTHER 3
|
||||
|
||||
//species use_skintones defines
|
||||
#define NO_SKINTONES 0
|
||||
#define USE_SKINTONES 1
|
||||
#define USE_SKINTONES_GRAYSCALE_CUSTOM 2 //adds a "_g" suffix to limb overlays icon states if the skin_tone is a custom one.
|
||||
|
||||
//DNA - Because fuck you and your magic numbers being all over the codebase.
|
||||
#define DNA_BLOCK_SIZE 3
|
||||
|
||||
@@ -131,9 +136,10 @@
|
||||
#define NOAROUSAL 20 //Stops all arousal effects
|
||||
#define NOGENITALS 21 //Cannot create, use, or otherwise have genitals
|
||||
#define MATRIXED 22 //if icon is color matrix'd
|
||||
#define SKINTONE 23 //uses skin tones
|
||||
#define HORNCOLOR 24
|
||||
#define WINGCOLOR 25
|
||||
#define SKINTONE 23
|
||||
#define CUSTOM_SKINTONE 24 //adds a "_g" suffix to bodypart overlays icon states
|
||||
#define HORNCOLOR 25
|
||||
#define WINGCOLOR 26
|
||||
|
||||
//organ slots
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
|
||||
+20
-14
@@ -262,24 +262,30 @@
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_skin_tone()
|
||||
return pick(GLOB.skin_tones)
|
||||
#define SKINTONE2HEX(skin_tone) GLOB.skin_tones[skin_tone] || skin_tone
|
||||
|
||||
/proc/random_skin_tone()
|
||||
return pick(GLOB.skin_tones - GLOB.nonstandard_skin_tones)
|
||||
|
||||
//ordered by amount of tan. Keep the nonstandard skin tones last.
|
||||
GLOBAL_LIST_INIT(skin_tones, list(
|
||||
"albino",
|
||||
"caucasian1",
|
||||
"caucasian2",
|
||||
"caucasian3",
|
||||
"latino",
|
||||
"mediterranean",
|
||||
"asian1",
|
||||
"asian2",
|
||||
"arab",
|
||||
"indian",
|
||||
"african1",
|
||||
"african2"
|
||||
"albino" = "#fff4e6",
|
||||
"caucasian1" = "#ffe0d1",
|
||||
"caucasian2" = "#fcccb3",
|
||||
"caucasian3" = "#e8b59b",
|
||||
"latino" = "#d9ae96",
|
||||
"mediterranean" = "#c79b8b",
|
||||
"asian1" = "#ffdeb3",
|
||||
"asian2" = "#e3ba84",
|
||||
"arab" = "#c4915e",
|
||||
"indian" = "#b87840",
|
||||
"african1" = "#754523",
|
||||
"african2" = "#471c18",
|
||||
"orange" = "#ffc905", //Spray tan overdose.
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(nonstandard_skin_tones, list("orange"))
|
||||
|
||||
GLOBAL_LIST_EMPTY(species_list)
|
||||
|
||||
/proc/age2agedescription(age)
|
||||
|
||||
+9
-5
@@ -17,6 +17,7 @@
|
||||
var/mutation_index[DNA_MUTATION_BLOCKS] //List of which mutations this carbon has and its assigned block
|
||||
var/stability = 100
|
||||
var/scrambled = FALSE //Did we take something like mutagen? In that case we cant get our genes scanned to instantly cheese all the powers.
|
||||
var/skin_tone_override //because custom skin tones are not found in the skin_tones global list.
|
||||
|
||||
/datum/dna/New(mob/living/new_holder)
|
||||
if(istype(new_holder))
|
||||
@@ -45,6 +46,7 @@
|
||||
destination.dna.unique_enzymes = unique_enzymes
|
||||
destination.dna.uni_identity = uni_identity
|
||||
destination.dna.blood_type = blood_type
|
||||
destination.dna.skin_tone_override = skin_tone_override
|
||||
destination.set_species(species.type, icon_update=0)
|
||||
destination.dna.features = features.Copy()
|
||||
destination.dna.real_name = real_name
|
||||
@@ -66,6 +68,7 @@
|
||||
new_dna.mutation_index = mutation_index
|
||||
new_dna.uni_identity = uni_identity
|
||||
new_dna.blood_type = blood_type
|
||||
new_dna.skin_tone_override = skin_tone_override
|
||||
new_dna.features = features.Copy()
|
||||
new_dna.species = new species.type
|
||||
new_dna.real_name = real_name
|
||||
@@ -262,10 +265,11 @@
|
||||
return
|
||||
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
return 1
|
||||
return 0
|
||||
if(uni_identity != D.uni_identity || mutation_index != D.mutation_index || real_name != D.real_name || nameless != D.nameless || custom_species != D.custom_species)
|
||||
return FALSE
|
||||
if(species.type != D.species.type || features != D.features || blood_type != D.blood_type || skin_tone_override != D.skin_tone_override)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/dna/proc/update_instability(alert=TRUE)
|
||||
stability = 100
|
||||
@@ -430,7 +434,7 @@
|
||||
var/structure = dna.uni_identity
|
||||
hair_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK))
|
||||
facial_hair_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
|
||||
skin_tone = GLOB.skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
|
||||
skin_tone = dna.skin_tone_override || GLOB.skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
|
||||
eye_color = sanitize_hexcolor(getblock(structure, DNA_EYE_COLOR_BLOCK))
|
||||
facial_hair_style = GLOB.facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), GLOB.facial_hair_styles_list.len)]
|
||||
hair_style = GLOB.hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), GLOB.hair_styles_list.len)]
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(ishuman(source_mob))
|
||||
var/mob/living/carbon/human/H = source_mob
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
body_coloring = SKINTONE2HEX(H.skin_tone)
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
H.set_species(gib_mob_species)
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
body_coloring = SKINTONE2HEX(H.skin_tone)
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
else
|
||||
|
||||
@@ -158,11 +158,21 @@
|
||||
H.set_species(newrace, icon_update=0)
|
||||
|
||||
if(H.dna.species.use_skintones)
|
||||
var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in GLOB.skin_tones
|
||||
|
||||
var/new_s_tone = input(H, "Choose your skin tone:", "Race change") as null|anything in GLOB.skin_tones + "custom"
|
||||
if(new_s_tone)
|
||||
H.skin_tone = new_s_tone
|
||||
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||
if(new_s_tone == "custom")
|
||||
var/default = H.dna.skin_tone_override || null
|
||||
var/custom_tone = input(user, "Choose your custom skin tone:", "Race change", default) as color|null
|
||||
if(custom_tone)
|
||||
var/temp_hsv = RGBtoHSV(new_s_tone)
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
to_chat(H,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
else
|
||||
H.skin_tone = custom_tone
|
||||
H.dna.skin_tone_override = custom_tone
|
||||
else
|
||||
H.skin_tone = new_s_tone
|
||||
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||
|
||||
if(MUTCOLORS in H.dna.species.species_traits)
|
||||
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
H.undie_color = random_short_color()
|
||||
H.undershirt = random_undershirt(H.gender)
|
||||
H.shirt_color = random_short_color()
|
||||
H.dna.skin_tone_override = null
|
||||
H.skin_tone = random_skin_tone()
|
||||
H.hair_style = random_hair_style(H.gender)
|
||||
H.facial_hair_style = random_facial_hair_style(H.gender)
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
|
||||
// Change Appearance, not randomizing clothes colour, itll just be janky
|
||||
H.gender = pick(MALE, FEMALE)
|
||||
H.dna.skin_tone_override = null
|
||||
H.skin_tone = random_skin_tone()
|
||||
H.hair_style = random_hair_style(H.gender)
|
||||
H.facial_hair_style = pick(random_facial_hair_style(H.gender),"Shaved")
|
||||
@@ -124,6 +125,8 @@
|
||||
// Revert Appearance
|
||||
H.gender = prev_gender
|
||||
H.skin_tone = prev_skin_tone
|
||||
if(!GLOB.skin_tones[H.skin_tone])
|
||||
H.dna.skin_tone_override = H.skin_tone
|
||||
H.hair_style = prev_hair_style
|
||||
H.facial_hair_style = prev_facial_hair_style
|
||||
H.hair_color = prev_hair_color
|
||||
|
||||
@@ -205,6 +205,8 @@
|
||||
H.facial_hair_style = random_facial_hair_style(gender)
|
||||
if(skin_tone)
|
||||
H.skin_tone = skin_tone
|
||||
if(!GLOB.skin_tones[H.skin_tone])
|
||||
H.dna.skin_tone_override = H.skin_tone
|
||||
else
|
||||
H.skin_tone = random_skin_tone()
|
||||
H.update_hair()
|
||||
|
||||
@@ -89,11 +89,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/facial_hair_style = "Shaved" //Face hair type
|
||||
var/facial_hair_color = "000" //Facial hair color
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/use_custom_skin_tone = FALSE
|
||||
var/eye_color = "000" //Eye color
|
||||
var/horn_color = "85615a" //Horn color
|
||||
var/wing_color = "fff" //Wing color
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF",
|
||||
"mcolor2" = "FFF",
|
||||
"mcolor3" = "FFF",
|
||||
"tail_lizard" = "Smooth",
|
||||
"tail_human" = "None",
|
||||
"snout" = "Round",
|
||||
@@ -108,8 +111,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
"insect_wings" = "Plain",
|
||||
"insect_fluff" = "None",
|
||||
"insect_markings" = "None",
|
||||
"mcolor2" = "FFF",
|
||||
"mcolor3" = "FFF",
|
||||
"mam_body_markings" = "Plain",
|
||||
"mam_ears" = "None",
|
||||
"mam_snouts" = "None",
|
||||
@@ -361,7 +362,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
dat += "<h3>Skin Tone</h3>"
|
||||
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=s_tone;task=input'>[use_custom_skin_tone ? "custom: <span style='border:1px solid #161616; background-color: [skin_tone];'> </span>" : skin_tone]</a><BR>"
|
||||
|
||||
var/mutant_colors
|
||||
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
|
||||
@@ -763,7 +764,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(features["has_cock"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Penis Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)</a><br>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: [SKINTONE2HEX(skin_tone)];'> </span>(Skin tone overriding)</a><br>"
|
||||
else
|
||||
dat += "<b>Penis Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["cock_color"]];'> </span> <a href='?_src_=prefs;preference=cock_color;task=input'>Change</a><br>"
|
||||
@@ -781,7 +782,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(features["has_balls"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Testicles Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: [SKINTONE2HEX(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Testicles Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["balls_color"]];'> </span> <a href='?_src_=prefs;preference=balls_color;task=input'>Change</a><br>"
|
||||
@@ -793,7 +794,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Vagina Type:</b> <a style='display:block;width:100px' href='?_src_=prefs;preference=vag_shape;task=input'>[features["vag_shape"]]</a>"
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Vagina Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: [SKINTONE2HEX(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Vagina Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["vag_color"]];'> </span> <a href='?_src_=prefs;preference=vag_color;task=input'>Change</a><br>"
|
||||
@@ -806,7 +807,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(features["has_breasts"])
|
||||
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
|
||||
dat += "<b>Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[skintone2hex(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: [SKINTONE2HEX(skin_tone)];'> </span>(Skin tone overriding)<br>"
|
||||
else
|
||||
dat += "<b>Color:</b></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["breasts_color"]];'> </span> <a href='?_src_=prefs;preference=breasts_color;task=input'>Change</a><br>"
|
||||
@@ -1438,6 +1439,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
eye_color = random_eye_color()
|
||||
if("s_tone")
|
||||
skin_tone = random_skin_tone()
|
||||
use_custom_skin_tone = null
|
||||
if("bag")
|
||||
backbag = pick(GLOB.backbaglist)
|
||||
if("suit")
|
||||
@@ -1834,9 +1836,22 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["insect_markings"] = new_insect_markings
|
||||
|
||||
if("s_tone")
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in GLOB.skin_tones
|
||||
var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones + "custom"
|
||||
var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices
|
||||
if(new_s_tone)
|
||||
skin_tone = new_s_tone
|
||||
if(new_s_tone == "custom")
|
||||
var/default = use_custom_skin_tone ? skin_tone : null
|
||||
var/custom_tone = input(user, "Choose your custom skin tone:", "Character Preference", default) as color|null
|
||||
if(custom_tone)
|
||||
var/temp_hsv = RGBtoHSV(new_s_tone)
|
||||
if(ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
else
|
||||
use_custom_skin_tone = TRUE
|
||||
skin_tone = custom_tone
|
||||
else
|
||||
use_custom_skin_tone = FALSE
|
||||
skin_tone = new_s_tone
|
||||
|
||||
if("taur")
|
||||
var/list/snowflake_taur_list = list()
|
||||
@@ -2430,6 +2445,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.wing_color = wing_color
|
||||
|
||||
character.skin_tone = skin_tone
|
||||
character.dna.skin_tone_override = use_custom_skin_tone ? skin_tone : null
|
||||
character.hair_style = hair_style
|
||||
character.facial_hair_style = facial_hair_style
|
||||
character.underwear = underwear
|
||||
|
||||
@@ -400,6 +400,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["hair_color"] >> hair_color
|
||||
S["facial_hair_color"] >> facial_hair_color
|
||||
S["eye_color"] >> eye_color
|
||||
S["use_custom_skin_tone"] >> use_custom_skin_tone
|
||||
S["skin_tone"] >> skin_tone
|
||||
S["hair_style_name"] >> hair_style
|
||||
S["facial_style_name"] >> facial_hair_style
|
||||
@@ -548,7 +549,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
|
||||
use_custom_skin_tone = sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone))
|
||||
if(use_custom_skin_tone)
|
||||
skin_tone = sanitize_hexcolor(skin_tone, 6, TRUE, "#FFFFFF")
|
||||
else
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones - GLOB.nonstandard_skin_tones, initial(skin_tone))
|
||||
horn_color = sanitize_hexcolor(horn_color, 3, FALSE)
|
||||
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
|
||||
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
|
||||
@@ -657,6 +662,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["hair_color"] , hair_color)
|
||||
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
|
||||
WRITE_FILE(S["eye_color"] , eye_color)
|
||||
WRITE_FILE(S["use_custom_skin_tone"] , use_custom_skin_tone)
|
||||
WRITE_FILE(S["skin_tone"] , skin_tone)
|
||||
WRITE_FILE(S["hair_style_name"] , hair_style)
|
||||
WRITE_FILE(S["facial_style_name"] , facial_hair_style)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
shirt_color = random_short_color()
|
||||
socks = random_socks()
|
||||
socks_color = random_short_color()
|
||||
use_custom_skin_tone = FALSE
|
||||
skin_tone = random_skin_tone()
|
||||
hair_style = random_hair_style(gender)
|
||||
facial_hair_style = random_facial_hair_style(gender)
|
||||
|
||||
@@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/horn_color //specific horn colors, because why not?
|
||||
var/wing_color
|
||||
|
||||
var/use_skintones = 0 // does it use skintones or not? (spoiler alert this is only used by humans)
|
||||
var/use_skintones = NO_SKINTONES // does it use skintones or not? (spoiler alert this is only used by humans)
|
||||
var/exotic_blood = "" // If your race wants to bleed something other than bog standard blood, change this to reagent id.
|
||||
var/exotic_bloodtype = "" //If your race uses a non standard bloodtype (A+, O-, AB-, etc)
|
||||
var/meat = /obj/item/reagent_containers/food/snacks/meat/slab/human //What the species drops on gibbing
|
||||
@@ -853,7 +853,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(!forced_colour)
|
||||
switch(S.color_src)
|
||||
if(SKINTONE)
|
||||
accessory_overlay.color = "#[skintone2hex(H.skin_tone)]"
|
||||
accessory_overlay.color = SKINTONE2HEX(H.skin_tone)
|
||||
if(MUTCOLORS)
|
||||
if(fixed_mut_color)
|
||||
accessory_overlay.color = "#[fixed_mut_color]"
|
||||
@@ -1456,12 +1456,12 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(target.check_martial_melee_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s attack!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes punching cause staminaloss but funny martial artist types get a discount
|
||||
user.adjustStaminaLossBuffered(1.5)
|
||||
else
|
||||
user.adjustStaminaLossBuffered(3.5)
|
||||
|
||||
|
||||
if(attacker_style && attacker_style.harm_act(user,target))
|
||||
return TRUE
|
||||
else
|
||||
@@ -1526,7 +1526,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(user.limb_destroyer)
|
||||
target.dismembering_strike(user, affecting.body_zone)
|
||||
|
||||
|
||||
if(atk_verb == ATTACK_EFFECT_KICK)//kicks deal 1.5x raw damage + 0.5x stamina damage
|
||||
target.apply_damage(damage*1.5, BRUTE, affecting, armor_block)
|
||||
target.apply_damage(damage*0.5, STAMINA, affecting, armor_block)
|
||||
@@ -1538,21 +1538,21 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold)
|
||||
if((punchedstam > 50) && prob(punchedstam*0.5)) //If our punch victim has been hit above the threshold, and they have more than 50 stamina damage, roll for stun, probability of 1% per 2 stamina damage
|
||||
|
||||
|
||||
target.visible_message("<span class='danger'>[user] knocks [target] down!</span>", \
|
||||
"<span class='userdanger'>You're knocked down by [user]!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You knock [target] down!</span>")
|
||||
|
||||
|
||||
var/knockdown_duration = 40 + (punchedstam + (punchedbrute*0.5))*0.8 - armor_block
|
||||
target.DefaultCombatKnockdown(knockdown_duration)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
log_combat(user, target, "got a stun punch with their previous punch")
|
||||
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_KI_VAMPIRE) && !HAS_TRAIT(target, TRAIT_NOBREATH) && (punchedbrute < 100)) //If we're a ki vampire we also sap them of lifeforce, but only if they're not too beat up. Also living organics only.
|
||||
user.adjustBruteLoss(-5)
|
||||
user.adjustFireLoss(-5)
|
||||
user.adjustStaminaLoss(-20)
|
||||
|
||||
|
||||
target.adjustCloneLoss(10)
|
||||
target.adjustBruteLoss(10)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
mutant_bodyparts = list("tail_human" = "None", "ears" = "None", "wings" = "Angel")
|
||||
use_skintones = 1
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
no_equip = list(SLOT_BACK)
|
||||
blacklisted = 1
|
||||
limbs_id = "human"
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
punchstunthreshold = 25
|
||||
attack_verb = "smash"
|
||||
attack_sound = 'sound/weapons/resonator_blast.ogg'
|
||||
blacklisted = 1
|
||||
use_skintones = 0
|
||||
blacklisted = TRUE
|
||||
species_traits = list(NOBLOOD,EYECOLOR,NOGENITALS)
|
||||
inherent_traits = list(TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOLIMBDISABLE,TRAIT_NOHUNGER)
|
||||
sexes = 0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
inherent_traits = list(TRAIT_NOHUNGER,TRAIT_NOBREATH)
|
||||
mutant_bodyparts = list("tail_human" = "None", "ears" = "None", "deco_wings" = "None")
|
||||
use_skintones = TRUE
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
mutant_brain = /obj/item/organ/brain/dullahan
|
||||
mutanteyes = /obj/item/organ/eyes/dullahan
|
||||
mutanttongue = /obj/item/organ/tongue/dullahan
|
||||
|
||||
@@ -9,7 +9,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NO_UNDERWEAR)
|
||||
inherent_traits = list()
|
||||
limbs_id = "human"
|
||||
use_skintones = 1
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
say_mod = "bellows" //high energy, EXTRA BIOLOGICAL FUEL
|
||||
damage_overlay_type = "human"
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/human
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS_PARTSONLY,WINGCOLOR)
|
||||
mutant_bodyparts = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF","tail_human" = "None", "ears" = "None", "taur" = "None", "deco_wings" = "None")
|
||||
use_skintones = 1
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/human
|
||||
disliked_food = GROSS | RAW
|
||||
liked_food = JUNKFOOD | FRIED
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
heatmod = 1.5
|
||||
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/mushroom
|
||||
use_skintones = FALSE
|
||||
var/datum/martial_art/mushpunch/mush
|
||||
|
||||
/datum/species/mush/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
fake_species = null
|
||||
meat = initial(meat)
|
||||
limbs_id = "synth"
|
||||
use_skintones = 0
|
||||
use_skintones = FALSE
|
||||
sexes = 0
|
||||
fixed_mut_color = ""
|
||||
hair_color = ""
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID
|
||||
mutant_bodyparts = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "deco_wings" = "None")
|
||||
exotic_bloodtype = "U"
|
||||
use_skintones = TRUE
|
||||
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
|
||||
mutant_heart = /obj/item/organ/heart/vampire
|
||||
mutanttongue = /obj/item/organ/tongue/vampire
|
||||
blacklisted = TRUE
|
||||
@@ -23,7 +23,8 @@
|
||||
/datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
|
||||
. = ..()
|
||||
to_chat(C, "[info_text]")
|
||||
C.skin_tone = "albino"
|
||||
if(!C.dna.skin_tone_override)
|
||||
C.skin_tone = "albino"
|
||||
C.update_body(0)
|
||||
var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new
|
||||
C.AddSpell(B)
|
||||
|
||||
@@ -507,93 +507,83 @@
|
||||
/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(ishuman(M))
|
||||
if(method == PATCH || method == VAPOR)
|
||||
var/mob/living/carbon/human/N = M
|
||||
if(N.dna.species.id == "human")
|
||||
switch(N.skin_tone)
|
||||
if("african1")
|
||||
N.skin_tone = "african2"
|
||||
if("indian")
|
||||
N.skin_tone = "african1"
|
||||
if("arab")
|
||||
N.skin_tone = "indian"
|
||||
if("asian2")
|
||||
N.skin_tone = "arab"
|
||||
if("asian1")
|
||||
N.skin_tone = "asian2"
|
||||
if("mediterranean")
|
||||
N.skin_tone = "african1"
|
||||
if("latino")
|
||||
N.skin_tone = "mediterranean"
|
||||
if("caucasian3")
|
||||
N.skin_tone = "mediterranean"
|
||||
if("caucasian2")
|
||||
N.skin_tone = pick("caucasian3", "latino")
|
||||
if("caucasian1")
|
||||
N.skin_tone = "caucasian2"
|
||||
if ("albino")
|
||||
N.skin_tone = "caucasian1"
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.species.use_skintones)
|
||||
if(!H.dna.skin_tone_override)
|
||||
var/diff_len = length(GLOB.skin_tones - GLOB.nonstandard_skin_tones)
|
||||
H.skin_tone = GLOB.skin_tones[min(diff_len, GLOB.skin_tones.Find(H.skin_tone) + 1)]
|
||||
else
|
||||
H.skin_tone = H.dna.skin_tone_override = tan_mutant_color(H.dna.skin_tone_override, "#202020")
|
||||
if(MUTCOLORS in H.dna.species.species_traits) //take current alien color and darken it slightly
|
||||
H.dna.features["mcolor"] = tan_mutant_color(H.dna.features["mcolor"])
|
||||
H.update_body()
|
||||
|
||||
if(MUTCOLORS in N.dna.species.species_traits) //take current alien color and darken it slightly
|
||||
var/newcolor = ""
|
||||
var/string = N.dna.features["mcolor"]
|
||||
var/len = length(string)
|
||||
var/char = ""
|
||||
var/ascii = 0
|
||||
for(var/i=1, i<=len, i += length(char))
|
||||
char = string[i]
|
||||
ascii = text2ascii(char)
|
||||
switch(ascii)
|
||||
if(48)
|
||||
newcolor += "0"
|
||||
if(49 to 57)
|
||||
newcolor += ascii2text(ascii-1) //numbers 1 to 9
|
||||
if(97)
|
||||
newcolor += "9"
|
||||
if(98 to 102)
|
||||
newcolor += ascii2text(ascii-1) //letters b to f lowercase
|
||||
if(65)
|
||||
newcolor += "9"
|
||||
if(66 to 70)
|
||||
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
|
||||
else
|
||||
break
|
||||
if(ReadHSV(newcolor)[3] >= ReadHSV("#7F7F7F")[3])
|
||||
N.dna.features["mcolor"] = newcolor
|
||||
N.regenerate_icons()
|
||||
if(method == INGEST)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/reagent/spraytan/proc/tan_mutant_color(color, limit = "#7F7F7F")
|
||||
var/newcolor = ""
|
||||
var/len = length(color)
|
||||
var/char = ""
|
||||
var/ascii = 0
|
||||
for(var/i=1, i<=len, i += length(char))
|
||||
char = color[i]
|
||||
ascii = text2ascii(char)
|
||||
switch(ascii)
|
||||
if(35)
|
||||
newcolor += "#"
|
||||
if(48)
|
||||
newcolor += "0"
|
||||
if(49 to 57)
|
||||
newcolor += ascii2text(ascii-1) //numbers 1 to 9
|
||||
if(97)
|
||||
newcolor += "9"
|
||||
if(98 to 102)
|
||||
newcolor += ascii2text(ascii-1) //letters b to f lowercase
|
||||
if(65)
|
||||
newcolor += "9"
|
||||
if(66 to 70)
|
||||
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
|
||||
else
|
||||
break
|
||||
if(ReadHSV(newcolor)[3] >= ReadHSV(limit)[3])
|
||||
return newcolor
|
||||
return color
|
||||
|
||||
if(method == INGEST)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
|
||||
..()
|
||||
|
||||
/datum/reagent/spraytan/overdose_start(mob/living/M)
|
||||
. = ..()
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.hair_style = "Spiky"
|
||||
H.facial_hair_style = "Shaved"
|
||||
H.facial_hair_color = "000"
|
||||
H.hair_color = "000"
|
||||
if(!(HAIR in H.dna.species.species_traits)) //No hair? No problem!
|
||||
H.dna.species.species_traits += HAIR
|
||||
if(H.dna.species.use_skintones)
|
||||
if(H.dna.skin_tone_override)
|
||||
H.skin_tone = H.dna.skin_tone_override = "#FF8800"
|
||||
else
|
||||
H.skin_tone = "orange"
|
||||
else if(MUTCOLORS in H.dna.species.species_traits) //Aliens with custom colors simply get turned orange
|
||||
H.dna.features["mcolor"] = "f80"
|
||||
H.update_body()
|
||||
|
||||
/datum/reagent/spraytan/overdose_process(mob/living/M)
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/N = M
|
||||
N.hair_style = "Spiky"
|
||||
N.facial_hair_style = "Shaved"
|
||||
N.facial_hair_color = "000"
|
||||
N.hair_color = "000"
|
||||
if(!(HAIR in N.dna.species.species_traits)) //No hair? No problem!
|
||||
N.dna.species.species_traits += HAIR
|
||||
if(N.dna.species.use_skintones)
|
||||
N.skin_tone = "orange"
|
||||
else if(MUTCOLORS in N.dna.species.species_traits) //Aliens with custom colors simply get turned orange
|
||||
N.dna.features["mcolor"] = "f80"
|
||||
N.regenerate_icons()
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(prob(7))
|
||||
if(N.w_uniform)
|
||||
M.visible_message(pick("<b>[M]</b>'s collar pops up without warning.</span>", "<b>[M]</b> flexes [M.p_their()] arms."))
|
||||
if(H.w_uniform)
|
||||
H.visible_message(pick("<b>[H]</b>'s collar pops up without warning.</span>", "<b>[H]</b> flexes [H.p_their()] arms."))
|
||||
else
|
||||
M.visible_message("<b>[M]</b> flexes [M.p_their()] arms.")
|
||||
H.visible_message("<b>[H]</b> flexes [H.p_their()] arms.")
|
||||
if(prob(10))
|
||||
M.say(pick("Shit was SO cash.", "You are everything bad in the world.", "What sports do you play, other than 'jack off to naked drawn Japanese people?'", "Don’t be a stranger. Just hit me with your best shot.", "My name is John and I hate every single one of you."), forced = "spraytan")
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/datum/reagent/mutationtoxin
|
||||
name = "Stable Mutation Toxin"
|
||||
|
||||
@@ -350,7 +350,8 @@
|
||||
body_gender = H.dna.features["body_model"]
|
||||
should_draw_gender = S.sexes
|
||||
|
||||
if(MUTCOLORS in S.species_traits)
|
||||
var/mut_colors = (MUTCOLORS in S.species_traits)
|
||||
if(mut_colors)
|
||||
if(S.fixed_mut_color)
|
||||
species_color = S.fixed_mut_color
|
||||
else
|
||||
@@ -360,7 +361,7 @@
|
||||
species_color = ""
|
||||
|
||||
if(base_bp_icon != DEFAULT_BODYPART_ICON)
|
||||
color_src = MUTCOLORS //TODO - Add color matrix support to base limbs
|
||||
color_src = mut_colors ? MUTCOLORS : (H.dna.skin_tone_override && S.use_skintones == USE_SKINTONES_GRAYSCALE_CUSTOM) ? CUSTOM_SKINTONE : SKINTONE
|
||||
|
||||
if(S.mutant_bodyparts["legs"])
|
||||
if(body_zone == BODY_ZONE_L_LEG || body_zone == BODY_ZONE_R_LEG)
|
||||
@@ -544,12 +545,20 @@
|
||||
return
|
||||
|
||||
if(color_src) //TODO - add color matrix support for base species limbs
|
||||
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
|
||||
var/draw_color = mutation_color || species_color || GLOB.skin_tones[skin_tone]
|
||||
var/grayscale = FALSE
|
||||
if(!draw_color) //check for custom skin tones.
|
||||
draw_color = skin_tone
|
||||
grayscale = color_src == CUSTOM_SKINTONE //Cause human (the species) parts states have a very pale pink hue.
|
||||
if(draw_color)
|
||||
if(grayscale)
|
||||
limb.icon_state += "_g"
|
||||
limb.color = "#[draw_color]"
|
||||
if(aux_icons)
|
||||
for(var/a in aux)
|
||||
var/image/I = a
|
||||
if(grayscale)
|
||||
I.icon_state += "_g"
|
||||
I.color = "#[draw_color]"
|
||||
if(!isnull(aux_marking))
|
||||
for(var/a in auxmarking)
|
||||
|
||||
@@ -252,37 +252,6 @@
|
||||
L.change_bodypart_status(BODYPART_ROBOTIC)
|
||||
. = L
|
||||
|
||||
|
||||
/proc/skintone2hex(skin_tone)
|
||||
. = 0
|
||||
switch(skin_tone)
|
||||
if("caucasian1")
|
||||
. = "ffe0d1"
|
||||
if("caucasian2")
|
||||
. = "fcccb3"
|
||||
if("caucasian3")
|
||||
. = "e8b59b"
|
||||
if("latino")
|
||||
. = "d9ae96"
|
||||
if("mediterranean")
|
||||
. = "c79b8b"
|
||||
if("asian1")
|
||||
. = "ffdeb3"
|
||||
if("asian2")
|
||||
. = "e3ba84"
|
||||
if("arab")
|
||||
. = "c4915e"
|
||||
if("indian")
|
||||
. = "b87840"
|
||||
if("african1")
|
||||
. = "754523"
|
||||
if("african2")
|
||||
. = "471c18"
|
||||
if("albino")
|
||||
. = "fff4e6"
|
||||
if("orange")
|
||||
. = "ffc905"
|
||||
|
||||
/mob/living/carbon/proc/Digitigrade_Leg_Swap(swap_back)
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/O = X
|
||||
|
||||
Reference in New Issue
Block a user