mirror of
https://github.com/evilew/GS13-Citadel.git
synced 2026-08-25 06:07:36 +01:00
34 lines
3.4 KiB
HTML
34 lines
3.4 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../../"><link rel="stylesheet" href="dmdoc.css"><title>code/modules/language/language_holder.dm - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a></header><main><h1>code/modules/language/language_holder.dm <a href="https://github.com/evilew/GS13-Citadel/blob/26e2b96b19428762e9aa55b5eca88d72c6c6b7ed/code/modules/language/language_holder.dm0"><img src="git.png" width="16" height="16" title="code/modules/language/language_holder.dm0"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><p>Language holders will either exist in an atom/movable. 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.</p>
|
|
<p>Every language holder has three lists of languages (and sources for each of them):</p>
|
|
<ul>
|
|
<li>understood_languages</li>
|
|
<li>spoken_languages</li>
|
|
<li>blocked_languages</li>
|
|
</ul>
|
|
<p>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.</p>
|
|
<p>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.</p>
|
|
<p>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.</p>
|
|
<p>Key procs</p>
|
|
<ul>
|
|
<li><a href="atom/movable.html#proc/grant_language">grant_language</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_language">remove_language</a></li>
|
|
<li><a href="atom/movable.html#proc/add_blocked_language">add_blocked_language</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_blocked_language">remove_blocked_language</a></li>
|
|
<li><a href="atom/movable.html#proc/grant_all_languages">grant_all_languages</a></li>
|
|
<li><a href="atom/movable.html#proc/remove_all_languages">remove_all_languages</a></li>
|
|
<li><a href="atom/movable.html#proc/has_language">has_language</a></li>
|
|
<li><a href="atom/movable.html#proc/can_speak_language">can_speak_language</a></li>
|
|
<li><a href="atom/movable.html#proc/get_selected_language">get_selected_language</a></li>
|
|
</ul></td></tr><tr><th>/proc/<a href="global.html#proc/init_language_holder_prototypes">init_language_holder_prototypes</a></th><td>Inits the global list of language holder prototypes.</td></tr></table></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/26e2b96b19428762e9aa55b5eca88d72c6c6b7ed">26e2b96</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |