Merge branch 'undump' of git://github.com/eswald/dfhack into develop

develop
Alexander Gavrilov 2014-05-04 18:32:29 +04:00
commit b76ededc1b
4 changed files with 106 additions and 68 deletions

@ -10,6 +10,7 @@ DFHack future
- gui/mod-manager: allows installing/uninstalling mods into df from df/mods directory.
- gui/clone-uniform: duplicates the currently selected uniform in the military screen.
- fix/build-location: partial work-around for bug 5991 (trying to build wall while standing on it)
- undump-buildings: removes dump designation from materials used in buildings.
New commands:
- move the 'grow', 'extirpate' and 'immolate' commands as 'plant' subcommands

@ -543,48 +543,49 @@ access DF memory and allow for easier development of new tools.</p>
<li><a class="reference internal" href="#embark" id="id146">embark</a></li>
<li><a class="reference internal" href="#lever" id="id147">lever</a></li>
<li><a class="reference internal" href="#stripcaged" id="id148">stripcaged</a></li>
<li><a class="reference internal" href="#create-items" id="id149">create-items</a></li>
<li><a class="reference internal" href="#locate-ore" id="id150">locate-ore</a></li>
<li><a class="reference internal" href="#soundsense-season" id="id151">soundsense-season</a></li>
<li><a class="reference internal" href="#multicmd" id="id152">multicmd</a></li>
<li><a class="reference internal" href="#undump-buildings" id="id149">undump-buildings</a></li>
<li><a class="reference internal" href="#create-items" id="id150">create-items</a></li>
<li><a class="reference internal" href="#locate-ore" id="id151">locate-ore</a></li>
<li><a class="reference internal" href="#soundsense-season" id="id152">soundsense-season</a></li>
<li><a class="reference internal" href="#multicmd" id="id153">multicmd</a></li>
</ul>
</li>
<li><a class="reference internal" href="#in-game-interface-tools" id="id153">In-game interface tools</a><ul>
<li><a class="reference internal" href="#dwarf-manipulator" id="id154">Dwarf Manipulator</a></li>
<li><a class="reference internal" href="#search" id="id155">Search</a></li>
<li><a class="reference internal" href="#automaterial" id="id156">AutoMaterial</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id157">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id158">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id159">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id160">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id161">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-clone-uniform" id="id162">gui/clone-uniform</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id163">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id164">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id165">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id166">gui/assign-rack</a></li>
<li><a class="reference internal" href="#gui-advfort" id="id167">gui/advfort</a></li>
<li><a class="reference internal" href="#gui-companion-order" id="id168">gui/companion-order</a></li>
<li><a class="reference internal" href="#gui-gm-editor" id="id169">gui/gm-editor</a></li>
<li><a class="reference internal" href="#gui-mod-manager" id="id170">gui/mod-manager</a></li>
<li><a class="reference internal" href="#in-game-interface-tools" id="id154">In-game interface tools</a><ul>
<li><a class="reference internal" href="#dwarf-manipulator" id="id155">Dwarf Manipulator</a></li>
<li><a class="reference internal" href="#search" id="id156">Search</a></li>
<li><a class="reference internal" href="#automaterial" id="id157">AutoMaterial</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id158">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id159">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id160">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id161">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id162">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-clone-uniform" id="id163">gui/clone-uniform</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id164">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id165">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id166">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id167">gui/assign-rack</a></li>
<li><a class="reference internal" href="#gui-advfort" id="id168">gui/advfort</a></li>
<li><a class="reference internal" href="#gui-companion-order" id="id169">gui/companion-order</a></li>
<li><a class="reference internal" href="#gui-gm-editor" id="id170">gui/gm-editor</a></li>
<li><a class="reference internal" href="#gui-mod-manager" id="id171">gui/mod-manager</a></li>
</ul>
</li>
<li><a class="reference internal" href="#behavior-mods" id="id171">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id172">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id173">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id174">Configuration UI</a></li>
<li><a class="reference internal" href="#behavior-mods" id="id172">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id173">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id174">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id175">Configuration UI</a></li>
</ul>
</li>
<li><a class="reference internal" href="#power-meter" id="id175">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id176">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id177">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id178">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id179">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id180">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id181">Save files</a></li>
<li><a class="reference internal" href="#power-meter" id="id176">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id177">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id178">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id179">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id180">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id181">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id182">Save files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#add-spatter" id="id182">Add Spatter</a></li>
<li><a class="reference internal" href="#add-spatter" id="id183">Add Spatter</a></li>
</ul>
</li>
</ul>
@ -3171,8 +3172,12 @@ alternatively pass cage IDs as arguments:</p>
stripcaged weapons 25321 34228
</pre>
</div>
<div class="section" id="undump-buildings">
<h2><a class="toc-backref" href="#id149">undump-buildings</a></h2>
<p>Undesignates building base materials for dumping.</p>
</div>
<div class="section" id="create-items">
<h2><a class="toc-backref" href="#id149">create-items</a></h2>
<h2><a class="toc-backref" href="#id150">create-items</a></h2>
<p>Spawn arbitrary items under the cursor.</p>
<p>The first argument gives the item category, the second gives the material,
and the optionnal third gives the number of items to create (defaults to 20).</p>
@ -3194,7 +3199,7 @@ create-items bar adamantine
</pre>
</div>
<div class="section" id="locate-ore">
<h2><a class="toc-backref" href="#id150">locate-ore</a></h2>
<h2><a class="toc-backref" href="#id151">locate-ore</a></h2>
<p>Scan the map for metal ores.</p>
<p>Finds and designate for digging one tile of a specific metal ore.
Only works for native metal ores, does not handle reaction stuff (eg STEEL).</p>
@ -3207,7 +3212,7 @@ locate-ore iron</dd>
</dl>
</div>
<div class="section" id="soundsense-season">
<h2><a class="toc-backref" href="#id151">soundsense-season</a></h2>
<h2><a class="toc-backref" href="#id152">soundsense-season</a></h2>
<p>It is a well known issue that Soundsense cannot detect the correct
current season when a savegame is loaded and has to play random
season music until a season switch occurs.</p>
@ -3216,7 +3221,7 @@ to gamelog.txt on every map load to fix this. For best results
call the script from <tt class="docutils literal">dfhack.init</tt>.</p>
</div>
<div class="section" id="multicmd">
<h2><a class="toc-backref" href="#id152">multicmd</a></h2>
<h2><a class="toc-backref" href="#id153">multicmd</a></h2>
<p>Run multiple dfhack commands. The argument is split around the
character ; and all parts are run sequencially as independent
dfhack commands. Useful for hotkeys.</p>
@ -3227,7 +3232,7 @@ dfhack commands. Useful for hotkeys.</p>
</div>
</div>
<div class="section" id="in-game-interface-tools">
<h1><a class="toc-backref" href="#id153">In-game interface tools</a></h1>
<h1><a class="toc-backref" href="#id154">In-game interface tools</a></h1>
<p>These tools work by displaying dialogs or overlays in the game window, and
are mostly implemented by lua scripts.</p>
<div class="note">
@ -3242,7 +3247,7 @@ guideline because it arguably just fixes small usability bugs in the game UI.</p
you must enable the plugins which provide them.</p>
</div>
<div class="section" id="dwarf-manipulator">
<h2><a class="toc-backref" href="#id154">Dwarf Manipulator</a></h2>
<h2><a class="toc-backref" href="#id155">Dwarf Manipulator</a></h2>
<p>Implemented by the 'manipulator' plugin.</p>
<p>To activate, open the unit screen and press 'l'.</p>
<img alt="images/manipulator.png" src="images/manipulator.png" />
@ -3281,7 +3286,7 @@ cursor onto that cell instead of toggling it.</li>
directly to the main dwarf mode screen.</p>
</div>
<div class="section" id="search">
<h2><a class="toc-backref" href="#id155">Search</a></h2>
<h2><a class="toc-backref" href="#id156">Search</a></h2>
<p>Implemented by the 'search' plugin.</p>
<p>The search plugin adds search to the Stocks, Animals, Trading, Stockpile,
Noble (assignment candidates), Military (position candidates), Burrows
@ -3312,7 +3317,7 @@ only fat or tallow by forbidding fats, then searching for fat/tallow, and
using Permit Fats again while the list is filtered.</p>
</div>
<div class="section" id="automaterial">
<h2><a class="toc-backref" href="#id156">AutoMaterial</a></h2>
<h2><a class="toc-backref" href="#id157">AutoMaterial</a></h2>
<p>Implemented by the 'automaterial' plugin.</p>
<p>This makes building constructions (walls, floors, fortifications, etc) a little bit
easier by saving you from having to trawl through long lists of materials each time
@ -3340,7 +3345,7 @@ materials, it returns you back to this screen. If you use this along with severa
enabled materials, you should be able to place complex constructions more conveniently.</p>
</div>
<div class="section" id="gui-liquids">
<h2><a class="toc-backref" href="#id157">gui/liquids</a></h2>
<h2><a class="toc-backref" href="#id158">gui/liquids</a></h2>
<p>To use, bind to a key (the example config uses Alt-L) and activate in the 'k' mode.</p>
<img alt="images/liquids.png" src="images/liquids.png" />
<p>This script is a gui front-end to the liquids plugin and works similar to it,
@ -3360,7 +3365,7 @@ rivers power water wheels even when full and technically not flowing.</p>
<p>After setting up the desired operations using the described keys, use <tt class="docutils literal">Enter</tt> to apply them.</p>
</div>
<div class="section" id="gui-mechanisms">
<h2><a class="toc-backref" href="#id158">gui/mechanisms</a></h2>
<h2><a class="toc-backref" href="#id159">gui/mechanisms</a></h2>
<p>To use, bind to a key (the example config uses Ctrl-M) and activate in the 'q' mode.</p>
<img alt="images/mechanisms.png" src="images/mechanisms.png" />
<p>Lists mechanisms connected to the building, and their links. Navigating the list centers
@ -3370,7 +3375,7 @@ focus on the current one. Shift-Enter has an effect equivalent to pressing Enter
re-entering the mechanisms ui.</p>
</div>
<div class="section" id="gui-rename">
<h2><a class="toc-backref" href="#id159">gui/rename</a></h2>
<h2><a class="toc-backref" href="#id160">gui/rename</a></h2>
<p>Backed by the rename plugin, this script allows entering the desired name
via a simple dialog in the game ui.</p>
<ul>
@ -3393,7 +3398,7 @@ their species string.</p>
unit profession change to Ctrl-Shift-T.</p>
</div>
<div class="section" id="gui-room-list">
<h2><a class="toc-backref" href="#id160">gui/room-list</a></h2>
<h2><a class="toc-backref" href="#id161">gui/room-list</a></h2>
<p>To use, bind to a key (the example config uses Alt-R) and activate in the 'q' mode,
either immediately or after opening the assign owner page.</p>
<img alt="images/room-list.png" src="images/room-list.png" />
@ -3401,7 +3406,7 @@ either immediately or after opening the assign owner page.</p>
list, and allows unassigning them.</p>
</div>
<div class="section" id="gui-choose-weapons">
<h2><a class="toc-backref" href="#id161">gui/choose-weapons</a></h2>
<h2><a class="toc-backref" href="#id162">gui/choose-weapons</a></h2>
<p>Bind to a key (the example config uses Ctrl-W), and activate in the Equip-&gt;View/Customize
page of the military screen.</p>
<p>Depending on the cursor location, it rewrites all 'individual choice weapon' entries
@ -3412,14 +3417,14 @@ only that entry, and does it even if it is not 'individual choice'.</p>
and may lead to inappropriate weapons being selected.</p>
</div>
<div class="section" id="gui-clone-uniform">
<h2><a class="toc-backref" href="#id162">gui/clone-uniform</a></h2>
<h2><a class="toc-backref" href="#id163">gui/clone-uniform</a></h2>
<p>Bind to a key (the example config uses Ctrl-C), and activate in the Uniforms
page of the military screen with the cursor in the leftmost list.</p>
<p>When invoked, the script duplicates the currently selected uniform template,
and selects the newly created copy.</p>
</div>
<div class="section" id="gui-guide-path">
<h2><a class="toc-backref" href="#id163">gui/guide-path</a></h2>
<h2><a class="toc-backref" href="#id164">gui/guide-path</a></h2>
<p>Bind to a key (the example config uses Alt-P), and activate in the Hauling menu with
the cursor over a Guide order.</p>
<img alt="images/guide-path.png" src="images/guide-path.png" />
@ -3427,7 +3432,7 @@ the cursor over a Guide order.</p>
computes it when the order is executed for the first time.</p>
</div>
<div class="section" id="gui-workshop-job">
<h2><a class="toc-backref" href="#id164">gui/workshop-job</a></h2>
<h2><a class="toc-backref" href="#id165">gui/workshop-job</a></h2>
<p>Bind to a key (the example config uses Alt-A), and activate with a job selected in
a workshop in the 'q' mode.</p>
<img alt="images/workshop-job.png" src="images/workshop-job.png" />
@ -3463,7 +3468,7 @@ and then try to change the input item type, now it won't let you select <em>plan
you have to unset the material first.</p>
</div>
<div class="section" id="gui-workflow">
<h2><a class="toc-backref" href="#id165">gui/workflow</a></h2>
<h2><a class="toc-backref" href="#id166">gui/workflow</a></h2>
<p>Bind to a key (the example config uses Alt-W), and activate with a job selected
in a workshop in the 'q' mode.</p>
<img alt="images/workflow.png" src="images/workflow.png" />
@ -3510,7 +3515,7 @@ the current stock value. The bright green dashed line is the target
limit (maximum) and the dark green line is that minus the gap (minimum).</p>
</div>
<div class="section" id="gui-assign-rack">
<h2><a class="toc-backref" href="#id166">gui/assign-rack</a></h2>
<h2><a class="toc-backref" href="#id167">gui/assign-rack</a></h2>
<p>Bind to a key (the example config uses P), and activate when viewing a weapon
rack in the 'q' mode.</p>
<img alt="images/assign-rack.png" src="images/assign-rack.png" />
@ -3534,7 +3539,7 @@ the intended user. In order to aid in the choice, it shows the number
of currently assigned racks for every valid squad.</p>
</div>
<div class="section" id="gui-advfort">
<h2><a class="toc-backref" href="#id167">gui/advfort</a></h2>
<h2><a class="toc-backref" href="#id168">gui/advfort</a></h2>
<p>This script allows to perform jobs in adventure mode. For more complete help
press '?' while script is running. It's most confortable to use this as a
keybinding. (e.g. keybinding set Ctrl-T gui/advfort). Possible arguments:</p>
@ -3553,7 +3558,7 @@ implies -a</li>
</div>
</div>
<div class="section" id="gui-companion-order">
<h2><a class="toc-backref" href="#id168">gui/companion-order</a></h2>
<h2><a class="toc-backref" href="#id169">gui/companion-order</a></h2>
<p>A script to issue orders for companions. Select companions with lower case chars, issue orders with upper
case. Must be in look or talk mode to issue command on tile.</p>
<img alt="images/companion-order.png" src="images/companion-order.png" />
@ -3569,7 +3574,7 @@ case. Must be in look or talk mode to issue command on tile.</p>
</ul>
</div>
<div class="section" id="gui-gm-editor">
<h2><a class="toc-backref" href="#id169">gui/gm-editor</a></h2>
<h2><a class="toc-backref" href="#id170">gui/gm-editor</a></h2>
<p>There are three ways to open this editor:</p>
<ul class="simple">
<li>using gui/gm-editor command/keybinding - opens editor on what is selected
@ -3584,14 +3589,14 @@ the same as version above.</li>
in-game help.</p>
</div>
<div class="section" id="gui-mod-manager">
<h2><a class="toc-backref" href="#id170">gui/mod-manager</a></h2>
<h2><a class="toc-backref" href="#id171">gui/mod-manager</a></h2>
<p>A way to simply install and remove small mods. It looks for specially formated mods in
df subfolder 'mods'. Mods are not included, for example mods see: <a class="reference external" href="https://github.com/warmist/df-mini-mods">github mini mod repository</a></p>
<img alt="images/mod-manager.png" src="images/mod-manager.png" />
</div>
</div>
<div class="section" id="behavior-mods">
<h1><a class="toc-backref" href="#id171">Behavior Mods</a></h1>
<h1><a class="toc-backref" href="#id172">Behavior Mods</a></h1>
<p>These plugins, when activated via configuration UI or by detecting certain
structures in RAWs, modify the game engine behavior concerning the target
objects to add features not otherwise present.</p>
@ -3602,20 +3607,20 @@ technical challenge, and do not represent any long-term plans to produce more
similar modifications of the game.</p>
</div>
<div class="section" id="siege-engine">
<h2><a class="toc-backref" href="#id172">Siege Engine</a></h2>
<h2><a class="toc-backref" href="#id173">Siege Engine</a></h2>
<p>The siege-engine plugin enables siege engines to be linked to stockpiles, and
aimed at an arbitrary rectangular area across Z levels, instead of the original
four directions. Also, catapults can be ordered to load arbitrary objects, not
just stones.</p>
<div class="section" id="rationale">
<h3><a class="toc-backref" href="#id173">Rationale</a></h3>
<h3><a class="toc-backref" href="#id174">Rationale</a></h3>
<p>Siege engines are a very interesting feature, but sadly almost useless in the current state
because they haven't been updated since 2D and can only aim in four directions. This is an
attempt to bring them more up to date until Toady has time to work on it. Actual improvements,
e.g. like making siegers bring their own, are something only Toady can do.</p>
</div>
<div class="section" id="configuration-ui">
<h3><a class="toc-backref" href="#id174">Configuration UI</a></h3>
<h3><a class="toc-backref" href="#id175">Configuration UI</a></h3>
<p>The configuration front-end to the plugin is implemented by the gui/siege-engine
script. Bind it to a key (the example config uses Alt-A) and activate after selecting
a siege engine in 'q' mode.</p>
@ -3638,7 +3643,7 @@ menu.</p>
</div>
</div>
<div class="section" id="power-meter">
<h2><a class="toc-backref" href="#id175">Power Meter</a></h2>
<h2><a class="toc-backref" href="#id176">Power Meter</a></h2>
<p>The power-meter plugin implements a modified pressure plate that detects power being
supplied to gear boxes built in the four adjacent N/S/W/E tiles.</p>
<p>The configuration front-end is implemented by the gui/power-meter script. Bind it to a
@ -3649,11 +3654,11 @@ in the build menu.</p>
configuration page, but configures parameters relevant to the modded power meter building.</p>
</div>
<div class="section" id="steam-engine">
<h2><a class="toc-backref" href="#id176">Steam Engine</a></h2>
<h2><a class="toc-backref" href="#id177">Steam Engine</a></h2>
<p>The steam-engine plugin detects custom workshops with STEAM_ENGINE in
their token, and turns them into real steam engines.</p>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id177">Rationale</a></h3>
<h3><a class="toc-backref" href="#id178">Rationale</a></h3>
<p>The vanilla game contains only water wheels and windmills as sources of
power, but windmills give relatively little power, and water wheels require
flowing water, which must either be a real river and thus immovable and
@ -3664,7 +3669,7 @@ it can be done just by combining existing features of the game engine
in a new way with some glue code and a bit of custom logic.</p>
</div>
<div class="section" id="construction">
<h3><a class="toc-backref" href="#id178">Construction</a></h3>
<h3><a class="toc-backref" href="#id179">Construction</a></h3>
<p>The workshop needs water as its input, which it takes via a
passable floor tile below it, like usual magma workshops do.
The magma version also needs magma.</p>
@ -3688,7 +3693,7 @@ short axles that can be built later than both of the engines.</p>
</div>
</div>
<div class="section" id="operation">
<h3><a class="toc-backref" href="#id179">Operation</a></h3>
<h3><a class="toc-backref" href="#id180">Operation</a></h3>
<p>In order to operate the engine, queue the Stoke Boiler job (optionally
on repeat). A furnace operator will come, possibly bringing a bar of fuel,
and perform it. As a result, a &quot;boiling water&quot; item will appear
@ -3719,7 +3724,7 @@ decrease it by further 4%, and also decrease the whole steam
use rate by 10%.</p>
</div>
<div class="section" id="explosions">
<h3><a class="toc-backref" href="#id180">Explosions</a></h3>
<h3><a class="toc-backref" href="#id181">Explosions</a></h3>
<p>The engine must be constructed using barrel, pipe and piston
from fire-safe, or in the magma version magma-safe metals.</p>
<p>During operation weak parts get gradually worn out, and
@ -3728,7 +3733,7 @@ toppled during operation by a building destroyer, or a
tantruming dwarf.</p>
</div>
<div class="section" id="save-files">
<h3><a class="toc-backref" href="#id181">Save files</a></h3>
<h3><a class="toc-backref" href="#id182">Save files</a></h3>
<p>It should be safe to load and view engine-using fortresses
from a DF version without DFHack installed, except that in such
case the engines won't work. However actually making modifications
@ -3739,7 +3744,7 @@ being generated.</p>
</div>
</div>
<div class="section" id="add-spatter">
<h2><a class="toc-backref" href="#id182">Add Spatter</a></h2>
<h2><a class="toc-backref" href="#id183">Add Spatter</a></h2>
<p>This plugin makes reactions with names starting with <tt class="docutils literal">SPATTER_ADD_</tt>
produce contaminants on the items instead of improvements. The produced
contaminants are immune to being washed away by water or destroyed by

@ -2335,6 +2335,10 @@ alternatively pass cage IDs as arguments::
stripcaged weapons 25321 34228
undump-buildings
================
Undesignates building base materials for dumping.
create-items
============
Spawn arbitrary items under the cursor.

@ -0,0 +1,28 @@
-- Undesignates building base materials for dumping.
function undump_buildings()
local buildings = df.global.world.buildings.all
local undumped = 0
for i = 0, #buildings - 1 do
local building = buildings[i]
-- Zones and stockpiles don't have the contained_items field.
if df.building_actual:is_instance(building) then
local items = building.contained_items
for j = 0, #items - 1 do
local contained = items[j]
if contained.use_mode == 2 and contained.item.flags.dump then
-- print(building, contained.item)
undumped = undumped + 1
contained.item.flags.dump = false
end
end
end
end
if undumped > 0 then
local s = "s"
if undumped == 1 then s = "" end
print("Undumped "..undumped.." item"..s..".")
end
end
undump_buildings()