diff options
| author | Alexander Gavrilov | 2012-04-06 11:21:28 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-06 11:21:28 +0400 |
| commit | 903e9ee716e4f84f692eadcc60190223ace250d8 (patch) | |
| tree | 4a51b2ee286c34ace946862ce91b3081d59e0f53 /Lua API.html | |
| parent | 9eed9f0d246f44a51266a05e0107ea22fea54e73 (diff) | |
| download | dfhack-903e9ee716e4f84f692eadcc60190223ace250d8.tar.gz dfhack-903e9ee716e4f84f692eadcc60190223ace250d8.tar.bz2 dfhack-903e9ee716e4f84f692eadcc60190223ace250d8.tar.xz | |
Export a few more functions to lua.
Diffstat (limited to 'Lua API.html')
| -rw-r--r-- | Lua API.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html index 877bdbd8..ab64eea9 100644 --- a/Lua API.html +++ b/Lua API.html @@ -338,6 +338,7 @@ ul.auto-toc { <li><a class="reference internal" href="#c-function-wrappers" id="id12">C++ function wrappers</a><ul> <li><a class="reference internal" href="#gui-module" id="id13">Gui module</a></li> <li><a class="reference internal" href="#job-module" id="id14">Job module</a></li> +<li><a class="reference internal" href="#units-module" id="id15">Units module</a></li> </ul> </li> </ul> @@ -761,6 +762,11 @@ However, currently every entry has a 180+-byte dead-weight overhead.</p> <div class="section" id="c-function-wrappers"> <h2><a class="toc-backref" href="#id12">C++ function wrappers</a></h2> <p>Thin wrappers around C++ functions, similar to the ones for virtual methods.</p> +<ul> +<li><p class="first"><tt class="docutils literal">dfhack.TranslateName(name,in_english,only_last_name)</tt></p> +<p>Convert a language_name or only the last name part to string.</p> +</li> +</ul> <div class="section" id="gui-module"> <h3><a class="toc-backref" href="#id13">Gui module</a></h3> <ul> @@ -810,6 +816,23 @@ The is_bright boolean actually seems to invert the brightness.</p> </li> </ul> </div> +<div class="section" id="units-module"> +<h3><a class="toc-backref" href="#id15">Units module</a></h3> +<ul> +<li><p class="first"><tt class="docutils literal">dfhack.units.getVisibleName(unit)</tt></p> +<p>Returns the name visible in game, accounting for false identities.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.units.isDead(unit)</tt></p> +<p>The unit is completely dead and passive.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.units.isAlive(unit)</tt></p> +<p>The unit isn't dead or undead.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.units.isSane(unit)</tt></p> +<p>The unit is capable of rational action, i.e. not dead, insane or zombie.</p> +</li> +</ul> +</div> </div> </div> </div> |
