Files
Bubberstation/code/datums/quirks/positive_quirks/bilingual.dm
SkyratBot 40617732d9 [MIRROR] Fixes certain quirks being erased by slimeperson cloning. (#28089)
* Fixes certain quirks being erased by slimeperson cloning. (#83793)

## About The Pull Request
Certain quirks like Signer get erased by slimeperson body splitting due
to improper usage of add_unique. This should fix that.
## Why It's Good For The Game
bugs bad
## Changelog
🆑
fix: Fixes certain quirks being erased by slimeperson cloning.
/🆑

* Fixes certain quirks being erased by slimeperson cloning.

---------

Co-authored-by: NewyearnewmeUwu <70115628+NewyearnewmeUwu@users.noreply.github.com>
2024-06-09 20:33:35 +05:30

29 lines
1.5 KiB
Plaintext

/datum/quirk/bilingual
name = "Bilingual"
desc = "Over the years you've picked up an extra language!"
icon = FA_ICON_GLOBE
value = 4
gain_text = span_notice("Some of the words of the people around you certainly aren't common. Good thing you studied for this.")
lose_text = span_notice("You seem to have forgotten your second language.")
medical_record_text = "Patient speaks multiple languages."
mail_goodies = list(/obj/item/taperecorder, /obj/item/clothing/head/frenchberet, /obj/item/clothing/mask/fakemoustache/italian)
/datum/quirk_constant_data/bilingual
associated_typepath = /datum/quirk/bilingual
customization_options = list(/datum/preference/choiced/language)
/datum/quirk/bilingual/add(client/client_source)
var/wanted_language = client_source?.prefs.read_preference(/datum/preference/choiced/language)
var/datum/language/language_type
if(wanted_language == "Random")
language_type = pick(GLOB.uncommon_roundstart_languages)
else
language_type = GLOB.language_types_by_name[wanted_language]
if(quirk_holder.has_language(language_type))
language_type = /datum/language/uncommon
if(quirk_holder.has_language(language_type))
to_chat(quirk_holder, span_boldnotice("You are already familiar with the quirk in your preferences, so you did not learn one."))
return
to_chat(quirk_holder, span_boldnotice("You are already familiar with the quirk in your preferences, so you learned Galactic Uncommon instead."))
quirk_holder.grant_language(language_type, source = LANGUAGE_QUIRK)