mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 09:14:17 +00:00
istype() Reduction & A Missed Spot
Checks once when S (or NS) is set. At S, it will default the species (human), fetch the species datum (also human) and generate a random character of that species (all but the random character generation is done at NS as well). Also sorts out a species check I missed (it checked to see if the species wasn't Machine. Now it checks to see if the species doesn't have ALL_RPARTS - functionally the same).
This commit is contained in:
@@ -261,6 +261,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
switch(current_tab)
|
||||
if(TAB_CHAR) // Character Settings
|
||||
var/datum/species/S = all_species[species]
|
||||
if(!istype(S)) //The species was invalid. Set the species to the default, fetch the datum for that species and generate a random character.
|
||||
species = initial(species)
|
||||
S = all_species[species]
|
||||
random_character()
|
||||
|
||||
dat += "<div class='statusDisplay' style='max-width: 128px; position: absolute; left: 150px; top: 150px'><img src=previewicon.png class='charPreview'><img src=previewicon2.png class='charPreview'></div>"
|
||||
dat += "<table width='100%'><tr><td width='405px' height='25px' valign='top'>"
|
||||
dat += "<b>Name: </b>"
|
||||
@@ -291,10 +296,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(species == "Grey")
|
||||
dat += "<b>Voice:</b> <a href ='?_src_=prefs;preference=speciesprefs;task=input'>[speciesprefs ? "Wingdings" : "Normal"]</a><BR>"
|
||||
dat += "<b>Secondary Language:</b> <a href='?_src_=prefs;preference=language;task=input'>[language]</a><br>"
|
||||
if(istype(S) && S.autohiss_basic_map)
|
||||
if(S.autohiss_basic_map)
|
||||
dat += "<b>Auto-accent:</b> <a href='?_src_=prefs;preference=autohiss_mode;task=input'>[autohiss_mode == 2 ? "Full" : (autohiss_mode == 1 ? "Basic" : "Off")]</a><br>"
|
||||
dat += "<b>Blood Type:</b> <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
|
||||
if(istype(S) && S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
dat += "<b>Skin Tone:</b> <a href='?_src_=prefs;preference=s_tone;task=input'>[species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]</a><br>"
|
||||
dat += "<b>Disabilities:</b> <a href='?_src_=prefs;preference=disabilities'>\[Set\]</a><br>"
|
||||
dat += "<b>Nanotrasen Relation:</b> <a href ='?_src_=prefs;preference=nt_relation;task=input'>[nanotrasen_relation]</a><br>"
|
||||
@@ -306,7 +311,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
dat += "<h2>Hair & Accessories</h2>"
|
||||
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
var/headaccessoryname = "Head Accessory: "
|
||||
if(species == "Unathi")
|
||||
headaccessoryname = "Horns: "
|
||||
@@ -314,15 +319,15 @@ 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(istype(S) && S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //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(istype(S) && S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
dat += "<b>Body Markings:</b> "
|
||||
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(istype(S) && S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //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>"
|
||||
@@ -344,11 +349,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<br>"
|
||||
|
||||
|
||||
if(species != "Machine")
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
dat += "<b>Eyes:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Color</a> [color_square(r_eyes, g_eyes, b_eyes)]<br>"
|
||||
|
||||
if((istype(S) && S.bodyflags & HAS_SKIN_COLOR) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
|
||||
dat += "<b>Body Color:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Color</a> [color_square(r_skin, g_skin, b_skin)]<br>"
|
||||
|
||||
@@ -365,7 +370,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<a href=\"byond://?_src_=prefs;preference=records;record=1\">Character Records</a><br>"
|
||||
|
||||
dat += "<h2>Limbs</h2>"
|
||||
if(istype(S) && S.bodyflags & HAS_ALT_HEADS) //Species with alt heads.
|
||||
if(S.bodyflags & HAS_ALT_HEADS) //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>"
|
||||
@@ -416,11 +421,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
else dat += "<br>"
|
||||
|
||||
dat += "<h2>Clothing</h2>"
|
||||
if(istype(S) && S.clothing_flags & HAS_UNDERWEAR)
|
||||
if(S.clothing_flags & HAS_UNDERWEAR)
|
||||
dat += "<b>Underwear:</b> <a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
if(istype(S) && S.clothing_flags & HAS_UNDERSHIRT)
|
||||
if(S.clothing_flags & HAS_UNDERSHIRT)
|
||||
dat += "<b>Undershirt:</b> <a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
|
||||
if(istype(S) && S.clothing_flags & HAS_SOCKS)
|
||||
if(S.clothing_flags & HAS_SOCKS)
|
||||
dat += "<b>Socks:</b> <a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
|
||||
dat += "<b>Backpack Type:</b> <a href ='?_src_=prefs;preference=bag;task=input'>[backbag]</a><br>"
|
||||
|
||||
@@ -1075,7 +1080,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("input")
|
||||
var/dflag=text2num(href_list["disability"])
|
||||
if(dflag >= 0)
|
||||
if(dflag==DISABILITY_FLAG_FAT && (istype(S) && S.flags & CAN_BE_FAT))
|
||||
if(dflag==DISABILITY_FLAG_FAT && (S.flags & CAN_BE_FAT))
|
||||
disabilities ^= text2num(href_list["disability"]) //MAGIC
|
||||
SetDisabilities(user)
|
||||
else
|
||||
@@ -1161,7 +1166,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
switch(href_list["task"])
|
||||
if("random")
|
||||
var/datum/robolimb/robohead
|
||||
if(istype(S) && S.flags & ALL_RPARTS)
|
||||
if(S.flags & ALL_RPARTS)
|
||||
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
|
||||
robohead = all_robolimbs[head_model]
|
||||
switch(href_list["preference"])
|
||||
@@ -1194,30 +1199,30 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("f_style")
|
||||
f_style = random_facial_hair_style(gender, species, robohead)
|
||||
if("headaccessory")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
r_headacc = rand(0,255)
|
||||
g_headacc = rand(0,255)
|
||||
b_headacc = rand(0,255)
|
||||
if("ha_style")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
ha_style = random_head_accessory(species)
|
||||
if("m_style_head")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head)
|
||||
if("m_head_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
m_colours["head"] = rgb(rand(0,255), rand(0,255), rand(0,255))
|
||||
if("m_style_body")
|
||||
if(istype(S) && S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings.
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings.
|
||||
m_styles["body"] = random_marking_style("body", species)
|
||||
if("m_body_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings.
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings.
|
||||
m_colours["body"] = rgb(rand(0,255), rand(0,255), rand(0,255))
|
||||
if("m_style_tail")
|
||||
if(istype(S) && S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
m_styles["tail"] = random_marking_style("tail", species, null, body_accessory)
|
||||
if("m_tail_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
m_colours["tail"] = rgb(rand(0,255), rand(0,255), rand(0,255))
|
||||
if("underwear")
|
||||
underwear = random_underwear(gender, species)
|
||||
@@ -1233,10 +1238,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
g_eyes = rand(0,255)
|
||||
b_eyes = rand(0,255)
|
||||
if("s_tone")
|
||||
if(istype(S) && S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
s_tone = random_skin_tone()
|
||||
if("s_color")
|
||||
if(istype(S) && S.bodyflags & HAS_SKIN_COLOR)
|
||||
if(S.bodyflags & HAS_SKIN_COLOR)
|
||||
r_skin = rand(0,255)
|
||||
g_skin = rand(0,255)
|
||||
b_skin = rand(0,255)
|
||||
@@ -1278,11 +1283,14 @@ 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
|
||||
var/datum/species/NS = all_species[species]
|
||||
if(!istype(NS)) //The species was invalid. Set the species to the default and fetch the datum for that species.
|
||||
species = initial(species)
|
||||
NS = all_species[species]
|
||||
if(prev_species != species)
|
||||
if(NS.has_gender && gender == PLURAL)
|
||||
gender = pick(MALE,FEMALE)
|
||||
var/datum/robolimb/robohead
|
||||
if(istype(NS) && NS.flags & ALL_RPARTS)
|
||||
if(NS.flags & ALL_RPARTS)
|
||||
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
|
||||
@@ -1291,7 +1299,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
//grab one of the valid facial hair styles for the newly chosen species
|
||||
f_style = random_facial_hair_style(gender, species, robohead)
|
||||
|
||||
if(istype(NS) && NS.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
if(NS.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
ha_style = random_head_accessory(species)
|
||||
else
|
||||
ha_style = "None" // No Vulp ears on Unathi
|
||||
@@ -1299,19 +1307,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
g_headacc = 0
|
||||
b_headacc = 0
|
||||
|
||||
if(istype(NS) && NS.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(NS.bodyflags & HAS_HEAD_MARKINGS) //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(istype(NS) && NS.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
if(NS.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
m_styles["body"] = random_marking_style("body", species)
|
||||
else
|
||||
m_styles["body"] = "None"
|
||||
m_colours["body"] = "#000000"
|
||||
|
||||
if(istype(NS) && NS.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(NS.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
m_styles["tail"] = random_marking_style("tail", species, null, body_accessory)
|
||||
else
|
||||
m_styles["tail"] = "None"
|
||||
@@ -1331,12 +1339,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
socks = random_socks(gender, species)
|
||||
|
||||
//reset skin tone and colour
|
||||
if(istype(NS) && NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
if(NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
random_skin_tone(species)
|
||||
else
|
||||
s_tone = 0
|
||||
|
||||
if(!(istype(NS) && NS.bodyflags & HAS_SKIN_COLOR))
|
||||
if(!(NS.bodyflags & HAS_SKIN_COLOR))
|
||||
r_skin = 0
|
||||
g_skin = 0
|
||||
b_skin = 0
|
||||
@@ -1350,7 +1358,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
organ_data = list()
|
||||
rlimb_data = list()
|
||||
|
||||
if(!(istype(NS) && NS.autohiss_basic_map))
|
||||
if(!(NS.autohiss_basic_map))
|
||||
autohiss_mode = 0
|
||||
if("speciesprefs")
|
||||
speciesprefs = !speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
|
||||
@@ -1377,7 +1385,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
language = input("Please select a secondary language", "Character Generation", null) in new_languages
|
||||
|
||||
if("autohiss_mode")
|
||||
if(istype(S) && S.autohiss_basic_map)
|
||||
if(S.autohiss_basic_map)
|
||||
var/list/autohiss_choice = list("Off" = 0, "Basic" = 1, "Full" = 2)
|
||||
var/new_autohiss_pref = input(user, "Choose your character's auto-accent level:", "Character Preference") as null|anything in autohiss_choice
|
||||
autohiss_mode = autohiss_choice[new_autohiss_pref]
|
||||
@@ -1419,7 +1427,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(hairstyle == "Bald") //Just in case.
|
||||
valid_hairstyles += hairstyle
|
||||
continue
|
||||
if(istype(S) && S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
if(S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
var/head_model
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
@@ -1441,7 +1449,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
h_style = new_h_style
|
||||
|
||||
if("headaccessory")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_ACCESSORY) //Species with head accessories.
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species with head accessories.
|
||||
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)
|
||||
@@ -1450,7 +1458,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_headacc = color2B(new_head_accessory)
|
||||
|
||||
if("ha_style")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_ACCESSORY) //Species with head accessories.
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species with head accessories.
|
||||
var/list/valid_head_accessory_styles = list()
|
||||
for(var/head_accessory_style in head_accessory_styles_list)
|
||||
var/datum/sprite_accessory/H = head_accessory_styles_list[head_accessory_style]
|
||||
@@ -1466,7 +1474,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("alt_head")
|
||||
if(organ_data["head"] == "cyborg")
|
||||
return
|
||||
if(istype(S) && S.bodyflags & HAS_ALT_HEADS) //Species with alt heads.
|
||||
if(S.bodyflags & HAS_ALT_HEADS) //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)
|
||||
@@ -1486,7 +1494,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_styles["head"] = "None"
|
||||
|
||||
if("m_style_head")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
@@ -1502,7 +1510,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(M.heads_allowed && !("All" in M.heads_allowed))
|
||||
continue
|
||||
|
||||
if(istype(S) && S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
if(S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
var/head_model
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
@@ -1522,14 +1530,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_styles["head"] = new_marking_style
|
||||
|
||||
if("m_head_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //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(istype(S) && S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
@@ -1546,14 +1554,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_styles["body"] = new_marking_style
|
||||
|
||||
if("m_body_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //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(istype(S) && S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
@@ -1576,7 +1584,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_styles["tail"] = new_marking_style
|
||||
|
||||
if("m_tail_colour")
|
||||
if(istype(S) && S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //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)
|
||||
@@ -1630,7 +1638,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
continue
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(istype(S) && S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
if(S.flags & ALL_RPARTS) //Species that can use prosthetic heads.
|
||||
var/head_model
|
||||
if(!rlimb_data["head"]) //Handle situations where the head is default.
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
@@ -1706,11 +1714,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_eyes = color2B(new_eyes)
|
||||
|
||||
if("s_tone")
|
||||
if(istype(S) && S.bodyflags & HAS_SKIN_TONE)
|
||||
if(S.bodyflags & HAS_SKIN_TONE)
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Character Preference") as num|null
|
||||
if(new_s_tone)
|
||||
s_tone = 35 - max(min(round(new_s_tone), 220), 1)
|
||||
else if(istype(S) && S.bodyflags & HAS_ICON_SKIN_TONE)
|
||||
else if(S.bodyflags & HAS_ICON_SKIN_TONE)
|
||||
var/const/MAX_LINE_ENTRIES = 4
|
||||
var/prompt = "Choose your character's skin tone: 1-[S.icon_skin_tones.len]\n("
|
||||
for(var/i = 1 to S.icon_skin_tones.len)
|
||||
@@ -1725,7 +1733,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
s_tone = max(min(round(skin_c), S.icon_skin_tones.len), 1)
|
||||
|
||||
if("skin")
|
||||
if((istype(S) && S.bodyflags & HAS_SKIN_COLOR) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || 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 = color2R(new_skin)
|
||||
@@ -1759,7 +1767,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("limbs")
|
||||
var/valid_limbs = list("Left Leg", "Right Leg", "Left Arm", "Right Arm", "Left Foot", "Right Foot", "Left Hand", "Right Hand")
|
||||
if(istype(S) && S.flags & ALL_RPARTS)
|
||||
if(S.flags & ALL_RPARTS)
|
||||
valid_limbs = list("Torso", "Lower Body", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm", "Left Foot", "Right Foot", "Left Hand", "Right Hand")
|
||||
var/limb_name = input(user, "Which limb do you want to change?") as null|anything in valid_limbs
|
||||
if(!limb_name) return
|
||||
@@ -1795,19 +1803,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
second_limb = "r_hand"
|
||||
if("Left Foot")
|
||||
limb = "l_foot"
|
||||
if(!(istype(S) && S.flags & ALL_RPARTS))
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "l_leg"
|
||||
if("Right Foot")
|
||||
limb = "r_foot"
|
||||
if(!(istype(S) && S.flags & ALL_RPARTS))
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "r_leg"
|
||||
if("Left Hand")
|
||||
limb = "l_hand"
|
||||
if(!(istype(S) && S.flags & ALL_RPARTS))
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "l_arm"
|
||||
if("Right Hand")
|
||||
limb = "r_hand"
|
||||
if(!(istype(S) && S.flags & ALL_RPARTS))
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "r_arm"
|
||||
|
||||
var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in valid_limb_states
|
||||
@@ -1863,7 +1871,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(subchoice)
|
||||
choice = subchoice
|
||||
if(limb in list("head", "chest", "groin"))
|
||||
if(!(istype(S) && S.flags & ALL_RPARTS))
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
return
|
||||
if(limb == "head")
|
||||
ha_style = "None"
|
||||
|
||||
Reference in New Issue
Block a user