@ -1163,6 +1163,69 @@ Returns <em>true</em> if the building was destroyed and deallocated immediately.
</ul>
</ul>
<p>More high-level functions are implemented in lua and can be loaded by
<p>More high-level functions are implemented in lua and can be loaded by
<ttclass="docutils literal"><spanclass="pre">require('dfhack.buildings')</span></tt>. See <ttclass="docutils literal">hack/lua/dfhack/buildings.lua</tt>.</p>
<ttclass="docutils literal"><spanclass="pre">require('dfhack.buildings')</span></tt>. See <ttclass="docutils literal">hack/lua/dfhack/buildings.lua</tt>.</p>
<p>Returns a sequence of lua structures, describing input item filters
suitable for the specified building type, or <em>nil</em> if unknown or invalid.
The returned sequence is suitable for use as the <ttclass="docutils literal">job_items</tt> argument
of <ttclass="docutils literal">constructWithFilters</tt>.
Uses tables defined in <ttclass="docutils literal">buildings.lua</tt>.</p>
<p>Argtable members <ttclass="docutils literal">material</tt> (the default name), <ttclass="docutils literal">bucket</tt>, <ttclass="docutils literal">barrel</tt>,
<ttclass="docutils literal">chain</tt>, <ttclass="docutils literal">mechanism</tt>, <ttclass="docutils literal">screw</tt>, <ttclass="docutils literal">pipe</tt>, <ttclass="docutils literal">anvil</tt>, <ttclass="docutils literal">weapon</tt> are used to
augment the basic attributes with more detailed information if the
building has input items with the matching name (see the tables for naming details).
Note that it is impossible to <em>override</em> any properties this way, only supply those that
are not mentioned otherwise; one exception is that flags2.non_economic
is automatically cleared if an explicit material is specified.</p>
<p>Creates a building in one call, using options contained
in the argument table. Returns the building, or <em>nil, error</em>.</p>
<p><strong>NOTE:</strong> Despite the name, unless the building is abstract,
the function creates it in an 'unconstructed' stage, with
a queued in-game job that will actually construct it. I.e.
the function replicates programmatically what can be done
through the construct building menu in the game ui, except
that it does less environment constraint checking.</p>
<p>The following options can be used:</p>
<ul>
<li><pclass="first"><ttclass="docutils literal">pos = coordinates</tt>, or <ttclass="docutils literal">x = <spanclass="pre">...,</span> y = <spanclass="pre">...,</span> z = ...</tt></p>
<p>Mandatory. Specifies the left upper corner of the building.</p>