mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #7019 from KasparoVy/autoaccent-pref
Turns Auto-Accent into a by-character Preference, Desnowflakes Preferences.dm
This commit is contained in:
@@ -147,6 +147,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/alt_head = "None" //Alt head style.
|
||||
var/species = "Human"
|
||||
var/language = "None" //Secondary language
|
||||
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
|
||||
|
||||
var/body_accessory = null
|
||||
|
||||
@@ -259,6 +260,12 @@ 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>"
|
||||
@@ -289,9 +296,11 @@ 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(S.autohiss_basic_map)
|
||||
dat += "<b>Auto-accent:</b> <a href='?_src_=prefs;preference=autohiss_mode;task=input'>[autohiss_mode == AUTOHISS_FULL ? "Full" : (autohiss_mode == AUTOHISS_BASIC ? "Basic" : "Off")]</a><br>"
|
||||
dat += "<b>Blood Type:</b> <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
|
||||
if(species in list("Human", "Drask", "Vox"))
|
||||
dat += "<b>Skin Tone:</b> <a href='?_src_=prefs;preference=s_tone;task=input'>[species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]</a><br>"
|
||||
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
dat += "<b>Skin Tone:</b> <a href='?_src_=prefs;preference=s_tone;task=input'>[S.bodyflags & HAS_ICON_SKIN_TONE ? "[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>"
|
||||
dat += "<a href='byond://?_src_=prefs;preference=flavor_text;task=input'>Set Flavor Text</a><br>"
|
||||
@@ -302,7 +311,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
dat += "<h2>Hair & Accessories</h2>"
|
||||
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine", "Kidan")) //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: "
|
||||
@@ -310,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(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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(species in list("Vox", "Vulpkanin")) //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>"
|
||||
@@ -340,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((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || 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>"
|
||||
|
||||
@@ -361,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(species in list("Unathi")) //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>"
|
||||
@@ -412,9 +421,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
else dat += "<br>"
|
||||
|
||||
dat += "<h2>Clothing</h2>"
|
||||
dat += "<b>Underwear:</b> <a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
dat += "<b>Undershirt:</b> <a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
|
||||
dat += "<b>Socks:</b> <a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
|
||||
if(S.clothing_flags & HAS_UNDERWEAR)
|
||||
dat += "<b>Underwear:</b> <a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
if(S.clothing_flags & HAS_UNDERSHIRT)
|
||||
dat += "<b>Undershirt:</b> <a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
|
||||
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>"
|
||||
|
||||
dat += "</td></tr></table>"
|
||||
@@ -1068,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 && species!=("Human" || "Tajaran" || "Grey")))
|
||||
if(dflag==DISABILITY_FLAG_FAT && (S.flags & CAN_BE_FAT))
|
||||
disabilities ^= text2num(href_list["disability"]) //MAGIC
|
||||
SetDisabilities(user)
|
||||
else
|
||||
@@ -1154,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(species == "Machine")
|
||||
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"])
|
||||
@@ -1187,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(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //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(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //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(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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(species in list("Vox", "Vulpkanin")) //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(species in list("Vox", "Vulpkanin")) //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)
|
||||
@@ -1226,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(species in list("Human", "Drask", "Vox"))
|
||||
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
s_tone = random_skin_tone()
|
||||
if("s_color")
|
||||
if(species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Wryn", "Vulpkanin", "Machine"))
|
||||
if(S.bodyflags & HAS_SKIN_COLOR)
|
||||
r_skin = rand(0,255)
|
||||
g_skin = rand(0,255)
|
||||
b_skin = rand(0,255)
|
||||
@@ -1253,7 +1265,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("age")
|
||||
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
|
||||
if(new_age)
|
||||
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
|
||||
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
|
||||
@@ -1271,11 +1283,15 @@ 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. Notify the user and fail out.
|
||||
species = prev_species
|
||||
to_chat(user, "<span class='warning'>Invalid species, please pick something else.</span>")
|
||||
return
|
||||
if(prev_species != species)
|
||||
if(NS.has_gender && gender == PLURAL)
|
||||
gender = pick(MALE,FEMALE)
|
||||
var/datum/robolimb/robohead
|
||||
if(species == "Machine")
|
||||
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
|
||||
@@ -1284,7 +1300,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(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //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
|
||||
@@ -1292,19 +1308,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
g_headacc = 0
|
||||
b_headacc = 0
|
||||
|
||||
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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(species in list("Vox", "Vulpkanin")) //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"
|
||||
@@ -1324,12 +1340,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(species in list("Human", "Drask", "Vox"))
|
||||
if(NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
random_skin_tone(species)
|
||||
else
|
||||
s_tone = 0
|
||||
|
||||
if(!(species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")))
|
||||
if(!(NS.bodyflags & HAS_SKIN_COLOR))
|
||||
r_skin = 0
|
||||
g_skin = 0
|
||||
b_skin = 0
|
||||
@@ -1342,6 +1358,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
//Reset prosthetics.
|
||||
organ_data = list()
|
||||
rlimb_data = list()
|
||||
|
||||
if(!(NS.autohiss_basic_map))
|
||||
autohiss_mode = AUTOHISS_OFF
|
||||
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.
|
||||
if("language")
|
||||
@@ -1366,6 +1385,12 @@ 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(S.autohiss_basic_map)
|
||||
var/list/autohiss_choice = list("Off" = AUTOHISS_OFF, "Basic" = AUTOHISS_BASIC, "Full" = AUTOHISS_FULL)
|
||||
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]
|
||||
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
@@ -1377,7 +1402,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_type = new_b_type
|
||||
|
||||
if("hair")
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) //Species that have hair. (No HAS_HAIR flag)
|
||||
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)
|
||||
@@ -1403,7 +1428,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(species == "Machine") //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"
|
||||
@@ -1425,7 +1450,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
h_style = new_h_style
|
||||
|
||||
if("headaccessory")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine", "Kidan")) //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)
|
||||
@@ -1434,7 +1459,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_headacc = color2B(new_head_accessory)
|
||||
|
||||
if("ha_style")
|
||||
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine", "Kidan")) //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]
|
||||
@@ -1450,7 +1475,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("alt_head")
|
||||
if(organ_data["head"] == "cyborg")
|
||||
return
|
||||
if(species in list("Unathi")) //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)
|
||||
@@ -1470,7 +1495,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_styles["head"] = "None"
|
||||
|
||||
if("m_style_head")
|
||||
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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)
|
||||
@@ -1486,7 +1511,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(species == "Machine") //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"
|
||||
@@ -1506,14 +1531,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(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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)
|
||||
@@ -1530,14 +1555,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(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //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(species in list("Vox", "Vulpkanin")) //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)
|
||||
@@ -1560,7 +1585,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(species in list("Vox", "Vulpkanin")) //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)
|
||||
@@ -1585,7 +1610,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
body_accessory = (new_body_accessory == "None") ? null : new_body_accessory
|
||||
|
||||
if("facial")
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) //Species that have facial hair. (No HAS_HAIR_FACIAL flag)
|
||||
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 = color2R(new_facial)
|
||||
@@ -1614,7 +1639,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
continue
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(species == "Machine") //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"
|
||||
@@ -1690,17 +1715,26 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
b_eyes = color2B(new_eyes)
|
||||
|
||||
if("s_tone")
|
||||
if(species == "Human" || species == "Drask")
|
||||
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(species == "Vox")
|
||||
var/skin_c = input(user, "Choose your Vox's skin color:\n(1 = Default Green, 2 = Dark Green, 3 = Brown, 4 = Grey, \n5 = Emerald, 6 = Azure)", "Character Preference") as num|null
|
||||
if(skin_c)
|
||||
s_tone = max(min(round(skin_c), 6), 1)
|
||||
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)
|
||||
if(i > MAX_LINE_ENTRIES && !((i - 1) % MAX_LINE_ENTRIES))
|
||||
prompt += "\n"
|
||||
prompt += "[i] = [S.icon_skin_tones[i]]"
|
||||
if(i != S.icon_skin_tones.len)
|
||||
prompt += ", "
|
||||
prompt += ")"
|
||||
var/skin_c = input(user, prompt, "Character Preference") as num|null
|
||||
if(isnum(skin_c))
|
||||
s_tone = max(min(round(skin_c), S.icon_skin_tones.len), 1)
|
||||
|
||||
if("skin")
|
||||
if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || 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)
|
||||
@@ -1734,7 +1768,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(species == "Machine")
|
||||
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
|
||||
@@ -1770,19 +1804,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(species != "Machine")
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "l_leg"
|
||||
if("Right Foot")
|
||||
limb = "r_foot"
|
||||
if(species != "Machine")
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "r_leg"
|
||||
if("Left Hand")
|
||||
limb = "l_hand"
|
||||
if(species != "Machine")
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
third_limb = "l_arm"
|
||||
if("Right Hand")
|
||||
limb = "r_hand"
|
||||
if(species != "Machine")
|
||||
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
|
||||
@@ -1838,7 +1872,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(species != "Machine")
|
||||
if(!(S.flags & ALL_RPARTS))
|
||||
return
|
||||
if(limb == "head")
|
||||
ha_style = "None"
|
||||
|
||||
@@ -175,7 +175,8 @@
|
||||
speciesprefs,
|
||||
socks,
|
||||
body_accessory,
|
||||
gear
|
||||
gear,
|
||||
autohiss
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -268,6 +269,7 @@
|
||||
socks = query.item[63]
|
||||
body_accessory = query.item[64]
|
||||
gear = params2list(query.item[65])
|
||||
autohiss_mode = text2num(query.item[66])
|
||||
|
||||
//Sanitize
|
||||
var/datum/species/SP = all_species[species]
|
||||
@@ -315,6 +317,7 @@
|
||||
undershirt = sanitize_text(undershirt, initial(undershirt))
|
||||
backbag = sanitize_text(backbag, initial(backbag))
|
||||
b_type = sanitize_text(b_type, initial(b_type))
|
||||
autohiss_mode = sanitize_integer(autohiss_mode, 0, 2, initial(autohiss_mode))
|
||||
|
||||
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
||||
job_support_high = sanitize_integer(job_support_high, 0, 65535, initial(job_support_high))
|
||||
@@ -427,7 +430,8 @@
|
||||
speciesprefs='[speciesprefs]',
|
||||
socks='[socks]',
|
||||
body_accessory='[body_accessory]',
|
||||
gear='[gearlist]'
|
||||
gear='[gearlist]',
|
||||
autohiss='[autohiss_mode]'
|
||||
WHERE ckey='[C.ckey]'
|
||||
AND slot='[default_slot]'"}
|
||||
)
|
||||
@@ -467,7 +471,7 @@
|
||||
gen_record,
|
||||
player_alt_titles,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs,
|
||||
socks, body_accessory, gear)
|
||||
socks, body_accessory, gear, autohiss)
|
||||
|
||||
VALUES
|
||||
('[C.ckey]', '[default_slot]', '[sanitizeSQL(metadata)]', '[sanitizeSQL(real_name)]', '[be_random_name]','[gender]',
|
||||
@@ -497,7 +501,7 @@
|
||||
'[sanitizeSQL(gen_record)]',
|
||||
'[playertitlelist]',
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]',
|
||||
'[socks]', '[body_accessory]', '[gearlist]')
|
||||
'[socks]', '[body_accessory]', '[gearlist]', '[autohiss_mode]')
|
||||
|
||||
"}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user