Expanding language keys and adding mixed-language speech.#5271
Draft
MistakeNot4892 wants to merge 4 commits intoNebulaSS13:devfrom
Draft
Expanding language keys and adding mixed-language speech.#5271MistakeNot4892 wants to merge 4 commits intoNebulaSS13:devfrom
MistakeNot4892 wants to merge 4 commits intoNebulaSS13:devfrom
Conversation
6ea8321 to
1c17b68
Compare
out-of-phaze
requested changes
Jan 14, 2026
code/modules/mob/living/say.dm
Outdated
Comment on lines
8
to
15
| /mob/living/proc/get_default_language() | ||
| /mob/living/get_default_language() | ||
| var/decl/language/lang = GET_DECL(default_language) | ||
| if(istype(lang) && can_speak(lang)) | ||
| return lang | ||
| return get_any_good_language(set_default=TRUE) | ||
|
|
||
| /mob/living/proc/get_any_good_language(set_default=FALSE) | ||
| /mob/living/get_any_good_language(set_default=FALSE) | ||
| . = get_default_language() |
Member
There was a problem hiding this comment.
this results in infinite recursion if default_language is unset.
Contributor
Author
There was a problem hiding this comment.
Awesome, thank you for spotting that.
Contributor
Author
There was a problem hiding this comment.
Added a bool to prevent looping.
1c17b68 to
1fe1556
Compare
1fe1556 to
3b090d3
Compare
Contributor
Author
|
I need to do some more exhaustive testing before merge, but I think this is good for review now. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
This was just supposed to be the keys stuff but I kinda spiralled.
,1is your first known language.,hwill match,human.Why and what will this PR improve
Mixing languages in speech is good fun for RP, and the backend changes have cleaned up, centralized a fair wodge of logic.
TODO
Authorship
Myself.
Changelog
TBD