Skip to content

Conversation

@MistakeNot4892
Copy link
Contributor

@MistakeNot4892 MistakeNot4892 commented Jan 11, 2026

Description of changes

This was just supposed to be the keys stuff but I kinda spiralled.

  • Languages can have keys of any length.
  • Language keys must be text.
  • Language keys in speech must be followed by a space.
  • Using a numerical key for speech will look for that language sequentially in your language list. ie. ,1 is your first known language.
  • Partial keys will use the first matching language in your language list. ,h will match ,human.
  • You can use a language key in the middle of a sentence to switch language.
  • Rewrote holopads to handle message passing in a better/more coherent way with less code.
image

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

  • Rewrite holopads to handle phrases properly. Oh god oh fuck.
  • Sort out why the MC is soft resetting after speech (probably a blocking loop somewhere).
  • Test/debug generally.

Authorship

Myself.

Changelog

TBD

@MistakeNot4892 MistakeNot4892 added the work in progress This PR is under development and shouldn't be merged. label Jan 11, 2026
@MistakeNot4892 MistakeNot4892 force-pushed the tweak/langkeys branch 7 times, most recently from 6ea8321 to 1c17b68 Compare January 12, 2026 05:37
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()
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@MistakeNot4892 MistakeNot4892 added ready for review This PR is ready for review and merge. and removed work in progress This PR is under development and shouldn't be merged. labels Jan 14, 2026
@MistakeNot4892
Copy link
Contributor Author

I need to do some more exhaustive testing before merge, but I think this is good for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR is ready for review and merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants