Skip to content

Commit

Permalink
Merge remote-tracking branch 'falconne/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
angavrilov committed May 11, 2014
2 parents 8989c06 + fbd8727 commit a3d7b54
Show file tree
Hide file tree
Showing 11 changed files with 3,112 additions and 585 deletions.
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ DFHack future
- digfort: improved csv parsing, add start() comment handling
- exterminate: allow specifying a caste (exterminate gob:male)
- createitem: in adventure mode it now defaults to the controlled unit as maker.
- autotrade: adds "(Un)mark All" options to both panes of trade screen.
- mousequery: several usability improvements.
- mousequery: show live overlay (in menu area) of what's on the tile under the mouse cursor.
- search: workshop profile search added.
- dwarfmonitor: add screen to summarise preferences of fortress dwarfs.
- getplants: add autochop function to automate woodcutting.
- stocks: added more filtering and display options.

Siege engine plugin:
- engine quality and distance to target now affect accuracy
Expand Down
23 changes: 23 additions & 0 deletions Readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,29 @@ another savegame you can use the command list_export:
autobutcher.bat


autochop
---------
Automatically manage tree cutting designation to keep available logs withing given
quotas.

Open the dashboard by running:
::

getplants autochop

The plugin must be activated (with 'a') before it can be used. You can then set logging quotas
and restrict designations to specific burrows (with 'Enter') if desired. The plugin's activity
cycle runs once every in game day.

If you add
::

enable getplants
to your dfhack.init there will be a hotkey to open the dashboard from the chop designation
menu.


autolabor
---------
Automatically manage dwarf labors.
Expand Down
13 changes: 11 additions & 2 deletions plugins/automaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
MaterialDescriptor material = get_material_in_list(ui_build_selector->sel_index);
if (material.valid)
{
if (input->count(interface_key::SELECT) || input->count(interface_key::SEC_SELECT))
if (input->count(interface_key::SELECT) || input->count(interface_key::SELECT_ALL))
{
if (get_last_moved_material().matches(material))
last_used_moved = false; //Keep selected material on top
Expand All @@ -749,7 +749,7 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
gen_material.push_back(get_material_in_list(curr_index));
box_select_materials.clear();
// Populate material list with selected material
populate_box_materials(gen_material, ((input->count(interface_key::SEC_SELECT) && ui_build_selector->is_grouped) ? -1 : 1));
populate_box_materials(gen_material, ((input->count(interface_key::SELECT_ALL) && ui_build_selector->is_grouped) ? -1 : 1));

input->clear(); // Let the apply_box_selection routine allocate the construction
input->insert(interface_key::LEAVESCREEN);
Expand Down Expand Up @@ -1162,6 +1162,15 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest

case SELECT_SECOND:
OutputString(COLOR_GREEN, x, y, "Choose second corner", true, left_margin);

int32_t curr_x, curr_y, curr_z;
Gui::getCursorCoords(curr_x, curr_y, curr_z);
int dX = abs(box_first.x - curr_x) + 1;
int dY = abs(box_first.y - curr_y) + 1;
stringstream label;
label << "Selection: " << dX << "x" << dY;
OutputString(COLOR_WHITE, x, ++y, label.str(), true, left_margin);

int cx = box_first.x;
int cy = box_first.y;
OutputString(COLOR_BROWN, cx, cy, "X");
Expand Down
Loading

0 comments on commit a3d7b54

Please sign in to comment.