Fixes black lizardmen

Everyone whose mutant color is set to black is now instead white.

Also, now black mutantcolors are automatically set to the default color
of your species if you select them.
This commit is contained in:
CollenN
2014-06-22 20:19:02 -04:00
parent cb0db44af5
commit 6571767caa
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -632,7 +632,7 @@ datum/preferences
if(result)
var/newtype = roundstart_species[result]
pref_species = new newtype()
if(!config.mutant_colors)
if(!config.mutant_colors || mutant_color == "#000")
mutant_color = pref_species.default_color
if("mutant_color")
@@ -642,7 +642,9 @@ datum/preferences
var/new_mutantcolor = input(user, "Choose your character's alien skin color:", "Character Preference") as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
if(new_mutantcolor) == "#000000")
mutant_color = pref_species.default_color
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
mutant_color = sanitize_hexcolor(new_mutantcolor)
else
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
@@ -155,6 +155,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(!S["species"] || !config.mutant_races)
S["species"] << new /datum/species/human()
S["mutant_color"] << "#FFF"
//Character
S["OOC_Notes"] >> metadata
@@ -194,6 +195,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
real_name = reject_bad_name(real_name)
if(!(pref_species in species_list))
pref_species = new /datum/species/human()
mutant_color = "#FFF"
if(!real_name) real_name = random_name(gender)
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)