Shiptest 13 - Modules - Types

code/modules/language/language_holder.dm

Language holders will either exist in an atom/movable or a mind. Creation of language holders happens automatically when they are needed, for example when something tries to speak. Where a mind is available, the mind language holder will be the one "in charge". The mind holder will update its languages based on the atom holder, and will get updated as part of transformations and other events that cause new languages to become available.

Every language holder has three lists of languages (and sources for each of them):

  • understood_languages
  • spoken_languages
  • blocked_languages

Understood languages let you understand them, spoken languages lets you speak them (if your tongue is compatible), and blocked languages will let you do neither no matter what the source of the language is.

Language holders are designed to mostly only ever require the use the helpers in atom/movable to achieve your goals, but it is also possible to work on them directly if needed. Any adding and removing of languages and sources should only happen through the procs, as directly changing these will mess something up somewhere down the line.

All atom movables have the initial_language_holder var which allows you to set the default language holder to create. For example, /datum/language_holder/alien will give you xenocommon and a block for galactic common. Human species also have a default language holder var that will be updated on species change, initial_species_holder.

Key procs