forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bilingual can now choose their language (tgstation#76609)
## About The Pull Request This was one of the tradeoffs for removing other, more consistent sources of languages, and was requested by Melbert among many others. This does go against my wanted goal of decreasing the risk of eavesdropping by other players through just magically knowing a language, but it is an expensive quirk and it is in their medical records, which makes it better than language encryption keys or silicon just innately knowing them. This also limits Bilingual to only roundstart languages (+Uncommon), rather than being randomly selected from a list (that had very useless ones like monkey, podpeople, and beachbum). This is mostly just for modularity, I didn't want to make it look terrible code-wise and thought this may be the optimal way to handle it. This is also me going back on tgstation#71773 - which I had closed myself. ## Why It's Good For The Game If we're gonna keep the Bilingual quirk, it might as well be something players can choose the language of, it's their character and they should be allowed to decide how their character is, and it is my fault that this stupid compromise of "getting a random language" was made in the first place. It never should've happened. It now actually limits it to roundstart-only languages, so there's no way you can spy on people who prepare in advance through becoming podpeople, or monkeys, etc. ## Changelog :cl: balance: Bilingual quirk now lets you choose your language between ones given to roundstart species. balance: Foreigner and Bilingual are now mutually exclusive languages. /:cl:
- Loading branch information
1 parent
4c99fb2
commit a2c8cce
Showing
8 changed files
with
71 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...s/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/language.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { FeatureChoiced, FeatureDropdownInput } from '../base'; | ||
|
||
export const language: FeatureChoiced = { | ||
name: 'Language', | ||
component: FeatureDropdownInput, | ||
}; |