diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index a5991c9bcb9..bd90e0be9f0 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -88,6 +88,7 @@ CREATE TABLE `characters` ( `socks` mediumtext NOT NULL, `body_accessory` mediumtext NOT NULL, `gear` mediumtext NOT NULL, + `autohiss` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=18747 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index 845b8702fcd..94010ad1b74 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -88,6 +88,7 @@ CREATE TABLE `SS13_characters` ( `socks` mediumtext NOT NULL, `body_accessory` mediumtext NOT NULL, `gear` mediumtext NOT NULL, + `autohiss` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=18747 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/code/__DEFINES/language.dm b/code/__DEFINES/language.dm index b1781de3314..2af0fd6ade8 100644 --- a/code/__DEFINES/language.dm +++ b/code/__DEFINES/language.dm @@ -17,4 +17,10 @@ #define NONGLOBAL 32 // Do not add to general languages list #define INNATE 64 // All mobs can be assumed to speak and understand this language (audible emotes) #define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message -#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems \ No newline at end of file +#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems + +//Auto-accent level defines. +#define AUTOHISS_OFF 0 +#define AUTOHISS_BASIC 1 +#define AUTOHISS_FULL 2 +#define AUTOHISS_NUM 3 //Number of auto-accent options. diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 8531cdf4b9c..4f11adc7e93 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -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 += "
" dat += "
" dat += "Name: " @@ -289,9 +296,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(species == "Grey") dat += "Voice: [speciesprefs ? "Wingdings" : "Normal"]
" dat += "Secondary Language: [language]
" + if(S.autohiss_basic_map) + dat += "Auto-accent: [autohiss_mode == AUTOHISS_FULL ? "Full" : (autohiss_mode == AUTOHISS_BASIC ? "Basic" : "Off")]
" dat += "Blood Type: [b_type]
" - if(species in list("Human", "Drask", "Vox")) - dat += "Skin Tone: [species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]
" + if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE)) + dat += "Skin Tone: [S.bodyflags & HAS_ICON_SKIN_TONE ? "[s_tone]" : "[-s_tone + 35]/220"]
" dat += "Disabilities: \[Set\]
" dat += "Nanotrasen Relation: [nanotrasen_relation]
" dat += "Set Flavor Text
" @@ -302,7 +311,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "

Hair & Accessories

" - 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 += "[ha_style] " dat += "Color [color_square(r_headacc, g_headacc, b_headacc)]
" - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. + if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings. dat += "Head Markings: " dat += "[m_styles["head"]]" dat += "Color [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]
" - 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 += "Body Markings: " dat += "[m_styles["body"]]" dat += "Color [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]
" - if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings. dat += "Tail Markings: " dat += "[m_styles["tail"]]" dat += "Color [color_square(color2R(m_colours["tail"]), color2G(m_colours["tail"]), color2B(m_colours["tail"]))]
" @@ -340,11 +349,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "
" - if(species != "Machine") + if(!(S.flags & ALL_RPARTS)) dat += "Eyes: " dat += "Color [color_square(r_eyes, g_eyes, b_eyes)]
" - 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 += "Body Color: " dat += "Color [color_square(r_skin, g_skin, b_skin)]
" @@ -361,7 +370,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Character Records
" dat += "

Limbs

" - if(species in list("Unathi")) //Species with alt heads. + if(S.bodyflags & HAS_ALT_HEADS) //Species with alt heads. dat += "Alternate Head: " dat += "[alt_head]
" dat += "Limbs and Parts: Adjust
" @@ -412,9 +421,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else dat += "
" dat += "

Clothing

" - dat += "Underwear: [underwear]
" - dat += "Undershirt: [undershirt]
" - dat += "Socks: [socks]
" + if(S.clothing_flags & HAS_UNDERWEAR) + dat += "Underwear: [underwear]
" + if(S.clothing_flags & HAS_UNDERSHIRT) + dat += "Undershirt: [undershirt]
" + if(S.clothing_flags & HAS_SOCKS) + dat += "Socks: [socks]
" dat += "Backpack Type: [backbag]
" dat += "
" @@ -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, "Invalid species, please pick something else.") + 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" diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index 02d246b4f70..579699a9414 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -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]') "} ) diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm index 4506ce50cfb..da19b6a35b2 100644 --- a/code/modules/mob/living/autohiss.dm +++ b/code/modules/mob/living/autohiss.dm @@ -1,29 +1,18 @@ - -#define AUTOHISS_OFF 0 -#define AUTOHISS_BASIC 1 -#define AUTOHISS_FULL 2 - -#define AUTOHISS_NUM 3 - - /mob/living/proc/handle_autohiss(message, datum/language/L) return message // no autohiss at this level /mob/living/carbon/human/handle_autohiss(message, datum/language/L) - if(!client || client.autohiss_mode == AUTOHISS_OFF) // no need to process if there's no client or they have autohiss off + if(!client || client.prefs.autohiss_mode == AUTOHISS_OFF) // no need to process if there's no client or they have autohiss off return message - return species.handle_autohiss(message, L, client.autohiss_mode) - -/client - var/autohiss_mode = AUTOHISS_OFF + return species.handle_autohiss(message, L, client.prefs.autohiss_mode) /client/verb/toggle_autohiss() set name = "Toggle Auto-Accent" set desc = "Toggle automatic accents for your species" set category = "OOC" - autohiss_mode = (autohiss_mode + 1) % AUTOHISS_NUM - switch(autohiss_mode) + prefs.autohiss_mode = (prefs.autohiss_mode + 1) % AUTOHISS_NUM + switch(prefs.autohiss_mode) if(AUTOHISS_OFF) to_chat(src, "Auto-hiss is now OFF.") if(AUTOHISS_BASIC) @@ -31,7 +20,7 @@ if(AUTOHISS_FULL) to_chat(src, "Auto-hiss is now FULL.") else - autohiss_mode = AUTOHISS_OFF + prefs.autohiss_mode = AUTOHISS_OFF to_chat(src, "Auto-hiss is now OFF.") /datum/species diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index c1005f2b932..ff7d2fa22d6 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -899,7 +899,7 @@ oxy_mod = 0 death_message = "gives one shrill beep before falling limp, their monitor flashing blue before completely shutting off..." - flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | RADIMMUNE | ALL_RPARTS| NOTRANSSTING + flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | RADIMMUNE | ALL_RPARTS | NOTRANSSTING clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY dietflags = 0 //IPCs can't eat, so no diet