summaryrefslogtreecommitdiff
path: root/Lua API.html
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-20 21:57:45 +0400
committerAlexander Gavrilov2012-05-20 21:57:45 +0400
commitb992b04f0bb7ffef8e7fb152967d438f398543d7 (patch)
tree0b6dd0e193642d95df53ffb05f7fe9c3a63d0595 /Lua API.html
parentd28d240dbdce9ef38081826c76dad4268259a380 (diff)
downloaddfhack-b992b04f0bb7ffef8e7fb152967d438f398543d7.tar.gz
dfhack-b992b04f0bb7ffef8e7fb152967d438f398543d7.tar.bz2
dfhack-b992b04f0bb7ffef8e7fb152967d438f398543d7.tar.xz
Remove stuff that shouldn't be in the core, and expose to lua what's left.
Specifically, any "if (verbose) { Core::printerr("blah") }" kind of stuff definitely doesn't belong in the common API functions. Also, ref->getUnit() is very expensive. On the other hand, checks for crash-inducing conflicts with the ui should be in the core api, and not in client plugins.
Diffstat (limited to 'Lua API.html')
-rw-r--r--Lua API.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html
index e2d4ec23..4b763af2 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -991,6 +991,10 @@ or raws. The <tt class="docutils literal">ignore_noble</tt> boolean disables the
<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, or <em>nil</em> if invalid; may be not equal to item.pos if in inventory.</p>
</li>
+<li><p class="first"><tt class="docutils literal">dfhack.items.getDescription(item, type[, decorate])</tt></p>
+<p>Returns the string description of the item, as produced by the getItemDescription
+method. If decorate is true, also adds markings for quality and improvements.</p>
+</li>
<li><p class="first"><tt class="docutils literal">dfhack.items.getGeneralRef(item, type)</tt></p>
<p>Searches for a general_ref with the given type.</p>
</li>
@@ -1016,6 +1020,12 @@ Returns <em>false</em> in case of error.</p>
<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>
+<li><p class="first"><tt class="docutils literal">dfhack.items.moveToBuilding(item,building,use_mode)</tt></p>
+<p>Move the item to the building. Returns <em>false</em> if impossible.</p>
+</li>
+<li><p class="first"><tt class="docutils literal">dfhack.items.moveToInventory(item,unit,use_mode,body_part)</tt></p>
+<p>Move the item to the unit inventory. Returns <em>false</em> if impossible.</p>
+</li>
</ul>
</div>
<div class="section" id="maps-module">