diff options
| author | Alexander Gavrilov | 2012-04-12 18:37:27 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-12 18:37:27 +0400 |
| commit | 2d8611a4803edc6bd37030ac303230fee208f718 (patch) | |
| tree | 6036150d3662a11b02dcd7441c8e55c7f7e0bcac /Lua API.html | |
| parent | 38a8c43a25221fdd0dfb21da297cb4c87621d21c (diff) | |
| download | dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.gz dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.bz2 dfhack-2d8611a4803edc6bd37030ac303230fee208f718.tar.xz | |
Add core api for moving items between ground and containers.
Diffstat (limited to 'Lua API.html')
| -rw-r--r-- | Lua API.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html index 7c3eeddb..4be1050f 100644 --- a/Lua API.html +++ b/Lua API.html @@ -929,6 +929,9 @@ a lua list containing them.</p> <div class="section" id="items-module"> <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> +</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> </li> @@ -936,6 +939,18 @@ a lua list containing them.</p> <p>Replaces the owner of the item. If unit is <em>nil</em>, removes ownership. Returns <em>false</em> in case of error.</p> </li> +<li><p class="first"><tt class="docutils literal">dfhack.items.getContainer(item)</tt></p> +<p>Returns the container item or <em>nil</em>.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.items.getContainedItems(item)</tt></p> +<p>Returns a list of items contained in this one.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.items.moveToGround(item,pos)</tt></p> +<p>Move the item to the ground at position. Returns <em>false</em> if impossible.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.items.moveToContainer(item,container)</tt></p> +<p>Move the item to the container. Returns <em>false</em> if impossible.</p> +</li> </ul> </div> <div class="section" id="maps-module"> |
