Merge remote-tracking branch 'ParadiseSS13/master' into jobs_unlock_system

This commit is contained in:
Kyep
2016-11-28 22:19:27 -08:00
437 changed files with 16798 additions and 21683 deletions
+355 -171
View File
@@ -109,18 +109,30 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/r_headacc = 0 //Head accessory colour
var/g_headacc = 0 //Head accessory colour
var/b_headacc = 0 //Head accessory colour
var/m_style = "None" //Marking style
var/r_markings = 0 //Marking colour
var/g_markings = 0 //Marking colour
var/b_markings = 0 //Marking colour
var/list/m_styles = list(
"head" = "None",
"body" = "None",
"tail" = "None"
) //Marking styles.
var/list/m_colours = list(
"head" = "#000000",
"body" = "#000000",
"tail" = "#000000"
) //Marking colours.
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
var/g_hair = 0 //Hair color
var/b_hair = 0 //Hair color
var/f_style = "Shaved" //Face hair type
var/r_facial = 0 //Face hair color
var/g_facial = 0 //Face hair color
var/b_facial = 0 //Face hair color
var/r_hair_sec = 0 //Secondary hair color
var/g_hair_sec = 0 //Secondary hair color
var/b_hair_sec = 0 //Secondary hair color
var/f_style = "Shaved" //Facial hair type
var/r_facial = 0 //Facial hair color
var/g_facial = 0 //Facial hair color
var/b_facial = 0 //Facial hair color
var/r_facial_sec = 0 //Secondary facial hair color
var/g_facial_sec = 0 //Secondary facial hair color
var/b_facial_sec = 0 //Secondary facial hair color
var/s_tone = 0 //Skin tone
var/r_skin = 0 //Skin color
var/g_skin = 0 //Skin color
@@ -128,6 +140,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/r_eyes = 0 //Eye color
var/g_eyes = 0 //Eye color
var/b_eyes = 0 //Eye color
var/alt_head = "None" //Alt head style.
var/species = "Human"
var/language = "None" //Secondary language
@@ -285,18 +298,35 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<a href='?_src_=prefs;preference=ha_style;task=input'>[ha_style]</a> "
dat += "<a href='?_src_=prefs;preference=headaccessory;task=input'>Color</a> [color_square(r_headacc, g_headacc, b_headacc)]<br>"
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have body markings.
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
dat += "<b>Head Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style_head;task=input'>[m_styles["head"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_head_colour;task=input'>Color</a> [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]<br>"
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos.
dat += "<b>Body Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style;task=input'>[m_style]</a>"
dat += "<a href='?_src_=prefs;preference=markings;task=input'>Color</a> [color_square(r_markings, g_markings, b_markings)]<br>"
dat += "<a href='?_src_=prefs;preference=m_style_body;task=input'>[m_styles["body"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_body_colour;task=input'>Color</a> [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]<br>"
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
dat += "<b>Tail Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style_tail;task=input'>[m_styles["tail"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_tail_colour;task=input'>Color</a> [color_square(color2R(m_colours["tail"]), color2G(m_colours["tail"]), color2B(m_colours["tail"]))]<br>"
dat += "<b>Hair:</b> "
dat += "<a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a>"
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Color</a> [color_square(r_hair, g_hair, b_hair)]<br>"
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Color</a> [color_square(r_hair, g_hair, b_hair)]"
var/datum/sprite_accessory/temp_hair_style = hair_styles_list[h_style]
if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_hair;task=input'>Color #2</a> [color_square(r_hair_sec, g_hair_sec, b_hair_sec)]"
dat += "<br>"
dat += "<b>Facial Hair:</b> "
dat += "<a href='?_src_=prefs;preference=f_style;task=input'>[f_style ? "[f_style]" : "Shaved"]</a>"
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Color</a> [color_square(r_facial, g_facial, b_facial)]<br>"
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Color</a> [color_square(r_facial, g_facial, b_facial)]"
var/datum/sprite_accessory/temp_facial_hair_style = facial_hair_styles_list[f_style]
if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour)
dat += " <a href='?_src_=prefs;preference=secondary_facial;task=input'>Color #2</a> [color_square(r_facial_sec, g_facial_sec, b_facial_sec)]"
dat += "<br>"
if(species != "Machine")
dat += "<b>Eyes:</b> "
@@ -319,6 +349,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<a href=\"byond://?src=[user.UID()];preference=records;record=1\">Character Records</a><br>"
dat += "<h2>Limbs</h2>"
if(species in list("Unathi")) //Species with alt heads.
dat += "<b>Alternate Head:</b> "
dat += "<a href='?_src_=prefs;preference=alt_head;task=input'>[alt_head]</a><br>"
dat += "<b>Limbs and Parts:</b> <a href='?_src_=prefs;preference=limbs;task=input'>Adjust</a><br>"
if(species != "Slime People" && species != "Machine")
dat += "<b>Internal Organs:</b> <a href='?_src_=prefs;preference=organs;task=input'>Adjust</a><br>"
@@ -1102,6 +1135,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
switch(href_list["task"])
if("random")
var/datum/robolimb/robohead
if(species == "Machine")
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
robohead = all_robolimbs[head_model]
switch(href_list["preference"])
if("name")
real_name = random_name(gender,species)
@@ -1112,23 +1149,59 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
r_hair = rand(0,255)
g_hair = rand(0,255)
b_hair = rand(0,255)
if("secondary_hair")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox"))
r_hair_sec = rand(0,255)
g_hair_sec = rand(0,255)
b_hair_sec = rand(0,255)
if("h_style")
h_style = random_hair_style(gender, species)
h_style = random_hair_style(gender, species, robohead)
if("facial")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox"))
r_facial = rand(0,255)
g_facial = rand(0,255)
b_facial = rand(0,255)
if("secondary_facial")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox"))
r_facial_sec = rand(0,255)
g_facial_sec = rand(0,255)
b_facial_sec = rand(0,255)
if("f_style")
f_style = random_facial_hair_style(gender, species)
f_style = random_facial_hair_style(gender, species, robohead)
if("headaccessory")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories.
r_headacc = rand(0,255)
g_headacc = rand(0,255)
b_headacc = rand(0,255)
if("ha_style")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories.
ha_style = random_head_accessory(species)
if("m_style_head")
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head)
if("m_head_colour")
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
m_colours["head"] = rgb(rand(0,255), rand(0,255), rand(0,255))
if("m_style_body")
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings.
m_styles["body"] = random_marking_style("body", species)
if("m_body_colour")
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings.
m_colours["body"] = rgb(rand(0,255), rand(0,255), rand(0,255))
if("m_style_tail")
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
m_styles["tail"] = random_marking_style("tail", species, null, body_accessory)
if("m_tail_colour")
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
m_colours["tail"] = rgb(rand(0,255), rand(0,255), rand(0,255))
if("underwear")
underwear = random_underwear(gender)
underwear = random_underwear(gender, species)
ShowChoices(user)
if("undershirt")
undershirt = random_undershirt(gender)
undershirt = random_undershirt(gender, species)
ShowChoices(user)
if("socks")
socks = random_socks(gender)
socks = random_socks(gender, species)
ShowChoices(user)
if("eyes")
r_eyes = rand(0,255)
@@ -1153,7 +1226,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if("name")
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
if(!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
var/new_name = reject_bad_name(raw_name)
var/new_name = reject_bad_name(raw_name, 1)
if(new_name)
real_name = new_name
else
@@ -1164,7 +1237,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("species")
var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
var/prev_species = species
// var/whitelisted = 0
@@ -1182,43 +1254,41 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
species = input("Please select a species", "Character Generation", null) in new_species
if(prev_species != species)
var/datum/robolimb/robohead
if(species == "Machine")
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
robohead = all_robolimbs[head_model]
//grab one of the valid hair styles for the newly chosen species
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if(!(species in S.species_allowed))
continue
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
if(valid_hairstyles.len)
h_style = pick(valid_hairstyles)
else
//this shouldn't happen
h_style = hair_styles_list["Bald"]
h_style = random_hair_style(gender, species, robohead)
//grab one of the valid facial hair styles for the newly chosen species
var/list/valid_facialhairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if(!(species in S.species_allowed))
continue
f_style = random_facial_hair_style(gender, species, robohead)
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
if(valid_facialhairstyles.len)
f_style = pick(valid_facialhairstyles)
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories.
ha_style = random_head_accessory(species)
else
//this shouldn't happen
f_style = facial_hair_styles_list["Shaved"]
ha_style = "None" // No Vulp ears on Unathi
r_headacc = 0
g_headacc = 0
b_headacc = 0
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head)
else
m_styles["head"] = "None"
m_colours["head"] = "#000000"
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos.
m_styles["body"] = random_marking_style("body", species)
else
m_styles["body"] = "None"
m_colours["body"] = "#000000"
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
m_styles["tail"] = random_marking_style("tail", species, null, body_accessory)
else
m_styles["tail"] = "None"
m_colours["tail"] = "#000000"
// Don't wear another species' underwear!
var/datum/sprite_accessory/S = underwear_list[underwear]
@@ -1233,20 +1303,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(!S || !(species in S.species_allowed))
socks = random_socks(gender, species)
//reset hair colour and skin colour
r_hair = 0//hex2num(copytext(new_hair, 2, 4))
g_hair = 0//hex2num(copytext(new_hair, 4, 6))
b_hair = 0//hex2num(copytext(new_hair, 6, 8))
s_tone = 0
//reset skin tone and colour
if(species in list("Human", "Drask", "Vox"))
random_skin_tone(species)
else
s_tone = 0
if(!(species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")))
r_skin = 0
g_skin = 0
b_skin = 0
ha_style = "None" // No Vulp ears on Unathi
m_style = "None" // No Unathi markings on Tajara
alt_head = "None" //No alt heads on species that don't have them.
body_accessory = null //no vulptail on humans damnit
@@ -1293,39 +1361,44 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/input = "Choose your character's hair colour:"
var/new_hair = input(user, input, "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
if(new_hair)
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
b_hair = hex2num(copytext(new_hair, 6, 8))
r_hair = color2R(new_hair)
g_hair = color2G(new_hair)
b_hair = color2B(new_hair)
if("secondary_hair")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style.secondary_theme && !hair_style.no_sec_colour)
var/new_hair = input(user, "Choose your character's secondary hair colour:", "Character Preference", rgb(r_hair_sec, g_hair_sec, b_hair_sec)) as color|null
if(new_hair)
r_hair_sec = color2R(new_hair)
g_hair_sec = color2G(new_hair)
b_hair_sec = color2B(new_hair)
if("h_style")
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(species == "Machine") //Species that can use prosthetic heads.
var/obj/item/organ/external/head/H = new()
if(S.name == "Bald")
valid_hairstyles[hairstyle] = S
if(!rlimb_data["head"]) //Handle situations where the head is default.
H.model = "Morpheus Cyberkinetics"
else
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(species in S.species_allowed)
if(robohead.is_monitor && (robohead.company in S.models_allowed)) //If the Machine character has the default Morpheus screen head or another screen head
//and said head is in the hair style's allowed models list...
valid_hairstyles[hairstyle] = S //Allow them to select the hairstyle.
continue
else
if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human hairstyles).
continue
else if(!robohead.is_monitor && ("Human" in S.species_allowed))
valid_hairstyles[hairstyle] = S
continue
else
if(!(species in S.species_allowed))
continue
valid_hairstyles[hairstyle] = S
if(hairstyle == "Bald") //Just in case.
valid_hairstyles += hairstyle
continue
if(species == "Machine") //Species that can use prosthetic heads.
var/head_model
if(!rlimb_data["head"]) //Handle situations where the head is default.
head_model = "Morpheus Cyberkinetics"
else
head_model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[head_model]
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
else
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
valid_hairstyles += hairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(species in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles
if(new_h_style)
@@ -1336,9 +1409,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/input = "Choose the colour of your your character's head accessory:"
var/new_head_accessory = input(user, input, "Character Preference", rgb(r_headacc, g_headacc, b_headacc)) as color|null
if(new_head_accessory)
r_headacc = hex2num(copytext(new_head_accessory, 2, 4))
g_headacc = hex2num(copytext(new_head_accessory, 4, 6))
b_headacc = hex2num(copytext(new_head_accessory, 6, 8))
r_headacc = color2R(new_head_accessory)
g_headacc = color2G(new_head_accessory)
b_headacc = color2B(new_head_accessory)
if("ha_style")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with head accessories.
@@ -1348,47 +1421,130 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(!(species in H.species_allowed))
continue
valid_head_accessory_styles[head_accessory_style] = head_accessory_styles_list[head_accessory_style]
valid_head_accessory_styles += head_accessory_style
var/new_head_accessory_style = input(user, "Choose the style of your character's head accessory:", "Character Preference") as null|anything in valid_head_accessory_styles
if(new_head_accessory_style)
ha_style = new_head_accessory_style
if("markings")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings.
var/input = "Choose the colour of your your character's markings:"
var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null
if(new_markings)
r_markings = hex2num(copytext(new_markings, 2, 4))
g_markings = hex2num(copytext(new_markings, 4, 6))
b_markings = hex2num(copytext(new_markings, 6, 8))
if("m_style")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings.
var/list/valid_markings = list()
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
if(!(species in M.species_allowed))
if("alt_head")
if(organ_data["head"] == "cyborg")
return
if(species in list("Unathi")) //Species with alt heads.
var/list/valid_alt_heads = list()
valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option
for(var/alternate_head in alt_heads_list)
var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head]
if(!(species in head.species_allowed))
continue
valid_alt_heads += alternate_head
var/new_alt_head = input(user, "Choose your character's alternate head style:", "Character Preference") as null|anything in valid_alt_heads
if(new_alt_head)
alt_head = new_alt_head
if(m_styles["head"])
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking]
if(!head_marking_style.heads_allowed || (!("All" in head_marking_style.heads_allowed) && !(alt_head in head_marking_style.heads_allowed)))
m_styles["head"] = "None"
if("m_style_head")
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
var/list/valid_markings = list()
valid_markings["None"] = marking_styles_list["None"]
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[markingstyle]
if(!(species in M.species_allowed))
continue
if(M.marking_location != "head")
continue
if(alt_head && alt_head != "None")
if(!("All" in M.heads_allowed) && !(alt_head in M.heads_allowed))
continue
else
if(M.heads_allowed && !("All" in M.heads_allowed))
continue
if(species == "Machine") //Species that can use prosthetic heads.
var/obj/item/organ/external/head/H = new()
var/head_model
if(!rlimb_data["head"]) //Handle situations where the head is default.
H.model = "Morpheus Cyberkinetics"
head_model = "Morpheus Cyberkinetics"
else
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
head_model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[head_model]
if(robohead.is_monitor && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings.
continue
else if(!robohead.is_monitor && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip.
if(!(robohead.company in M.models_allowed))
continue
valid_markings[markingstyle] = marking_styles_list[markingstyle]
valid_markings += markingstyle
var/new_marking_style = input(user, "Choose the style of your character's markings:", "Character Preference", m_style) as null|anything in valid_markings
var/new_marking_style = input(user, "Choose the style of your character's head markings:", "Character Preference", m_styles["head"]) as null|anything in valid_markings
if(new_marking_style)
m_style = new_marking_style
m_styles["head"] = new_marking_style
if("m_head_colour")
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings.
var/input = "Choose the colour of your your character's head markings:"
var/new_markings = input(user, input, "Character Preference", m_colours["head"]) as color|null
if(new_markings)
m_colours["head"] = new_markings
if("m_style_body")
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos.
var/list/valid_markings = list()
valid_markings["None"] = marking_styles_list["None"]
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
if(!(species in M.species_allowed))
continue
if(M.marking_location != "body")
continue
valid_markings += markingstyle
var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference", m_styles["body"]) as null|anything in valid_markings
if(new_marking_style)
m_styles["body"] = new_marking_style
if("m_body_colour")
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos.
var/input = "Choose the colour of your your character's body markings:"
var/new_markings = input(user, input, "Character Preference", m_colours["body"]) as color|null
if(new_markings)
m_colours["body"] = new_markings
if("m_style_tail")
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
var/list/valid_markings = list()
valid_markings["None"] = marking_styles_list["None"]
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/body_markings/tail/M = marking_styles_list[markingstyle]
if(M.marking_location != "tail")
continue
if(!(species in M.species_allowed))
continue
if(!body_accessory)
if(M.tails_allowed)
continue
else
if(!M.tails_allowed || !(body_accessory in M.tails_allowed))
continue
valid_markings += markingstyle
var/new_marking_style = input(user, "Choose the style of your character's tail markings:", "Character Preference", m_styles["tail"]) as null|anything in valid_markings
if(new_marking_style)
m_styles["tail"] = new_marking_style
if("m_tail_colour")
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
var/input = "Choose the colour of your your character's tail markings:"
var/new_markings = input(user, input, "Character Preference", m_colours["tail"]) as color|null
if(new_markings)
m_colours["tail"] = new_markings
if("body_accessory")
var/list/possible_body_accessories = list()
@@ -1405,74 +1561,90 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/new_body_accessory = input(user, "Choose your body accessory:", "Character Preference") as null|anything in possible_body_accessories
if(new_body_accessory)
m_styles["tail"] = "None"
body_accessory = (new_body_accessory == "None") ? null : new_body_accessory
if("facial")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null
if(new_facial)
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
b_facial = hex2num(copytext(new_facial, 6, 8))
r_facial = color2R(new_facial)
g_facial = color2G(new_facial)
b_facial = color2B(new_facial)
if("secondary_facial")
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour)
var/new_facial = input(user, "Choose your character's secondary facial-hair colour:", "Character Preference", rgb(r_facial_sec, g_facial_sec, b_facial_sec)) as color|null
if(new_facial)
r_facial_sec = color2R(new_facial)
g_facial_sec = color2G(new_facial)
b_facial_sec = color2B(new_facial)
if("f_style")
var/list/valid_facialhairstyles = list()
var/list/valid_facial_hairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(S.name == "Shaved")
valid_facialhairstyles[facialhairstyle] = S
if(facialhairstyle == "Shaved") //Just in case.
valid_facial_hairstyles += facialhairstyle
continue
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if(species == "Machine") //Species that can use prosthetic heads.
var/obj/item/organ/external/head/H = new()
var/head_model
if(!rlimb_data["head"]) //Handle situations where the head is default.
H.model = "Morpheus Cyberkinetics"
head_model = "Morpheus Cyberkinetics"
else
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(species in S.species_allowed)
if(robohead.is_monitor) //If the Machine character has the default Morpheus screen head or another screen head and they're allowed to have the style, let them have it.
valid_facialhairstyles[facialhairstyle] = S
continue
head_model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[head_model]
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
else
if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human facial hairstyles).
continue
else if(!robohead.is_monitor && ("Human" in S.species_allowed))
valid_facialhairstyles[facialhairstyle] = S
continue
else
if(!(species in S.species_allowed))
continue
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */
valid_facial_hairstyles += facialhairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(species in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
valid_facial_hairstyles += facialhairstyle
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facialhairstyles
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facial_hairstyles
if(new_f_style)
f_style = new_f_style
if("underwear")
var/list/underwear_options
if(gender == MALE)
underwear_options = underwear_m
else
underwear_options = underwear_f
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_options
var/list/valid_underwear = list()
for(var/underwear in underwear_list)
var/datum/sprite_accessory/S = underwear_list[underwear]
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if(!(species in S.species_allowed))
continue
valid_underwear[underwear] = underwear_list[underwear]
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in valid_underwear
ShowChoices(user)
if(new_underwear)
underwear = new_underwear
ShowChoices(user)
if("undershirt")
var/new_undershirt
if(gender == MALE)
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m
else
new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f
var/list/valid_undershirts = list()
for(var/undershirt in undershirt_list)
var/datum/sprite_accessory/S = undershirt_list[undershirt]
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if(!(species in S.species_allowed))
continue
valid_undershirts[undershirt] = undershirt_list[undershirt]
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in valid_undershirts
ShowChoices(user)
if(new_undershirt)
undershirt = new_undershirt
ShowChoices(user)
if("socks")
var/list/valid_sockstyles = list()
@@ -1493,9 +1665,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if("eyes")
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null
if(new_eyes)
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
b_eyes = hex2num(copytext(new_eyes, 6, 8))
r_eyes = color2R(new_eyes)
g_eyes = color2G(new_eyes)
b_eyes = color2B(new_eyes)
if("s_tone")
if(species == "Human" || species == "Drask")
@@ -1511,9 +1683,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
if(new_skin)
r_skin = hex2num(copytext(new_skin, 2, 4))
g_skin = hex2num(copytext(new_skin, 4, 6))
b_skin = hex2num(copytext(new_skin, 6, 8))
r_skin = color2R(new_skin)
g_skin = color2G(new_skin)
b_skin = color2B(new_skin)
if("ooccolor")
@@ -1599,8 +1771,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
switch(new_state)
if("Normal")
if(limb == "head")
m_style = "None"
h_style = random_hair_style(gender, species)
m_styles["head"] = "None"
h_style = hair_styles_list["Bald"]
f_style = facial_hair_styles_list["Shaved"]
organ_data[limb] = null
rlimb_data[limb] = null
@@ -1645,11 +1817,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
subchoice = input(user, "Which model of [choice] [limb_name] do you wish to use?") as null|anything in robolimb_models
if(subchoice)
choice = subchoice
if(limb == "head")
ha_style = "None"
h_style = hair_styles_list["Bald"]
f_style = facial_hair_styles_list["Shaved"]
m_style = "None"
if(limb in list("head", "chest", "groin"))
if(species != "Machine")
return
if(limb == "head")
ha_style = "None"
alt_head = null
h_style = hair_styles_list["Bald"]
f_style = facial_hair_styles_list["Shaved"]
m_styles["head"] = "None"
rlimb_data[limb] = choice
organ_data[limb] = "cyborg"
if(second_limb)
@@ -1660,7 +1836,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
else
rlimb_data[second_limb] = choice
organ_data[second_limb] = "cyborg"
if("organs")
var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes")
if(!organ_name) return
@@ -1852,16 +2027,27 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
//Head-specific
var/obj/item/organ/external/head/H = character.get_organ("head")
H.r_hair = r_hair
H.g_hair = g_hair
H.b_hair = b_hair
H.r_hair_sec = r_hair_sec
H.g_hair_sec = g_hair_sec
H.b_hair_sec = b_hair_sec
H.r_facial = r_facial
H.g_facial = g_facial
H.b_facial = b_facial
H.r_facial_sec = r_facial_sec
H.g_facial_sec = g_facial_sec
H.b_facial_sec = b_facial_sec
H.h_style = h_style
H.f_style = f_style
H.alt_head = alt_head
//End of head-specific.
character.r_skin = r_skin
@@ -1951,10 +2137,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
H.b_headacc = b_headacc
H.ha_style = ha_style
if(character.species.bodyflags & HAS_MARKINGS)
character.r_markings = r_markings
character.g_markings = g_markings
character.b_markings = b_markings
character.m_style = m_style
character.m_colours = m_colours
character.m_styles = m_styles
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
@@ -113,23 +113,28 @@
hair_red,
hair_green,
hair_blue,
secondary_hair_red,
secondary_hair_green,
secondary_hair_blue,
facial_red,
facial_green,
facial_blue,
secondary_facial_red,
secondary_facial_green,
secondary_facial_blue,
skin_tone,
skin_red,
skin_green,
skin_blue,
markings_red,
markings_green,
markings_blue,
marking_colours,
head_accessory_red,
head_accessory_green,
head_accessory_blue,
hair_style_name,
facial_style_name,
marking_style_name,
marking_styles,
head_accessory_style_name,
alt_head_name,
eyes_red,
eyes_green,
eyes_blue,
@@ -184,52 +189,57 @@
r_hair = text2num(query.item[8])
g_hair = text2num(query.item[9])
b_hair = text2num(query.item[10])
r_facial = text2num(query.item[11])
g_facial = text2num(query.item[12])
b_facial = text2num(query.item[13])
s_tone = text2num(query.item[14])
r_skin = text2num(query.item[15])
g_skin = text2num(query.item[16])
b_skin = text2num(query.item[17])
r_markings = text2num(query.item[18])
g_markings = text2num(query.item[19])
b_markings = text2num(query.item[20])
r_headacc = text2num(query.item[21])
g_headacc = text2num(query.item[22])
b_headacc = text2num(query.item[23])
h_style = query.item[24]
f_style = query.item[25]
m_style = query.item[26]
ha_style = query.item[27]
r_eyes = text2num(query.item[28])
g_eyes = text2num(query.item[29])
b_eyes = text2num(query.item[30])
underwear = query.item[31]
undershirt = query.item[32]
backbag = text2num(query.item[33])
b_type = query.item[34]
r_hair_sec = text2num(query.item[11])
g_hair_sec = text2num(query.item[12])
b_hair_sec = text2num(query.item[13])
r_facial = text2num(query.item[14])
g_facial = text2num(query.item[15])
b_facial = text2num(query.item[16])
r_facial_sec = text2num(query.item[17])
g_facial_sec = text2num(query.item[18])
b_facial_sec = text2num(query.item[19])
s_tone = text2num(query.item[20])
r_skin = text2num(query.item[21])
g_skin = text2num(query.item[22])
b_skin = text2num(query.item[23])
m_colours = params2list(query.item[24])
r_headacc = text2num(query.item[25])
g_headacc = text2num(query.item[26])
b_headacc = text2num(query.item[27])
h_style = query.item[28]
f_style = query.item[29]
m_styles = params2list(query.item[30])
ha_style = query.item[31]
alt_head = query.item[32]
r_eyes = text2num(query.item[33])
g_eyes = text2num(query.item[34])
b_eyes = text2num(query.item[35])
underwear = query.item[36]
undershirt = query.item[37]
backbag = text2num(query.item[38])
b_type = query.item[39]
//Jobs
alternate_option = text2num(query.item[35])
job_support_high = text2num(query.item[36])
job_support_med = text2num(query.item[37])
job_support_low = text2num(query.item[38])
job_medsci_high = text2num(query.item[39])
job_medsci_med = text2num(query.item[40])
job_medsci_low = text2num(query.item[41])
job_engsec_high = text2num(query.item[42])
job_engsec_med = text2num(query.item[43])
job_engsec_low = text2num(query.item[44])
job_karma_high = text2num(query.item[45])
job_karma_med = text2num(query.item[46])
job_karma_low = text2num(query.item[47])
alternate_option = text2num(query.item[40])
job_support_high = text2num(query.item[41])
job_support_med = text2num(query.item[42])
job_support_low = text2num(query.item[43])
job_medsci_high = text2num(query.item[44])
job_medsci_med = text2num(query.item[45])
job_medsci_low = text2num(query.item[46])
job_engsec_high = text2num(query.item[47])
job_engsec_med = text2num(query.item[48])
job_engsec_low = text2num(query.item[49])
job_karma_high = text2num(query.item[50])
job_karma_med = text2num(query.item[51])
job_karma_low = text2num(query.item[52])
//Miscellaneous
flavor_text = query.item[48]
med_record = query.item[49]
sec_record = query.item[50]
gen_record = query.item[51]
flavor_text = query.item[53]
med_record = query.item[54]
sec_record = query.item[55]
gen_record = query.item[56]
// Apparently, the preceding vars weren't always encoded properly...
if(findtext(flavor_text, "<")) // ... so let's clumsily check for tags!
flavor_text = html_encode(flavor_text)
@@ -239,17 +249,17 @@
sec_record = html_encode(sec_record)
if(findtext(gen_record, "<"))
gen_record = html_encode(gen_record)
disabilities = text2num(query.item[52])
player_alt_titles = params2list(query.item[53])
organ_data = params2list(query.item[54])
rlimb_data = params2list(query.item[55])
nanotrasen_relation = query.item[56]
speciesprefs = text2num(query.item[57])
disabilities = text2num(query.item[57])
player_alt_titles = params2list(query.item[58])
organ_data = params2list(query.item[59])
rlimb_data = params2list(query.item[60])
nanotrasen_relation = query.item[61]
speciesprefs = text2num(query.item[62])
//socks
socks = query.item[58]
body_accessory = query.item[59]
gear = params2list(query.item[60])
socks = query.item[63]
body_accessory = query.item[64]
gear = params2list(query.item[65])
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
@@ -265,23 +275,30 @@
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
r_hair_sec = sanitize_integer(r_hair_sec, 0, 255, initial(r_hair_sec))
g_hair_sec = sanitize_integer(g_hair_sec, 0, 255, initial(g_hair_sec))
b_hair_sec = sanitize_integer(b_hair_sec, 0, 255, initial(b_hair_sec))
r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial))
g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial))
b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial))
r_facial_sec = sanitize_integer(r_facial_sec, 0, 255, initial(r_facial_sec))
g_facial_sec = sanitize_integer(g_facial_sec, 0, 255, initial(g_facial_sec))
b_facial_sec = sanitize_integer(b_facial_sec, 0, 255, initial(b_facial_sec))
s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone))
r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin))
g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin))
b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin))
r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings))
g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings))
b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings))
for(var/marking_location in m_colours)
m_colours[marking_location] = sanitize_hexcolor(m_colours[marking_location], DEFAULT_MARKING_COLOURS[marking_location])
r_headacc = sanitize_integer(r_headacc, 0, 255, initial(r_headacc))
g_headacc = sanitize_integer(g_headacc, 0, 255, initial(g_headacc))
b_headacc = sanitize_integer(b_headacc, 0, 255, initial(b_headacc))
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style))
for(var/marking_location in m_styles)
m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], marking_styles_list, DEFAULT_MARKING_STYLES[marking_location])
ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style))
alt_head = sanitize_inlist(alt_head, alt_heads_list, initial(alt_head))
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
@@ -321,6 +338,9 @@
var/rlimblist
var/playertitlelist
var/gearlist
var/markingcolourslist = list2params(m_colours)
var/markingstyleslist = list2params(m_styles)
if(!isemptylist(organ_data))
organlist = list2params(organ_data)
if(!isemptylist(rlimb_data))
@@ -344,23 +364,28 @@
hair_red='[r_hair]',
hair_green='[g_hair]',
hair_blue='[b_hair]',
secondary_hair_red='[r_hair_sec]',
secondary_hair_green='[g_hair_sec]',
secondary_hair_blue='[b_hair_sec]',
facial_red='[r_facial]',
facial_green='[g_facial]',
facial_blue='[b_facial]',
secondary_facial_red='[r_facial_sec]',
secondary_facial_green='[g_facial_sec]',
secondary_facial_blue='[b_facial_sec]',
skin_tone='[s_tone]',
skin_red='[r_skin]',
skin_green='[g_skin]',
skin_blue='[b_skin]',
markings_red='[r_markings]',
markings_green='[g_markings]',
markings_blue='[b_markings]',
marking_colours='[sanitizeSQL(markingcolourslist)]',
head_accessory_red='[r_headacc]',
head_accessory_green='[g_headacc]',
head_accessory_blue='[b_headacc]',
hair_style_name='[sanitizeSQL(h_style)]',
facial_style_name='[sanitizeSQL(f_style)]',
marking_style_name='[sanitizeSQL(m_style)]',
marking_styles='[sanitizeSQL(markingstyleslist)]',
head_accessory_style_name='[sanitizeSQL(ha_style)]',
alt_head_name='[sanitizeSQL(alt_head)]',
eyes_red='[r_eyes]',
eyes_green='[g_eyes]',
eyes_blue='[b_eyes]',
@@ -409,14 +434,17 @@
INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender,
age, species, language,
hair_red, hair_green, hair_blue,
secondary_hair_red, secondary_hair_green, secondary_hair_blue,
facial_red, facial_green, facial_blue,
secondary_facial_red, secondary_facial_green, secondary_facial_blue,
skin_tone, skin_red, skin_green, skin_blue,
markings_red, markings_green, markings_blue,
marking_colours,
head_accessory_red, head_accessory_green, head_accessory_blue,
hair_style_name,
facial_style_name,
marking_style_name,
marking_styles,
head_accessory_style_name,
alt_head_name,
eyes_red, eyes_green, eyes_blue,
underwear, undershirt,
backbag, b_type, alternate_option,
@@ -436,14 +464,17 @@
('[C.ckey]', '[default_slot]', '[sanitizeSQL(metadata)]', '[sanitizeSQL(real_name)]', '[be_random_name]','[gender]',
'[age]', '[sanitizeSQL(species)]', '[sanitizeSQL(language)]',
'[r_hair]', '[g_hair]', '[b_hair]',
'[r_hair_sec]', '[g_hair_sec]', '[b_hair_sec]',
'[r_facial]', '[g_facial]', '[b_facial]',
'[r_facial_sec]', '[g_facial_sec]', '[b_facial_sec]',
'[s_tone]', '[r_skin]', '[g_skin]', '[b_skin]',
'[r_markings]', '[g_markings]', '[b_markings]',
'[sanitizeSQL(markingcolourslist)]',
'[r_headacc]', '[g_headacc]', '[b_headacc]',
'[sanitizeSQL(h_style)]',
'[sanitizeSQL(f_style)]',
'[sanitizeSQL(m_style)]',
'[sanitizeSQL(markingstyleslist)]',
'[sanitizeSQL(ha_style)]',
'[sanitizeSQL(alt_head)]',
'[r_eyes]', '[g_eyes]', '[b_eyes]',
'[underwear]', '[undershirt]',
'[backbag]', '[b_type]', '[alternate_option]',