summaryrefslogtreecommitdiff
path: root/Lua API.html
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-04-13 16:10:19 +0400
committerAlexander Gavrilov2012-04-13 16:10:19 +0400
commit37cfb1fdcd01e4a7dce1a2b759cc2655bd42cf03 (patch)
tree5ab077f75fe0c8c92f7f527ba709e20dac6e5985 /Lua API.html
parent2d8611a4803edc6bd37030ac303230fee208f718 (diff)
downloaddfhack-37cfb1fdcd01e4a7dce1a2b759cc2655bd42cf03.tar.gz
dfhack-37cfb1fdcd01e4a7dce1a2b759cc2655bd42cf03.tar.bz2
dfhack-37cfb1fdcd01e4a7dce1a2b759cc2655bd42cf03.tar.xz
Add unit position and container api.
Diffstat (limited to 'Lua API.html')
-rw-r--r--Lua API.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lua API.html b/Lua API.html
index 4be1050f..32a3b7f0 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -900,6 +900,12 @@ a lua list containing them.</p>
<div class="section" id="units-module">
<h3><a class="toc-backref" href="#id16">Units module</a></h3>
<ul>
+<li><p class="first"><tt class="docutils literal">dfhack.units.getPosition(unit)</tt></p>
+<p>Returns true <em>x,y,z</em> of the unit; may be not equal to unit.pos if caged.</p>
+</li>
+<li><p class="first"><tt class="docutils literal">dfhack.units.getContainer(unit)</tt></p>
+<p>Returns the container (cage) item or <em>nil</em>.</p>
+</li>
<li><p class="first"><tt class="docutils literal">dfhack.units.setNickname(unit,nick)</tt></p>
<p>Sets the unit's nickname properly.</p>
</li>
@@ -930,7 +936,7 @@ a lua list containing them.</p>
<h3><a class="toc-backref" href="#id17">Items module</a></h3>
<ul>
<li><p class="first"><tt class="docutils literal">dfhack.items.getPosition(item)</tt></p>
-<p>Returns true <em>x,y,z</em> of the item.</p>
+<p>Returns true <em>x,y,z</em> of the item; may be not equal to item.pos if in inventory.</p>
</li>
<li><p class="first"><tt class="docutils literal">dfhack.items.getOwner(item)</tt></p>
<p>Returns the owner unit or <em>nil</em>.</p>