-
Notifications
You must be signed in to change notification settings - Fork 247
Expanding language keys and adding mixed-language speech. #5271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
6ea8321 to
1c17b68
Compare
code/modules/mob/living/say.dm
Outdated
| /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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this results in infinite recursion if default_language is unset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for spotting that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bool to prevent looping.
1c17b68 to
1fe1556
Compare
1fe1556 to
3b090d3
Compare
|
I need to do some more exhaustive testing before merge, but I think this is good for review now. |
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