Files
Bubberstation/code/modules/client/preferences/language.dm
SkyratBot ae36263265 [MIRROR] Bilingual can now choose their language [MDB IGNORE] (#22296)
* Bilingual can now choose their language

* Fix a merge error, removes a skyrat edit in favor of modular override

* uh what

* Moves the setup of GLOB.all_languages back into the subsystem + makes it load before SSAssets

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
2023-07-13 14:26:00 -04:00

35 lines
1.0 KiB
Plaintext

/datum/preference/choiced/language
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
savefile_key = "language"
savefile_identifier = PREFERENCE_CHARACTER
/datum/preference/choiced/language/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return "Bilingual" in preferences.all_quirks
/datum/preference/choiced/language/init_possible_values()
var/list/values = list()
if(!GLOB.roundstart_languages.len)
generate_selectable_species_and_languages()
values += "Random"
//we add uncommon as it's foreigner-only.
var/datum/language/uncommon/uncommon_language = /datum/language/uncommon
values += initial(uncommon_language.name)
for(var/datum/language/language_type as anything in GLOB.roundstart_languages)
if(ispath(language_type, /datum/language/common))
continue
if(initial(language_type.name) in values)
continue
values += initial(language_type.name)
return values
/datum/preference/choiced/language/apply_to_human(mob/living/carbon/human/target, value)
return