mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-22 04:06:14 +01:00
Merge pull request #1629 from DragonTrance/more-colors
Ports tgstation's Color Standardization, adds Color Defines and Signals
This commit is contained in:
@@ -65,7 +65,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
var/pda_style = MONO
|
||||
var/pda_color = "#808000"
|
||||
var/pda_color = COLOR_OLIVE
|
||||
var/pda_skin = PDA_SKIN_ALT
|
||||
|
||||
var/list/alt_titles_preferences = list()
|
||||
@@ -2012,11 +2012,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"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV(COLOR_NEARLY_BLACK)[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"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV(COLOR_NEARLY_BLACK)[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"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV(COLOR_NEARLY_BLACK)[3]))
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
|
||||
if("custom_species")
|
||||
@@ -2030,10 +2030,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference","#"+features["mcolor"]) as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
if(new_mutantcolor == COLOR_BLACK)
|
||||
features["mcolor"] = pref_species.default_color
|
||||
update_preview_icon()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
update_preview_icon()
|
||||
else
|
||||
@@ -2043,10 +2043,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
if(new_mutantcolor == COLOR_BLACK)
|
||||
features["mcolor2"] = pref_species.default_color
|
||||
update_preview_icon()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor2"] = sanitize_hexcolor(new_mutantcolor)
|
||||
update_preview_icon()
|
||||
else
|
||||
@@ -2056,10 +2056,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
if(new_mutantcolor == COLOR_BLACK)
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
update_preview_icon()
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor3"] = sanitize_hexcolor(new_mutantcolor)
|
||||
update_preview_icon()
|
||||
else
|
||||
@@ -2186,7 +2186,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("wings_color")
|
||||
var/new_wing_color = input(user, "Choose your character's wing colour:", "Character Preference","#"+wing_color) as color|null
|
||||
if(new_wing_color)
|
||||
if (new_wing_color == "#000000")
|
||||
if (new_wing_color == COLOR_BLACK)
|
||||
wing_color = "#FFFFFF"
|
||||
else
|
||||
wing_color = sanitize_hexcolor(new_wing_color)
|
||||
@@ -2422,9 +2422,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_cockcolor = input(user, "Penis color:", "Character Preference") as color|null
|
||||
if(new_cockcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_cockcolor)
|
||||
if(new_cockcolor == "#000000")
|
||||
if(new_cockcolor == COLOR_BLACK)
|
||||
features["cock_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["cock_color"] = sanitize_hexcolor(new_cockcolor)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2454,9 +2454,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_ballscolor = input(user, "Testicle Color:", "Character Preference") as color|null
|
||||
if(new_ballscolor)
|
||||
var/temp_hsv = RGBtoHSV(new_ballscolor)
|
||||
if(new_ballscolor == "#000000")
|
||||
if(new_ballscolor == COLOR_BLACK)
|
||||
features["balls_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["balls_color"] = sanitize_hexcolor(new_ballscolor)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2465,9 +2465,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_bellycolor = input(user, "Belly Color:", "Character Preference") as color|null
|
||||
if(new_bellycolor)
|
||||
var/temp_hsv = RGBtoHSV(new_bellycolor)
|
||||
if(new_bellycolor == "#000000")
|
||||
if(new_bellycolor == COLOR_BLACK)
|
||||
features["belly_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["belly_color"] = sanitize_hexcolor(new_bellycolor)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2476,9 +2476,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_buttcolor = input(user, "Butt Color:", "Character Preference") as color|null
|
||||
if(new_buttcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_buttcolor)
|
||||
if(new_buttcolor == "#000000")
|
||||
if(new_buttcolor == COLOR_BLACK)
|
||||
features["butt_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["butt_color"] = sanitize_hexcolor(new_buttcolor)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2515,7 +2515,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_egg_color = input(user, "Egg Color:", "Character Preference") as color|null
|
||||
if(new_egg_color)
|
||||
var/temp_hsv = RGBtoHSV(new_egg_color)
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["eggsack_egg_color"] = sanitize_hexcolor(new_egg_color)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2551,9 +2551,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_breasts_color = input(user, "Breast Color:", "Character Preference") as color|null
|
||||
if(new_breasts_color)
|
||||
var/temp_hsv = RGBtoHSV(new_breasts_color)
|
||||
if(new_breasts_color == "#000000")
|
||||
if(new_breasts_color == COLOR_BLACK)
|
||||
features["breasts_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["breasts_color"] = sanitize_hexcolor(new_breasts_color)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
@@ -2579,9 +2579,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/new_vagcolor = input(user, "Vagina color:", "Character Preference") as color|null
|
||||
if(new_vagcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_vagcolor)
|
||||
if(new_vagcolor == "#000000")
|
||||
if(new_vagcolor == COLOR_BLACK)
|
||||
features["vag_color"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(COLOR_NEARLY_BLACK)[3])
|
||||
features["vag_color"] = sanitize_hexcolor(new_vagcolor)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
@@ -52,7 +52,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(current_version < 19)
|
||||
pda_style = "mono"
|
||||
if(current_version < 20)
|
||||
pda_color = "#808000"
|
||||
pda_color = COLOR_OLIVE
|
||||
if(current_version < 22)
|
||||
if(features["balls_fluid"])
|
||||
features["balls_fluid"] = /datum/reagent/consumable/semen
|
||||
|
||||
Reference in New Issue
Block a user