Files
Bubberstation/code/modules/client/preferences/language.dm
nikothedude 49414f7821 Adds a little button to quirks that allows for relatively easy customization (#79251)
## About The Pull Request

Title. Adds a little cog button that expands a popper with a preference
list of relevant preferences.


https://github.com/tgstation/tgstation/assets/59709059/5718ad5d-fadb-489f-9a31-9e7173c6f35a

## Why It's Good For The Game

Customizable quirks are cool. Having a proper framework for customizable
quirks is even cooler. Good UX is even COOLER.
## Changelog
🆑
code: Quirks are now customizable on the quirks page instead of on the
character prefs page
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-11-12 15:11:08 -08:00

33 lines
981 B
Plaintext

/datum/preference/choiced/language
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
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.uncommon_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.uncommon_roundstart_languages)
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