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 += "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 += " |