|
|
|
@ -335,6 +335,11 @@ ul.auto-toc {
|
|
|
|
|
</li>
|
|
|
|
|
<li><a class="reference internal" href="#dfhack-utilities" id="id10">DFHack utilities</a><ul>
|
|
|
|
|
<li><a class="reference internal" href="#persistent-configuration-storage" id="id11">Persistent configuration storage</a></li>
|
|
|
|
|
<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>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
@ -753,6 +758,59 @@ and automatically stored in the save game, these save and retrieval
|
|
|
|
|
functions can just copy values in memory without doing any actual I/O.
|
|
|
|
|
However, currently every entry has a 180+-byte dead-weight overhead.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<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>
|
|
|
|
|
<div class="section" id="gui-module">
|
|
|
|
|
<h3><a class="toc-backref" href="#id13">Gui module</a></h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.getSelectedWorkshopJob(silent)</tt></p>
|
|
|
|
|
<p>When a job is selected in <em>'q'</em> mode, returns the job, else
|
|
|
|
|
prints error unless silent and returns <em>nil</em>.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.getSelectedJob(silent)</tt></p>
|
|
|
|
|
<p>Returns the job selected in a workshop or unit/jobs screen.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.getSelectedUnit(silent)</tt></p>
|
|
|
|
|
<p>Returns the unit selected via <em>'v'</em>, <em>'k'</em>, unit/jobs, or
|
|
|
|
|
a full-screen item view of a cage or suchlike.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.getSelectedItem(silent)</tt></p>
|
|
|
|
|
<p>Returns the item selected via <em>'v'</em> ->inventory, <em>'k'</em>, <em>'t'</em>, or
|
|
|
|
|
a full-screen item view of a container. Note that in the
|
|
|
|
|
last case, the highlighted <em>contained item</em> is returned, not
|
|
|
|
|
the container itself.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.showAnnouncement(text,color,is_bright)</tt></p>
|
|
|
|
|
<p>Adds a regular announcement with given text, color, and brightness.
|
|
|
|
|
The is_bright boolean actually seems to invert the brightness.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.gui.showPopupAnnouncement(text,color,is_bright)</tt></p>
|
|
|
|
|
<p>Pops up a titan-style modal announcement window.</p>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="job-module">
|
|
|
|
|
<h3><a class="toc-backref" href="#id14">Job module</a></h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.job.cloneJobStruct(job)</tt></p>
|
|
|
|
|
<p>Creates a deep copy of the given job.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.job.printJobDetails(job)</tt></p>
|
|
|
|
|
<p>Prints info about the job.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.job.getJobHolder(job)</tt></p>
|
|
|
|
|
<p>Returns the building holding the job.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.job.is_equal(job1,job2)</tt></p>
|
|
|
|
|
<p>Compares important fields in the job and nested item structures.</p>
|
|
|
|
|
</li>
|
|
|
|
|
<li><p class="first"><tt class="docutils literal">dfhack.job.is_item_equal(job_item1,job_item2)</tt></p>
|
|
|
|
|
<p>Compares important fields in the job item structures.</p>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|