[MIRROR] makes it so the sanitize_hexcolors' default is 6 characters rather than 3 and gets rid of color_legacy [MDB IGNORE] (#8840)

* makes it so the sanitize_hexcolors' default is 6 characters rather than 3 and gets rid of color_legacy

* Feex

* Feex some more

* Final feex

* Please no more I'm tired

* <<<<<<< HEAD

Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
SkyratBot
2021-10-17 06:30:28 +02:00
committed by GitHub
parent a928f02179
commit f0db07b17d
42 changed files with 183 additions and 193 deletions
+2 -2
View File
@@ -820,11 +820,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(HAIR in species.species_traits)
hairstyle = client.prefs.read_preference(/datum/preference/choiced/hairstyle)
hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color_legacy/hair_color))
hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color/hair_color))
if(FACEHAIR in species.species_traits)
facial_hairstyle = client.prefs.read_preference(/datum/preference/choiced/facial_hairstyle)
facial_hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color_legacy/facial_hair_color))
facial_hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color/facial_hair_color))
qdel(species)
@@ -17,20 +17,20 @@
health = MAX_HUMAN_LIFE //SKYRAT EDIT ADDITION
//Hair colour and style
var/hair_color = "000"
var/hair_color = "#000000"
var/hairstyle = "Bald"
///Colour used for the hair gradient.
var/grad_color = "000"
var/grad_color = "#000000"
///Style used for the hair gradient.
var/grad_style
//Facial hair colour and style
var/facial_hair_color = "000"
var/facial_hair_color = "#000000"
var/facial_hairstyle = "Shaved"
//Eye colour
var/eye_color = "000"
var/eye_color = "#000000"
var/skin_tone = "caucasian1" //Skin tone
@@ -41,7 +41,7 @@
//consider updating /mob/living/carbon/human/copy_clothing_prefs() if adding more of these
var/underwear = "Nude" //Which underwear the player wants
var/underwear_color = "000"
var/underwear_color = "#000000"
var/undershirt = "Nude" //Which undershirt the player wants
var/socks = "Nude" //Which socks the player wants
var/backpack = DBACKPACK //Which backpack type the player has chosen.
@@ -706,7 +706,7 @@ generate/load female uniform sprites matching all previously decided variables
else
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', E.eye_icon_state, -BODY_LAYER)
if((EYECOLOR in dna.species.species_traits) && E)
eye_overlay.color = "#" + eye_color
eye_overlay.color = eye_color
if(OFFSET_FACE in dna.species.offset_features)
eye_overlay.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
eye_overlay.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
+19 -19
View File
@@ -20,7 +20,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
///This is the fluff name. They are displayed on health analyzers and in the character setup menu. Leave them generic for other servers to customize.
var/name
// Default color. If mutant colors are disabled, this is the color that will be used by that race.
var/default_color = "#FFF"
var/default_color = "#FFFFFF"
///Whether or not the race has sexual characteristics (biological genders). At the moment this is only FALSE for skeletons and shadows
var/sexes = TRUE
@@ -574,13 +574,13 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
facial_overlay.color = "#" + H.dna.features["mcolor"]
facial_overlay.color = H.dna.features["mcolor"]
else if(hair_color == "fixedmutcolor")
facial_overlay.color = "#[fixed_mut_color]"
facial_overlay.color = fixed_mut_color
else
facial_overlay.color = "#" + hair_color
facial_overlay.color = hair_color
else
facial_overlay.color = "#" + H.facial_hair_color
facial_overlay.color = H.facial_hair_color
else
facial_overlay.color = forced_colour
@@ -647,13 +647,13 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
hair_overlay.color = "#" + H.dna.features["mcolor"]
hair_overlay.color = H.dna.features["mcolor"]
else if(hair_color == "fixedmutcolor")
hair_overlay.color = "#[fixed_mut_color]"
hair_overlay.color = fixed_mut_color
else
hair_overlay.color = "#" + hair_color
hair_overlay.color = hair_color
else
hair_overlay.color = "#" + H.hair_color
hair_overlay.color = H.hair_color
//Gradients
grad_style = H.grad_style
@@ -664,7 +664,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
var/icon/temp_hair = icon(hair_file, hair_state)
temp.Blend(temp_hair, ICON_ADD)
gradient_overlay.icon = temp
gradient_overlay.color = "#" + grad_color
gradient_overlay.color = grad_color
else
hair_overlay.color = forced_colour
@@ -751,7 +751,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
eye_overlay.pixel_x += add_pixel_x
eye_overlay.pixel_y += add_pixel_y
if((EYECOLOR in species_traits) && eye_organ)
eye_overlay.color = "#" + species_human.eye_color
eye_overlay.color = species_human.eye_color
standing += eye_overlay
// organic body markings
@@ -799,7 +799,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
else
underwear_overlay = mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER)
if(!underwear.use_static)
underwear_overlay.color = "#" + species_human.underwear_color
underwear_overlay.color = species_human.underwear_color
standing += underwear_overlay
if(species_human.undershirt)
@@ -984,20 +984,20 @@ GLOBAL_LIST_EMPTY(features_by_species)
switch(accessory.color_src)
if(MUTCOLORS)
if(fixed_mut_color)
accessory_overlay.color = "#[fixed_mut_color]"
accessory_overlay.color = fixed_mut_color
else
accessory_overlay.color = "#[source.dna.features["mcolor"]]"
accessory_overlay.color = source.dna.features["mcolor"]
if(HAIR)
if(hair_color == "mutcolor")
accessory_overlay.color = "#[source.dna.features["mcolor"]]"
accessory_overlay.color = source.dna.features["mcolor"]
else if(hair_color == "fixedmutcolor")
accessory_overlay.color = "#[fixed_mut_color]"
accessory_overlay.color = fixed_mut_color
else
accessory_overlay.color = "#[source.hair_color]"
accessory_overlay.color = source.hair_color
if(FACEHAIR)
accessory_overlay.color = "#[source.facial_hair_color]"
accessory_overlay.color = source.facial_hair_color
if(EYECOLOR)
accessory_overlay.color = "#[source.eye_color]"
accessory_overlay.color = source.eye_color
else
accessory_overlay.color = forced_colour
standing += accessory_overlay
@@ -48,7 +48,7 @@
if(!ishuman(C))
return
var/mob/living/carbon/human/ethereal = C
default_color = "#[ethereal.dna.features["ethcolor"]]"
default_color = ethereal.dna.features["ethcolor"]
r1 = GETREDPART(default_color)
g1 = GETGREENPART(default_color)
b1 = GETBLUEPART(default_color)
@@ -139,7 +139,7 @@
/datum/species/human/felinid/prepare_human_for_preview(mob/living/carbon/human/human)
human.hairstyle = "Hime Cut"
human.hair_color = "fcc" // pink
human.hair_color = "#ffcccc" // pink
human.update_hair()
var/obj/item/organ/ears/cat/cat_ears = human.getorgan(/obj/item/organ/ears/cat)
@@ -37,7 +37,7 @@
// To prevent golem subtypes from overwhelming the odds when random species
// changes, only the Random Golem type can be chosen
limbs_id = "golem"
fixed_mut_color = "aaa"
fixed_mut_color = "#aaaaaa"
var/info_text = "As an <span class='danger'>Iron Golem</span>, you don't have any special traits."
var/random_eligible = TRUE //If false, the golem subtype can't be made through golem mutation toxin
@@ -82,7 +82,7 @@
id = SPECIES_GOLEM_ADAMANTINE
meat = /obj/item/food/meat/slab/human/mutant/golem/adamantine
mutant_organs = list(/obj/item/organ/adamantine_resonator, /obj/item/organ/vocal_cords/adamantine)
fixed_mut_color = "4ed"
fixed_mut_color = "#44eedd"
info_text = "As an <span class='danger'>Adamantine Golem</span>, you possess special vocal cords allowing you to \"resonate\" messages to all golems. Your unique mineral makeup makes you immune to most types of magic."
prefix = "Adamantine"
special_names = null
@@ -99,7 +99,7 @@
/datum/species/golem/plasma
name = "Plasma Golem"
id = SPECIES_GOLEM_PLASMA
fixed_mut_color = "a3d"
fixed_mut_color = "#aa33dd"
meat = /obj/item/stack/ore/plasma
//Can burn and takes damage from heat
//no RESISTHEAT, NOFIRE
@@ -171,7 +171,7 @@
/datum/species/golem/diamond
name = "Diamond Golem"
id = SPECIES_GOLEM_DIAMOND
fixed_mut_color = "0ff"
fixed_mut_color = "#00ffff"
armor = 70 //up from 55
meat = /obj/item/stack/ore/diamond
info_text = "As a <span class='danger'>Diamond Golem</span>, you are more resistant than the average golem."
@@ -182,7 +182,7 @@
/datum/species/golem/gold
name = "Gold Golem"
id = SPECIES_GOLEM_GOLD
fixed_mut_color = "cc0"
fixed_mut_color = "#cccc00"
speedmod = 1
armor = 25 //down from 55
meat = /obj/item/stack/ore/gold
@@ -194,7 +194,7 @@
/datum/species/golem/silver
name = "Silver Golem"
id = SPECIES_GOLEM_SILVER
fixed_mut_color = "ddd"
fixed_mut_color = "#dddddd"
punchstunthreshold = 9 //60% chance, from 40%
meat = /obj/item/stack/ore/silver
info_text = "As a <span class='danger'>Silver Golem</span>, your attacks have a higher chance of stunning. Being made of silver, your body is immune to most types of magic."
@@ -213,7 +213,7 @@
/datum/species/golem/plasteel
name = "Plasteel Golem"
id = SPECIES_GOLEM_PLASTEEL
fixed_mut_color = "bbb"
fixed_mut_color = "#bbbbbb"
stunmod = 0.4
punchdamagelow = 12
punchdamagehigh = 21
@@ -242,7 +242,7 @@
/datum/species/golem/titanium
name = "Titanium Golem"
id = SPECIES_GOLEM_TITANIUM
fixed_mut_color = "fff"
fixed_mut_color = "#ffffff"
meat = /obj/item/stack/ore/titanium
info_text = "As a <span class='danger'>Titanium Golem</span>, you are immune to ash storms, and slightly more resistant to burn damage."
burnmod = 0.9
@@ -261,7 +261,7 @@
/datum/species/golem/plastitanium
name = "Plastitanium Golem"
id = SPECIES_GOLEM_PLASTITANIUM
fixed_mut_color = "888"
fixed_mut_color = "#888888"
meat = /obj/item/stack/ore/titanium
info_text = "As a <span class='danger'>Plastitanium Golem</span>, you are immune to both ash storms and lava, and slightly more resistant to burn damage."
burnmod = 0.8
@@ -282,7 +282,7 @@
/datum/species/golem/alloy
name = "Alien Alloy Golem"
id = SPECIES_GOLEM_ALIEN
fixed_mut_color = "333"
fixed_mut_color = "#333333"
meat = /obj/item/stack/sheet/mineral/abductor
mutanttongue = /obj/item/organ/tongue/abductor
speedmod = 1 //faster
@@ -302,7 +302,7 @@
/datum/species/golem/wood
name = "Wood Golem"
id = SPECIES_GOLEM_WOOD
fixed_mut_color = "9E704B"
fixed_mut_color = "#9E704B"
meat = /obj/item/stack/sheet/mineral/wood
//Can burn and take damage from heat
inherent_traits = list(
@@ -357,7 +357,7 @@
/datum/species/golem/uranium
name = "Uranium Golem"
id = SPECIES_GOLEM_URANIUM
fixed_mut_color = "7f0"
fixed_mut_color = "#77ff00"
meat = /obj/item/stack/ore/uranium
info_text = "As an <span class='danger'>Uranium Golem</span>, your very touch burns and irradiates organic lifeforms. You don't hit as hard as most golems, but you are far more durable against blunt force trauma."
attack_verb = "burn"
@@ -408,7 +408,7 @@
/datum/species/golem/sand
name = "Sand Golem"
id = SPECIES_GOLEM_SAND
fixed_mut_color = "ffdc8f"
fixed_mut_color = "#ffdc8f"
meat = /obj/item/stack/ore/glass //this is sand
armor = 0
burnmod = 3 //melts easily
@@ -439,7 +439,7 @@
/datum/species/golem/glass
name = "Glass Golem"
id = SPECIES_GOLEM_GLASS
fixed_mut_color = "5a96b4aa" //transparent body
fixed_mut_color = "#5a96b4aa" //transparent body
meat = /obj/item/shard
armor = 0
brutemod = 3 //very fragile
@@ -476,7 +476,7 @@
/datum/species/golem/bluespace
name = "Bluespace Golem"
id = SPECIES_GOLEM_BLUESPACE
fixed_mut_color = "33f"
fixed_mut_color = "#3333ff"
meat = /obj/item/stack/ore/bluespace_crystal
info_text = "As a <span class='danger'>Bluespace Golem</span>, you are spatially unstable: You will teleport when hit, and you can teleport manually at a long distance."
attack_verb = "bluespace punch"
@@ -571,7 +571,7 @@
/datum/species/golem/bananium
name = "Bananium Golem"
id = SPECIES_GOLEM_BANANIUM
fixed_mut_color = "ff0"
fixed_mut_color = "#ffff00"
say_mod = "honks"
inherent_traits = list(
TRAIT_ADVANCEDTOOLUSER,
@@ -899,7 +899,7 @@
id = SPECIES_GOLEM_BRONZE
prefix = "Bronze"
special_names = list("Bell")
fixed_mut_color = "cd7f32"
fixed_mut_color = "#cd7f32"
info_text = "As a <span class='danger'>Bronze Golem</span>, you are very resistant to loud noises, and make loud noises if something hard hits you, however this ability does hurt your hearing."
special_step_sounds = list('sound/machines/clockcult/integration_cog_install.ogg', 'sound/magic/clockwork/fellowship_armory.ogg' )
mutantears = /obj/item/organ/ears/bronze
@@ -1043,7 +1043,7 @@
TRAIT_STRONG_GRABBER,
)
prefix = "Leather"
fixed_mut_color = "624a2e"
fixed_mut_color = "#624a2e"
info_text = "As a <span class='danger'>Leather Golem</span>, you are flammable, but you can grab things with incredible ease, allowing all your grabs to start at a strong level."
grab_sound = 'sound/weapons/whipgrab.ogg'
attack_sound = 'sound/weapons/whip.ogg'
@@ -1252,7 +1252,7 @@
/datum/species/golem/mhydrogen
name = "Metallic Hydrogen Golem"
id = SPECIES_GOLEM_HYDROGEN
fixed_mut_color = "ddd"
fixed_mut_color = "#dddddd"
info_text = "As a <span class='danger'>Metallic Hydrogen Golem</span>, you were forged in the highest pressures and the highest heats. Your unique mineral makeup makes you immune to most types of damages."
prefix = "Metallic Hydrogen"
special_names = null
@@ -18,5 +18,5 @@
/datum/species/human/prepare_human_for_preview(mob/living/carbon/human/human)
human.hairstyle = "Business Hair"
human.hair_color = "b96" // brown
human.hair_color = "#bb9966" // brown
human.update_hair()
@@ -241,7 +241,7 @@
spare.underwear = "Nude"
H.dna.transfer_identity(spare, transfer_SE=1)
spare.dna.features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
spare.dna.features["mcolor"] = "#[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]"
spare.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)
spare.real_name = spare.dna.real_name
spare.name = spare.dna.real_name
@@ -308,8 +308,7 @@
continue
var/list/L = list()
// HTML colors need a # prefix
L["htmlcolor"] = "#[body.dna.features["mcolor"]]"
L["htmlcolor"] = body.dna.features["mcolor"]
L["area"] = get_area_name(body, TRUE)
var/stat = "error"
switch(body.stat)
@@ -169,8 +169,8 @@ Lizard subspecies: SILVER SCALED
var/mob/living/carbon/human/new_silverscale = C
old_mutcolor = C.dna.features["mcolor"]
old_eyecolor = new_silverscale.eye_color
new_silverscale.dna.features["mcolor"] = "eeeeee"
new_silverscale.eye_color = "0000a0"
new_silverscale.dna.features["mcolor"] = "#eeeeee"
new_silverscale.eye_color = "#0000a0"
..()
new_silverscale.add_filter("silver_glint", 2, list("type" = "outline", "color" = "#ffffff63", "size" = 2))
@@ -4,8 +4,8 @@
mutant_bodyparts = list("caps" = "Round")
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN
fixed_mut_color = "DBBF92"
hair_color = "FF4B19" //cap color, spot color uses eye color
fixed_mut_color = "#DBBF92"
hair_color = "#FF4B19" //cap color, spot color uses eye color
nojumpsuit = TRUE
say_mod = "poofs" //what does a mushroom sound like