Add docs for the automaterial plugin, and use the new Painter class.

develop
Alexander Gavrilov 2012-11-22 19:38:45 +04:00
parent 2794143f77
commit e7905a5cff
7 changed files with 147 additions and 91 deletions

@ -47,6 +47,9 @@ DFHack future
properly designated barracks be used again for storage of squad equipment.
New Search plugin by falconne:
Adds an incremental search function to the Stocks, Trading and Unit List screens.
New AutoMaterial plugin by falconne:
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 you place one.
Dfusion plugin:
Reworked to make use of lua modules, now all the scripts can be used from other scripts.

@ -508,33 +508,34 @@ access DF memory and allow for easier development of new tools.</p>
<li><a class="reference internal" href="#in-game-interface-tools" id="id131">In-game interface tools</a><ul>
<li><a class="reference internal" href="#dwarf-manipulator" id="id132">Dwarf Manipulator</a></li>
<li><a class="reference internal" href="#search" id="id133">Search</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id134">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id135">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id136">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id137">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id138">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id139">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id140">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id141">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id142">gui/assign-rack</a></li>
<li><a class="reference internal" href="#automaterial" id="id134">AutoMaterial</a></li>
<li><a class="reference internal" href="#gui-liquids" id="id135">gui/liquids</a></li>
<li><a class="reference internal" href="#gui-mechanisms" id="id136">gui/mechanisms</a></li>
<li><a class="reference internal" href="#gui-rename" id="id137">gui/rename</a></li>
<li><a class="reference internal" href="#gui-room-list" id="id138">gui/room-list</a></li>
<li><a class="reference internal" href="#gui-choose-weapons" id="id139">gui/choose-weapons</a></li>
<li><a class="reference internal" href="#gui-guide-path" id="id140">gui/guide-path</a></li>
<li><a class="reference internal" href="#gui-workshop-job" id="id141">gui/workshop-job</a></li>
<li><a class="reference internal" href="#gui-workflow" id="id142">gui/workflow</a></li>
<li><a class="reference internal" href="#gui-assign-rack" id="id143">gui/assign-rack</a></li>
</ul>
</li>
<li><a class="reference internal" href="#behavior-mods" id="id143">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id144">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id145">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id146">Configuration UI</a></li>
<li><a class="reference internal" href="#behavior-mods" id="id144">Behavior Mods</a><ul>
<li><a class="reference internal" href="#siege-engine" id="id145">Siege Engine</a><ul>
<li><a class="reference internal" href="#rationale" id="id146">Rationale</a></li>
<li><a class="reference internal" href="#configuration-ui" id="id147">Configuration UI</a></li>
</ul>
</li>
<li><a class="reference internal" href="#power-meter" id="id147">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id148">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id149">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id150">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id151">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id152">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id153">Save files</a></li>
<li><a class="reference internal" href="#power-meter" id="id148">Power Meter</a></li>
<li><a class="reference internal" href="#steam-engine" id="id149">Steam Engine</a><ul>
<li><a class="reference internal" href="#id1" id="id150">Rationale</a></li>
<li><a class="reference internal" href="#construction" id="id151">Construction</a></li>
<li><a class="reference internal" href="#operation" id="id152">Operation</a></li>
<li><a class="reference internal" href="#explosions" id="id153">Explosions</a></li>
<li><a class="reference internal" href="#save-files" id="id154">Save files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#add-spatter" id="id154">Add Spatter</a></li>
<li><a class="reference internal" href="#add-spatter" id="id155">Add Spatter</a></li>
</ul>
</li>
</ul>
@ -1887,7 +1888,14 @@ screen from constantly resetting to the top.</p>
<tr class="field"><th class="field-name" colspan="2">military-color-assigned:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first">Color squad candidates already assigned to other squads in yellow/green
to make them stand out more in the list.</p>
<img alt="images/tweak-mil-color.png" class="last" src="images/tweak-mil-color.png" />
<img alt="images/tweak-mil-color.png" src="images/tweak-mil-color.png" />
</td>
</tr>
<tr class="field"><th class="field-name" colspan="2">military-training:</th></tr>
<tr class="field"><td>&nbsp;</td><td class="field-body"><p class="first last">Speeds up melee squad training by removing an almost certainly
unintended inverse dependency of training speed on unit count
(i.e. the more units you have, the slower it becomes), and making
the units spar more.</p>
</td>
</tr>
</tbody>
@ -2776,6 +2784,8 @@ are mostly implemented by lua scripts.</p>
<p class="first admonition-title">Note</p>
<p>In order to avoid user confusion, as a matter of policy all these tools
display the word &quot;DFHack&quot; on the screen somewhere while active.</p>
<p>When that is not appropriate because they merely add keybinding hints to
existing DF screens, they deliberately use red instead of green for the key.</p>
<p class="last">As an exception, the tweak plugin described above does not follow this
guideline because it arguably just fixes small usability bugs in the game UI.</p>
</div>
@ -2836,15 +2846,42 @@ are actually visible in the list; the same effect applies to the Trade
Value numbers displayed by the screen. Because of this, pressing the 't'
key while search is active clears the search instead of executing the trade.</p>
</div>
<div class="section" id="automaterial">
<h2><a class="toc-backref" href="#id134">AutoMaterial</a></h2>
<p>The automaterial plugin 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 you place one.</p>
<p>Firstly, it moves the last used material for a given construction type to the top of
the list, if there are any left. So if you build a wall with chalk blocks, the next
time you place a wall the chalk blocks will be at the top of the list, regardless of
distance (it only does this in &quot;grouped&quot; mode, as individual item lists could be huge).
This should mean you can place most constructions without having to search for your
preferred material type.</p>
<img alt="images/automaterial-mat.png" src="images/automaterial-mat.png" />
<p>Pressing 'a' while highlighting any material will enable that material for &quot;auto select&quot;
for this construction type. You can enable multiple materials as autoselect. Now the next
time you place this type of construction, the plugin will automatically choose materials
for you from the kinds you enabled. If there is enough to satisfy the whole placement,
you won't be prompted with the material screen - the construction will be placed and you
will be back in the construction menu as if you did it manually.</p>
<p>When choosing the construction placement, you will see a couple of options:</p>
<img alt="images/automaterial-pos.png" src="images/automaterial-pos.png" />
<p>Use 'a' here to temporarily disable the material autoselection, e.g. if you need
to go to the material selection screen so you can toggle some materials on or off.</p>
<p>The other option (auto type selection, off by default) can be toggled on with 't'. If you
toggle this option on, instead of returning you to the main construction menu after selecting
materials, it returns you back to this screen. If you use this along with several autoselect
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="#id134">gui/liquids</a></h2>
<h2><a class="toc-backref" href="#id135">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>While active, use the suggested keys to switch the usual liquids parameters, and Enter
to select the target area and apply changes.</p>
</div>
<div class="section" id="gui-mechanisms">
<h2><a class="toc-backref" href="#id135">gui/mechanisms</a></h2>
<h2><a class="toc-backref" href="#id136">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
@ -2854,7 +2891,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="#id136">gui/rename</a></h2>
<h2><a class="toc-backref" href="#id137">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>
@ -2877,7 +2914,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="#id137">gui/room-list</a></h2>
<h2><a class="toc-backref" href="#id138">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" />
@ -2885,7 +2922,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="#id138">gui/choose-weapons</a></h2>
<h2><a class="toc-backref" href="#id139">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
@ -2896,7 +2933,7 @@ 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-guide-path">
<h2><a class="toc-backref" href="#id139">gui/guide-path</a></h2>
<h2><a class="toc-backref" href="#id140">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" />
@ -2904,7 +2941,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="#id140">gui/workshop-job</a></h2>
<h2><a class="toc-backref" href="#id141">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" />
@ -2940,7 +2977,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="#id141">gui/workflow</a></h2>
<h2><a class="toc-backref" href="#id142">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" />
@ -2970,7 +3007,7 @@ suit your need, and set the item count range.</p>
<p>If you don't need advanced settings, you can just press 'y' to confirm creation.</p>
</div>
<div class="section" id="gui-assign-rack">
<h2><a class="toc-backref" href="#id142">gui/assign-rack</a></h2>
<h2><a class="toc-backref" href="#id143">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" />
@ -2995,7 +3032,7 @@ of currently assigned racks for every valid squad.</p>
</div>
</div>
<div class="section" id="behavior-mods">
<h1><a class="toc-backref" href="#id143">Behavior Mods</a></h1>
<h1><a class="toc-backref" href="#id144">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>
@ -3006,20 +3043,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="#id144">Siege Engine</a></h2>
<h2><a class="toc-backref" href="#id145">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="#id145">Rationale</a></h3>
<h3><a class="toc-backref" href="#id146">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="#id146">Configuration UI</a></h3>
<h3><a class="toc-backref" href="#id147">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>
@ -3042,7 +3079,7 @@ menu.</p>
</div>
</div>
<div class="section" id="power-meter">
<h2><a class="toc-backref" href="#id147">Power Meter</a></h2>
<h2><a class="toc-backref" href="#id148">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
@ -3053,11 +3090,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="#id148">Steam Engine</a></h2>
<h2><a class="toc-backref" href="#id149">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="#id149">Rationale</a></h3>
<h3><a class="toc-backref" href="#id150">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
@ -3068,7 +3105,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="#id150">Construction</a></h3>
<h3><a class="toc-backref" href="#id151">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>
@ -3092,7 +3129,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="#id151">Operation</a></h3>
<h3><a class="toc-backref" href="#id152">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
@ -3123,7 +3160,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="#id152">Explosions</a></h3>
<h3><a class="toc-backref" href="#id153">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
@ -3132,7 +3169,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="#id153">Save files</a></h3>
<h3><a class="toc-backref" href="#id154">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
@ -3143,7 +3180,7 @@ being generated.</p>
</div>
</div>
<div class="section" id="add-spatter">
<h2><a class="toc-backref" href="#id154">Add Spatter</a></h2>
<h2><a class="toc-backref" href="#id155">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

@ -1968,6 +1968,9 @@ are mostly implemented by lua scripts.
In order to avoid user confusion, as a matter of policy all these tools
display the word "DFHack" on the screen somewhere while active.
When that is not appropriate because they merely add keybinding hints to
existing DF screens, they deliberately use red instead of green for the key.
As an exception, the tweak plugin described above does not follow this
guideline because it arguably just fixes small usability bugs in the game UI.
@ -2046,6 +2049,42 @@ Value numbers displayed by the screen. Because of this, pressing the 't'
key while search is active clears the search instead of executing the trade.
AutoMaterial
============
The automaterial plugin 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 you place one.
Firstly, it moves the last used material for a given construction type to the top of
the list, if there are any left. So if you build a wall with chalk blocks, the next
time you place a wall the chalk blocks will be at the top of the list, regardless of
distance (it only does this in "grouped" mode, as individual item lists could be huge).
This should mean you can place most constructions without having to search for your
preferred material type.
.. image:: images/automaterial-mat.png
Pressing 'a' while highlighting any material will enable that material for "auto select"
for this construction type. You can enable multiple materials as autoselect. Now the next
time you place this type of construction, the plugin will automatically choose materials
for you from the kinds you enabled. If there is enough to satisfy the whole placement,
you won't be prompted with the material screen - the construction will be placed and you
will be back in the construction menu as if you did it manually.
When choosing the construction placement, you will see a couple of options:
.. image:: images/automaterial-pos.png
Use 'a' here to temporarily disable the material autoselection, e.g. if you need
to go to the material selection screen so you can toggle some materials on or off.
The other option (auto type selection, off by default) can be toggled on with 't'. If you
toggle this option on, instead of returning you to the main construction menu after selecting
materials, it returns you back to this screen. If you use this along with several autoselect
enabled materials, you should be able to place complex constructions more conveniently.
gui/liquids
===========

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -28,7 +28,9 @@ distribution.
#include "BitArray.h"
#include "ColorText.h"
#include "Types.h"
#include <string>
#include <set>
#include "DataDefs.h"
#include "df/graphic.h"
@ -51,6 +53,8 @@ namespace DFHack
{
class Core;
typedef std::set<df::interface_key> interface_key_set;
/**
* The Screen module
* \ingroup grp_modules

@ -74,28 +74,6 @@ DFhackCExport command_result plugin_shutdown ( color_ostream &out )
return CR_OK;
}
void OutputString(int8_t color, int &x, int &y, const std::string &text, bool newline = false, int left_margin = 0)
{
Screen::paintString(Screen::Pen(' ', color, 0), x, y, text);
if (newline)
{
++y;
x = left_margin;
}
else
x += text.length();
}
void OutputHotkeyString(int &x, int &y, const char *text, const char *hotkey, bool newline = false, int left_margin = 0, int8_t color = COLOR_WHITE)
{
OutputString(10, x, y, hotkey);
string display(": ");
display.append(text);
OutputString(color, x, y, display, newline, left_margin);
}
static inline bool in_material_choice_stage()
{
return Gui::build_selector_hotkey(Core::getTopViewscreen()) &&
@ -137,7 +115,7 @@ static inline MaterialDescriptor &get_last_used_material()
return last_used_material[ui_build_selector->building_subtype];
}
static void set_last_used_material(MaterialDescriptor &matetial)
static void set_last_used_material(const MaterialDescriptor &matetial)
{
last_used_material[ui_build_selector->building_subtype] = matetial;
}
@ -150,7 +128,7 @@ static MaterialDescriptor &get_last_moved_material()
return last_moved_material[ui_build_selector->building_subtype];
}
static void set_last_moved_material(MaterialDescriptor &matetial)
static void set_last_moved_material(const MaterialDescriptor &matetial)
{
last_moved_material[ui_build_selector->building_subtype] = matetial;
}
@ -306,9 +284,9 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
!in_material_choice_stage() &&
hotkeys.find(last_used_constr_subtype) != hotkeys.end())
{
input->clear();
input->insert(hotkeys[last_used_constr_subtype]);
this->feed(input);
interface_key_set keys;
keys.insert(hotkeys[last_used_constr_subtype]);
INTERPOSE_NEXT(feed)(&keys);
}
}
@ -349,47 +327,42 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
MaterialDescriptor material = get_material_in_list(ui_build_selector->sel_index);
if (material.valid)
{
int left_margin = gps->dimx - 30;
int x = left_margin;
int y = 25;
string toggle_string = "Enable";
string title = "Disabled";
if (check_autoselect(material, false))
{
toggle_string = "Disable";
title = "Enabled";
}
OutputString(COLOR_BROWN, x, y, "DFHack Autoselect: " + title, true, left_margin);
OutputHotkeyString(x, y, toggle_string.c_str(), "a", true, left_margin);
auto dims = Gui::getDwarfmodeViewDims();
Screen::Painter dc(dims.menu());
dc.seek(1,24).key_pen(COLOR_LIGHTRED).pen(COLOR_WHITE);
dc.key(interface_key::CUSTOM_A).string(": Autoselect "+title);
}
}
else if (in_placement_stage() && ui_build_selector->building_subtype != 7)
else if (in_placement_stage() && ui_build_selector->building_subtype < construction_type::TrackN)
{
int left_margin = gps->dimx - 30;
int x = left_margin;
int y = 25;
string autoselect_toggle = (auto_choose_materials) ? "Disable" : "Enable";
string revert_toggle = (revert_to_last_used_type) ? "Disable" : "Enable";
string autoselect_toggle_string = (auto_choose_materials) ? "Disable Auto Mat-select" : "Enable Auto Mat-select";
string revert_toggle_string = (revert_to_last_used_type) ? "Disable Auto Type-select" : "Enable Auto Type-select";
auto dims = Gui::getDwarfmodeViewDims();
Screen::Painter dc(dims.menu());
OutputString(COLOR_BROWN, x, y, "DFHack Options", true, left_margin);
OutputHotkeyString(x, y, autoselect_toggle_string.c_str(), "a", true, left_margin);
OutputHotkeyString(x, y, revert_toggle_string.c_str(), "t", true, left_margin);
dc.seek(1,23).key_pen(COLOR_LIGHTRED).pen(COLOR_WHITE);
dc.key(interface_key::CUSTOM_A).string(": "+autoselect_toggle+" Auto Mat-Select").newline(1);
dc.key(interface_key::CUSTOM_T).string(": "+revert_toggle+" Auto Type-Select");
}
}
};
color_ostream_proxy console_out(Core::getInstance().getConsole());
IMPLEMENT_VMETHOD_INTERPOSE(jobutils_hook, feed);
IMPLEMENT_VMETHOD_INTERPOSE(jobutils_hook, render);
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
{
if (!gps || !INTERPOSE_HOOK(jobutils_hook, feed).apply() || !INTERPOSE_HOOK(jobutils_hook, render).apply())
if (!gps || !ui_build_selector ||
!INTERPOSE_HOOK(jobutils_hook, feed).apply() ||
!INTERPOSE_HOOK(jobutils_hook, render).apply())
out.printerr("Could not insert jobutils hooks!\n");
hotkeys[construction_type::Wall] = df::interface_key::HOTKEY_BUILDING_CONSTRUCTION_WALL;