diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index ae0f5201f9..ab1379956d 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -271,6 +271,17 @@ GLOBAL_LIST_INIT(speech_verbs, list("default","says","gibbers", "states", "chitt GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc)) +/proc/get_roundstart_languages() + var/list/languages = subtypesof(/datum/language) + var/list/roundstart_languages = list("None") //default option for the list + for(var/some_language in languages) + var/datum/language/language = some_language + if(initial(language.chooseable_roundstart)) + roundstart_languages[initial(language.name)] = some_language + return roundstart_languages + +GLOBAL_LIST_INIT(roundstart_languages, get_roundstart_languages()) + //locked parts are those that your picked species requires to have //unlocked parts are those that anyone can choose on customisation regardless //parts not in unlocked, but in all, are thus locked diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 9eae46c1f3..01ad5757da 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -166,6 +166,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ) var/custom_speech_verb = "default" //if your say_mod is to be something other than your races var/custom_tongue = "default" //if your tongue is to be something other than your races + var/additional_language = "None" //additional language your character has var/modified_limbs = list() //prosthetic/amputated limbs var/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded @@ -292,10 +293,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Character Settings" dat += "Character Appearance" - dat += "Loadout" + dat += "Character Speech" + dat += "Loadout" dat += "Game Preferences" - dat += "Content Preferences" - dat += "Keybindings" + dat += "Content Preferences" + dat += "Keybindings" if(!path) dat += "
Please create an account to save your preferences
" @@ -494,13 +496,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) else if(use_skintones || mutant_colors) dat += "" - dat += APPEARANCE_CATEGORY_COLUMN - dat += "

Speech preferences

" - dat += "Custom Speech Verb:
" - dat += "[custom_speech_verb]
" - dat += "Custom Tongue:
" - dat += "[custom_tongue]
" - if(HAIR in pref_species.species_traits) dat += APPEARANCE_CATEGORY_COLUMN @@ -641,6 +636,36 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" dat += "" + if(3) + if(path) + var/savefile/S = new /savefile(path) + if(S) + dat += "
" + var/name + var/unspaced_slots = 0 + for(var/i=1, i<=max_save_slots, i++) + unspaced_slots++ + if(unspaced_slots > 4) + dat += "
" + unspaced_slots = 0 + S.cd = "/character[i]" + S["real_name"] >> name + if(!name) + name = "Character[i]" + dat += "[name] " + dat += "
" + + dat += "" + dat += "
" + dat += "

Speech preferences

" + dat += "Custom Speech Verb:
" + dat += "[custom_speech_verb]
" + dat += "Custom Tongue:
" + dat += "[custom_tongue]
" + dat += "Additional Language
" + dat += "[additional_language]
" + dat += "
" + if (1) // Game Preferences dat += "
" dat += "

General Settings

" @@ -795,7 +820,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
" - if(3) + if(4) dat += "" dat += "" dat += "" @@ -873,7 +898,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" dat += "" dat += "
[gear_points] loadout points remaining. \[Clear Loadout\]
You can only choose one item per category, unless it's an item that spawns in your backpack or hands.
[gear.description]
" - if(4) // Content preferences + if(5) // Content preferences dat += "
" dat += "

Fetish content prefs

" dat += "Arousal:[arousable == TRUE ? "Enabled" : "Disabled"]
" @@ -896,7 +921,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Automatic Wagging: [(cit_toggles & NO_AUTO_WAG) ? "Disabled" : "Enabled"]
" dat += "
" dat += "
" - if(5) // Custom keybindings + if(6) // Custom keybindings dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Input"]
" dat += "Keybindings mode controls how the game behaves with tab and map/input focus.
If it is on Hotkeys, the game will always attempt to force you to map focus, meaning keypresses are sent \ directly to the map instead of the input. You will still be able to use the command bar, but you need to tab to do it every time you click on the game map.
\ @@ -2191,11 +2216,17 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/selected_custom_tongue = input(user, "Choose your desired tongue (none means your species tongue)", "Character Preference") as null|anything in GLOB.roundstart_tongues if(selected_custom_tongue) custom_tongue = selected_custom_tongue + if("speech_verb") var/selected_custom_speech_verb = input(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference") as null|anything in GLOB.speech_verbs if(selected_custom_speech_verb) custom_speech_verb = selected_custom_speech_verb + if("language") + var/selected_language = input(user, "Choose your desired additional language", "Character Preference") as null|anything in GLOB.roundstart_languages + if(selected_language) + additional_language = selected_language + if("bodysprite") var/selected_body_sprite = input(user, "Choose your desired body sprite", "Character Preference") as null|anything in pref_species.allowed_limb_ids if(selected_body_sprite) @@ -2636,6 +2667,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) new_custom_tongue.Insert(character) if(custom_speech_verb != "default") character.dna.species.say_mod = custom_speech_verb + if(additional_language && additional_language != "None") + var/language_entry = GLOB.roundstart_languages[additional_language] + if(language_entry) + character.grant_language(language_entry, TRUE, TRUE) //limb stuff, only done when initially spawning in if(initial_spawn) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index fb1178fd8e..4ab81555e4 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -526,6 +526,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["uplink_loc"] >> uplink_spawn_loc S["custom_speech_verb"] >> custom_speech_verb S["custom_tongue"] >> custom_tongue + S["additional_language"] >> additional_language S["feature_mcolor"] >> features["mcolor"] S["feature_lizard_tail"] >> features["tail_lizard"] S["feature_lizard_snout"] >> features["snout"] @@ -764,6 +765,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car custom_speech_verb = sanitize_inlist(custom_speech_verb, GLOB.speech_verbs, "default") custom_tongue = sanitize_inlist(custom_tongue, GLOB.roundstart_tongues, "default") + additional_language = sanitize_inlist(additional_language, GLOB.roundstart_languages, "None") security_records = copytext(security_records, 1, MAX_FLAVOR_LEN) medical_records = copytext(medical_records, 1, MAX_FLAVOR_LEN) @@ -840,6 +842,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["species"] , pref_species.id) WRITE_FILE(S["custom_speech_verb"] , custom_speech_verb) WRITE_FILE(S["custom_tongue"] , custom_tongue) + WRITE_FILE(S["additional_language"] , additional_language) // records WRITE_FILE(S["security_records"] , security_records) diff --git a/code/modules/language/draconic.dm b/code/modules/language/draconic.dm index aaa998c2c0..ed72252773 100644 --- a/code/modules/language/draconic.dm +++ b/code/modules/language/draconic.dm @@ -18,3 +18,4 @@ ) icon_state = "lizard" default_priority = 90 + chooseable_roundstart = TRUE diff --git a/code/modules/language/dwarven.dm b/code/modules/language/dwarven.dm index fe2df478f9..aded22cd6f 100644 --- a/code/modules/language/dwarven.dm +++ b/code/modules/language/dwarven.dm @@ -10,4 +10,5 @@ syllables = list("kulet", "alak", "bidok", "nicol", "anam", "gatal", "mabdug", "zustash", "sedil", "ustos", "emr", "izeg", "beming", "gost", "ntak", "tosid", "feb", "berim", "ibruk", "ermis", "thoth", "thatthil", "gistang", "libash", "lakish", "asdos", "roder", "nel", "biban", "ugog", "ish", "robek", "olmul", "nokzam", "emuth", "fer", "uvel", "dolush", "ag^k", "ucat", "ng rak", "enir", "ugath", "lisig", "etg", "erong", "osed", "lanlar", "udir", "tarmid", "s krith", "nural", "bugsud", "okag", "nazush", "nashon", "ftrid", "en''r", "dstik", "kogan", "ingish", "dudgoth", "stalk*b", "themor", "murak", "altth", "osod", "thcekut", "cog", "selsten", "egdoth", "othsin", "idek", "st", "suthmam", "im", "okab", "onlnl", "gasol", "tegir", "nam...sh", "noval", "shalig", "shin", "lek", ",,kim", "kfkdal", "stum,,m", "alud", "olom", "%lot", "rozsed", "thos", "okon", "n