summaryrefslogtreecommitdiff
path: root/Lua API.html
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-08-24 18:26:18 +0400
committerAlexander Gavrilov2012-08-24 18:26:18 +0400
commit8359e80b233675ee347ff1ac8ec7d37430d52a7a (patch)
treec9d6876ef0fb50ffd3e27d793ac505d63f401ed9 /Lua API.html
parentd52c54cc762e4f525b4d1f3c339e9cf5a1230ee7 (diff)
downloaddfhack-8359e80b233675ee347ff1ac8ec7d37430d52a7a.tar.gz
dfhack-8359e80b233675ee347ff1ac8ec7d37430d52a7a.tar.bz2
dfhack-8359e80b233675ee347ff1ac8ec7d37430d52a7a.tar.xz
Expose a few API functions to lua, and implement a room browser overlay.
Diffstat (limited to 'Lua API.html')
-rw-r--r--Lua API.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html
index 15f1d89c..b9f09cf9 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -1113,6 +1113,13 @@ or raws. The <tt class="docutils literal">ignore_noble</tt> boolean disables the
<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.units.getCasteProfessionName(race,caste,prof_id[,plural])</span></tt></p>
<p>Retrieves the profession name for the given race/caste using raws.</p>
</li>
+<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.units.getProfessionColor(unit[,ignore_noble])</span></tt></p>
+<p>Retrieves the color associated with the profession, using noble assignments
+or raws. The <tt class="docutils literal">ignore_noble</tt> boolean disables the use of noble positions.</p>
+</li>
+<li><p class="first"><tt class="docutils literal">dfhack.units.getCasteProfessionColor(race,caste,prof_id)</tt></p>
+<p>Retrieves the profession color for the given race/caste using raws.</p>
+</li>
</ul>
</div>
<div class="section" id="items-module">
@@ -1237,6 +1244,10 @@ burrows, or the presence of invaders.</p>
<div class="section" id="buildings-module">
<h3><a class="toc-backref" href="#id24">Buildings module</a></h3>
<ul>
+<li><p class="first"><tt class="docutils literal">dfhack.buildings.setOwner(item,unit)</tt></p>
+<p>Replaces the owner of the building. 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.buildings.getSize(building)</tt></p>
<p>Returns <em>width, height, centerx, centery</em>.</p>
</li>