From 03f0d76a8e193d7d136295c34f5d09be623eafab Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 13:23:45 -0700 Subject: [PATCH] yeah ok --- code/__HELPERS/mobs.dm | 6 +++--- code/__HELPERS/sanitize_values.dm | 2 +- code/datums/dna.dm | 12 ++++++------ code/modules/client/preferences.dm | 6 +++--- code/modules/mob/living/carbon/human/species.dm | 11 +++++------ .../mob/living/carbon/human/species_types/bugmen.dm | 2 +- .../living/carbon/human/species_types/furrypeople.dm | 2 +- .../mob/living/carbon/human/species_types/humans.dm | 2 +- .../living/carbon/human/species_types/jellypeople.dm | 4 ++-- .../living/carbon/human/species_types/podpeople.dm | 2 +- .../mob/living/carbon/human/species_types/vampire.dm | 2 +- code/modules/surgery/bodyparts/_bodyparts.dm | 6 +++--- 12 files changed, 28 insertions(+), 29 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index f8f6bca31a..ca12567b59 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -145,9 +145,9 @@ continue if(!S.ckeys_allowed) snowflake_ipc_antenna_list[S.name] = mspath - var/color1 = random_short_color() - var/color2 = random_short_color() - var/color3 = random_short_color() + var/color1 = random_color() + var/color2 = random_color() + var/color3 = random_color() var/body_model = MALE switch(intended_gender) diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm index 9080e04eca..0441e0bcb7 100644 --- a/code/__HELPERS/sanitize_values.dm +++ b/code/__HELPERS/sanitize_values.dm @@ -65,7 +65,7 @@ * * default - default color. must be 3 or 6 characters with or without #. * * default_replacement - what we replace broken letters with. */ -/proc/sanitize_hexcolor(color, desired_format = 3, include_crunch = 0, default = "ffffff", default_replacement = "f") +/proc/sanitize_hexcolor(color, desired_format = 3, include_crunch = 0, default = rgb(218, 72, 255), default_replacement = "f") if(!istext(default) || (length(default) < 3)) CRASH("Default should be a text string of RGB format, with or without the crunch, 3 or 6 characters. Default was instead [default]") if(!istext(default_replacement) || (length(default_replacement) != 1)) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 23b6704080..8d80bc3f36 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -131,9 +131,9 @@ L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color) L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len) L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color) - L[DNA_COLOR_ONE_BLOCK] = sanitize_hexcolor(features["mcolor"]) - L[DNA_COLOR_TWO_BLOCK] = sanitize_hexcolor(features["mcolor2"]) - L[DNA_COLOR_THREE_BLOCK] = sanitize_hexcolor(features["mcolor3"]) + L[DNA_COLOR_ONE_BLOCK] = sanitize_hexcolor(features["mcolor"], 6) + L[DNA_COLOR_TWO_BLOCK] = sanitize_hexcolor(features["mcolor2"], 6) + L[DNA_COLOR_THREE_BLOCK] = sanitize_hexcolor(features["mcolor3"], 6) if(!GLOB.mam_tails_list.len) init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list) L[DNA_MUTANTTAIL_BLOCK] = construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len) @@ -239,11 +239,11 @@ if(DNA_HAIR_STYLE_BLOCK) setblock(uni_identity, blocknumber, construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len)) if(DNA_COLOR_ONE_BLOCK) - sanitize_hexcolor(features["mcolor"]) + sanitize_hexcolor(features["mcolor"], 6) if(DNA_COLOR_TWO_BLOCK) - sanitize_hexcolor(features["mcolor2"]) + sanitize_hexcolor(features["mcolor2"], 6) if(DNA_COLOR_THREE_BLOCK) - sanitize_hexcolor(features["mcolor3"]) + sanitize_hexcolor(features["mcolor3"], 6) if(DNA_MUTANTTAIL_BLOCK) construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len) if(DNA_MUTANTEAR_BLOCK) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7f29efddb1..75e914ea68 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1798,11 +1798,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) //Now that we changed our species, we must verify that the mutant colour is still allowed. var/temp_hsv = RGBtoHSV(features["mcolor"]) - if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + if(features["mcolor"] == "#000000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) features["mcolor"] = pref_species.default_color - if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + if(features["mcolor2"] == "#000000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) features["mcolor2"] = pref_species.default_color - if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) + if(features["mcolor3"] == "#000000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])) features["mcolor3"] = pref_species.default_color if("custom_species") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index db0fa8d6c6..ba6fde421d 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -7,7 +7,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this var/limbs_id //this is used if you want to use a different species limb sprites. Mainly used for angels as they look like humans. var/name // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever - var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race + var/default_color = "#FFFFFF" // if alien colors are disabled, this is the color that will be used by that race var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows var/has_field_of_vision = TRUE @@ -854,10 +854,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m" var/list/colorlist = list() var/husk = HAS_TRAIT(H, TRAIT_HUSK) - colorlist += husk ? ReadRGB("#a3a3a3") :ReadRGB("[H.dna.features["mcolor"]]0") - colorlist += husk ? ReadRGB("#a3a3a3") :ReadRGB("[H.dna.features["mcolor2"]]0") - colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features["mcolor3"]]0") - colorlist += list(0,0,0, hair_alpha) + colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features["mcolor"]]00") + colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features["mcolor2"]]00") + colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features["mcolor3"]]00") + colorlist += husk ? list(0, 0, 0) : list(0, 0, 0, hair_alpha) for(var/index in 1 to colorlist.len) colorlist[index] /= 255 @@ -1031,7 +1031,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) H.apply_overlay(BODY_FRONT_LAYER) H.apply_overlay(HORNS_LAYER) - /* * Equip the outfit required for life. Replaces items currently worn. */ diff --git a/code/modules/mob/living/carbon/human/species_types/bugmen.dm b/code/modules/mob/living/carbon/human/species_types/bugmen.dm index 6a9e9d0b13..a51dadb523 100644 --- a/code/modules/mob/living/carbon/human/species_types/bugmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/bugmen.dm @@ -5,7 +5,7 @@ default_color = "00FF00" species_traits = list(LIPS,EYECOLOR,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR,WINGCOLOR,CAN_SCAR) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG - mutant_bodyparts = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None", + mutant_bodyparts = list("mcolor" = "FFFFFF","mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "insect_wings" = "None", "insect_fluff" = "None", "mam_snouts" = "None", "taur" = "None", "insect_markings" = "None") attack_verb = "slash" attack_sound = 'sound/weapons/slash.ogg' diff --git a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index 203f8fa289..d87b0c074c 100644 --- a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -5,7 +5,7 @@ icon_limbs = DEFAULT_BODYPART_ICON_CITADEL species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,HORNCOLOR,WINGCOLOR,CAN_SCAR) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BEAST - mutant_bodyparts = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "deco_wings" = "None", + mutant_bodyparts = list("mcolor" = "FFFFFF","mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "deco_wings" = "None", "mam_body_markings" = "Husky", "taur" = "None", "horns" = "None", "legs" = "Plantigrade", "meat_type" = "Mammalian") attack_verb = "claw" attack_sound = 'sound/weapons/slash.ogg' diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 1868bd22df..b164fb1ba0 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -4,7 +4,7 @@ default_color = "FFFFFF" species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS_PARTSONLY,WINGCOLOR,CAN_SCAR) - mutant_bodyparts = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF","tail_human" = "None", "ears" = "None", "taur" = "None", "deco_wings" = "None") + mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF","tail_human" = "None", "ears" = "None", "taur" = "None", "deco_wings" = "None") use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM skinned_type = /obj/item/stack/sheet/animalhide/human disliked_food = GROSS | RAW diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 31f326fd53..e97db7aced 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -7,7 +7,7 @@ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,WINGCOLOR) mutantlungs = /obj/item/organ/lungs/slime mutant_heart = /obj/item/organ/heart/slime - mutant_bodyparts = list("mcolor" = "FFF", "mam_tail" = "None", "mam_ears" = "None", "mam_snouts" = "None", "taur" = "None", "deco_wings" = "None") + mutant_bodyparts = list("mcolor" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "mam_snouts" = "None", "taur" = "None", "deco_wings" = "None") inherent_traits = list(TRAIT_TOXINLOVER) meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime gib_types = list(/obj/effect/gibspawner/slime, /obj/effect/gibspawner/slime/bodypartless) @@ -443,7 +443,7 @@ default_color = "00FFFF" species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR) inherent_traits = list(TRAIT_TOXINLOVER) - mutant_bodyparts = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None") + mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None") say_mod = "says" hair_color = "mutcolor" hair_alpha = 160 //a notch brighter so it blends better. diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 36a1d52cba..4806d4a6a1 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -64,7 +64,7 @@ name = "Anthromorphic Plant" id = "podweak" species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS) - mutant_bodyparts = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "mam_body_markings" = "Husky", "taur" = "None", "legs" = "Normal Legs") + mutant_bodyparts = list("mcolor" = "FFFFFF","mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "mam_body_markings" = "Husky", "taur" = "None", "legs" = "Normal Legs") limbs_id = "pod" light_nutrition_gain_factor = 3 light_bruteheal = -0.2 diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index f720aa7f8a..9c9220132c 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -5,7 +5,7 @@ species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,DRINKSBLOOD) inherent_traits = list(TRAIT_NOHUNGER,TRAIT_NOBREATH) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID - mutant_bodyparts = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "deco_wings" = "None") + mutant_bodyparts = list("mcolor" = "FFFFFF", "tail_human" = "None", "ears" = "None", "deco_wings" = "None") exotic_bloodtype = "U" use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM mutant_heart = /obj/item/organ/heart/vampire diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 711f90a629..07c80322ae 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -490,9 +490,9 @@ //body marking memes var/list/colorlist = list() colorlist.Cut() - colorlist += ReadRGB("[H.dna.features["mcolor"]]0") - colorlist += ReadRGB("[H.dna.features["mcolor2"]]0") - colorlist += ReadRGB("[H.dna.features["mcolor3"]]0") + colorlist += ReadRGB("[H.dna.features["mcolor"]]00") + colorlist += ReadRGB("[H.dna.features["mcolor2"]]00") + colorlist += ReadRGB("[H.dna.features["mcolor3"]]00") colorlist += list(0,0,0, S.hair_alpha) for(var/index=1, index<=colorlist.len, index++) colorlist[index] = colorlist[index]/255