Specifies the keycode associated with the token. The string description
of the key binding is added to the text content of the token.
@@ -2848,7 +2859,9 @@ this may be extended with mouse click support.
edit_pen: | If specified, used instead of cursor_pen for the edit field. |
+edit_below: | If true, the edit field is placed below the list instead of above. |
+
not_found_label: |
| Specifies the text of the label shown when no items match the filter. |
diff --git a/Lua API.rst b/Lua API.rst
index 714a41bfb..eaef74997 100644
--- a/Lua API.rst
+++ b/Lua API.rst
@@ -1610,7 +1610,10 @@ Supported callbacks and fields are:
Maps to an integer in range 0-255. Duplicates a separate "STRING_A???" code for convenience.
``_MOUSE_L, _MOUSE_R``
- If the left or right mouse button is pressed.
+ If the left or right mouse button is being pressed.
+
+ ``_MOUSE_L_DOWN, _MOUSE_R_DOWN``
+ If the left or right mouse button was just pressed.
If this method is omitted, the screen is dismissed on receival of the ``LEAVESCREEN`` key.
@@ -2785,6 +2788,8 @@ It has the following attributes:
:inactive_pen: If specified, used for the cursor when the widget is not active.
:icon_pen: Default pen for icons.
:on_select: Selection change callback; called as ``on_select(index,choice)``.
+ This is also called with *nil* arguments if ``setChoices`` is called
+ with an empty list.
:on_submit: Enter key callback; if specified, the list reacts to the key
and calls it as ``on_submit(index,choice)``.
:on_submit2: Shift-Enter key callback; if specified, the list reacts to the key
diff --git a/NEWS b/NEWS
index 65c647337..a0e01dba1 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ DFHack future
- removebadthoughts: add --dry-run option
- superdwarf: work in adventure mode too
- tweak stable-cursor: carries cursor location from/to Build menu.
+ - deathcause: allow selection from the unitlist screen
New tweaks:
- tweak military-training: speed up melee squad training up to 10x (normally 3-5x).
New scripts:
@@ -22,33 +23,35 @@ DFHack future
- embark: lets you embark anywhere.
- lever: list and pull fort levers from the dfhack console.
- stripcaged: mark items inside cages for dumping, eg caged goblin weapons.
+ - soundsense-season: writes the correct season to gamelog.txt on world load.
New GUI scripts:
- gui/guide-path: displays the cached path for minecart Guide orders.
- gui/workshop-job: displays inputs of a workshop job and allows tweaking them.
- - gui/workflow: a front-end for the workflow plugin.
+ - gui/workflow: a front-end for the workflow plugin (part inspired by falconne).
- gui/assign-rack: works together with a binary patch to fix weapon racks.
- gui/gm-editor: an universal editor for lots of dfhack things.
- gui/companion-order: a adventure mode command interface for your companions.
- New binary patches:
- - armorstand-capacity
- - custom-reagent-size
- - deconstruct-heapfall
- - deconstruct-teleport
- - hospital-overstocking
- - training-ammo
- - weaponrack-unassign
+ New binary patches (for use with binpatch):
+ - armorstand-capacity: doubles the capacity of armor stands.
+ - custom-reagent-size: lets custom reactions use small amounts of inputs.
+ - deconstruct-heapfall: stops some items still falling on head when deconstructing.
+ - deconstruct-teleport: stops items from 16x16 block teleporting when deconstructing.
+ - hospital-overstocking: stops hospital overstocking with supplies.
+ - training-ammo: lets dwarves with quiver full of combat-only ammo train.
+ - weaponrack-unassign: fixes bug that negates work done by gui/assign-rack.
Workflow plugin:
- properly considers minecarts assigned to routes busy.
- code for deducing job outputs rewritten in lua for flexibility.
- logic fix: collecting webs produces silk, and ungathered webs are not thread.
- items assigned to squads are considered busy, even if not in inventory.
- shearing and milking jobs are supported, but only with generic MILK or YARN outputs.
+ - workflow announces when the stock level gets very low once a season.
New Fix Armory plugin:
Together with a couple of binary patches and the gui/assign-rack script,
this plugin makes weapon racks, armor stands, chests and cabinets in
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.
+ Adds an incremental search function to the Stocks, Trading, Stockpile 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.
diff --git a/Readme.html b/Readme.html
index deea72bef..54deb013f 100644
--- a/Readme.html
+++ b/Readme.html
@@ -2873,7 +2873,7 @@ directly to the main dwarf mode screen.
-
The search plugin adds search to the Stocks, Trading and Unit List screens.
+
The search plugin adds search to the Stocks, Trading, Stockpile and Unit List screens.
Searching works the same way as the search option in "Move to Depot" does.
You will see the Search option displayed on screen with a hotkey (usually 's').
@@ -2890,6 +2890,13 @@ filter).
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.
+
In the stockpile screen the option only appears if the cursor is in the
+rightmost list:
+

+
Note that the 'Permit XXX'/'Forbid XXX' keys conveniently operate only
+on items actually shown in the rightmost list, so it is possible to select
+only fat or tallow by forbidding fats, then searching for fat/tallow, and
+using Permit Fats again while the list is filtered.
@@ -3034,11 +3041,11 @@ current job, and their current status.
current count is below the lower bound of the range, the job is resumed; if it
is above or equal to the top bound, it will be suspended. Within the range, the
specific constraint has no effect on the job; others may still affect it.
-
Pressing 'c' switches the current constraint between counting stacks or items.
-Pressing 'm' lets you input the range directly; 'e', 'r', 'd', 'f' adjust the
-bounds by 1, 5, or 25 depending on the direction and the 'c' setting (counting
-items and expanding the range each gives a 5x bonus).
-
Pressing 'n' produces a list of possible outputs of this job as guessed by
+
Pressing 'I' switches the current constraint between counting stacks or items.
+Pressing 'R' lets you input the range directly; 'e', 'r', 'd', 'f' adjust the
+bounds by 5, 10, or 20 depending on the direction and the 'I' setting (counting
+items and expanding the range each gives a 2x bonus).
+
Pressing 'A' produces a list of possible outputs of this job as guessed by
workflow, and lets you create a new constraint by choosing one as template. If you
don't see the choice you want in the list, it likely means you have to adjust
the job material first using job item-material or gui/workshop-job,
@@ -3050,6 +3057,23 @@ added to the list. If you use Shift-Enter, the interface proceeds to the
next dialog, which allows you to edit the suggested constraint parameters to
suit your need, and set the item count range.

+
Pressing 'S' (or, with the example config, Alt-W in the 'z' stocks screen)
+opens the overall status screen, which was copied from the C++ implementation
+by falconne for better integration with the rest of the lua script:
+

+
This screen shows all currently existing workflow constraints, and allows
+monitoring and/or changing them from one screen. The constraint list can
+be filtered by typing text in the field below.
+
The color of the stock level number indicates how "healthy" the stock level
+is, based on current count and trend. Bright green is very good, green is good,
+red is bad, bright red is very bad.
+
The limit number is also color-coded. Red means that there are currently no
+workshops producing that item (i.e. no jobs). If it's yellow, that means the
+production has been delayed, possibly due to lack of input materials.
+
The chart on the right is a plot of the last 14 days (28 half day plots) worth
+of stock history for the selected item, with the rightmost point representing
+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).
diff --git a/Readme.rst b/Readme.rst
index a214a6ecb..afad3ef4c 100644
--- a/Readme.rst
+++ b/Readme.rst
@@ -2074,7 +2074,7 @@ directly to the main dwarf mode screen.
Search
======
-The search plugin adds search to the Stocks, Trading and Unit List screens.
+The search plugin adds search to the Stocks, Trading, Stockpile and Unit List screens.
.. image:: images/search.png
@@ -2097,6 +2097,16 @@ 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.
+In the stockpile screen the option only appears if the cursor is in the
+rightmost list:
+
+.. image:: images/search-stockpile.png
+
+Note that the 'Permit XXX'/'Forbid XXX' keys conveniently operate only
+on items actually shown in the rightmost list, so it is possible to select
+only fat or tallow by forbidding fats, then searching for fat/tallow, and
+using Permit Fats again while the list is filtered.
+
AutoMaterial
============
@@ -2295,12 +2305,12 @@ current count is below the lower bound of the range, the job is resumed; if it
is above or equal to the top bound, it will be suspended. Within the range, the
specific constraint has no effect on the job; others may still affect it.
-Pressing 'c' switches the current constraint between counting stacks or items.
-Pressing 'm' lets you input the range directly; 'e', 'r', 'd', 'f' adjust the
-bounds by 1, 5, or 25 depending on the direction and the 'c' setting (counting
-items and expanding the range each gives a 5x bonus).
+Pressing 'I' switches the current constraint between counting stacks or items.
+Pressing 'R' lets you input the range directly; 'e', 'r', 'd', 'f' adjust the
+bounds by 5, 10, or 20 depending on the direction and the 'I' setting (counting
+items and expanding the range each gives a 2x bonus).
-Pressing 'n' produces a list of possible outputs of this job as guessed by
+Pressing 'A' produces a list of possible outputs of this job as guessed by
workflow, and lets you create a new constraint by choosing one as template. If you
don't see the choice you want in the list, it likely means you have to adjust
the job material first using ``job item-material`` or ``gui/workshop-job``,
@@ -2316,6 +2326,29 @@ suit your need, and set the item count range.
.. image:: images/workflow-new2.png
+Pressing 'S' (or, with the example config, Alt-W in the 'z' stocks screen)
+opens the overall status screen, which was copied from the C++ implementation
+by falconne for better integration with the rest of the lua script:
+
+.. image:: images/workflow-status.png
+
+This screen shows all currently existing workflow constraints, and allows
+monitoring and/or changing them from one screen. The constraint list can
+be filtered by typing text in the field below.
+
+The color of the stock level number indicates how "healthy" the stock level
+is, based on current count and trend. Bright green is very good, green is good,
+red is bad, bright red is very bad.
+
+The limit number is also color-coded. Red means that there are currently no
+workshops producing that item (i.e. no jobs). If it's yellow, that means the
+production has been delayed, possibly due to lack of input materials.
+
+The chart on the right is a plot of the last 14 days (28 half day plots) worth
+of stock history for the selected item, with the rightmost point representing
+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).
+
gui/assign-rack
===============
diff --git a/dfhack.init-example b/dfhack.init-example
index 8fafa4cf4..1a5aee48f 100644
--- a/dfhack.init-example
+++ b/dfhack.init-example
@@ -91,6 +91,7 @@ keybinding add Alt-A@dwarfmode/QueryBuilding/Some/Workshop/Job gui/workshop-job
# workflow front-end
keybinding add Alt-W@dwarfmode/QueryBuilding/Some/Workshop/Job gui/workflow
+keybinding add Alt-W@overallstatus "gui/workflow status"
# assign weapon racks to squads so that they can be used
keybinding add P@dwarfmode/QueryBuilding/Some/Weaponrack gui/assign-rack
@@ -136,6 +137,13 @@ tweak military-color-assigned
# remove inverse dependency of squad training speed on unit list size and use more sparring
tweak military-training
+###########
+# Scripts #
+###########
+
+# write the correct season to gamelog on world load
+soundsense-season
+
#######################################################
# Apply binary patches at runtime #
# #
diff --git a/images/search-stockpile.png b/images/search-stockpile.png
new file mode 100644
index 000000000..37a0e57cd
Binary files /dev/null and b/images/search-stockpile.png differ
diff --git a/images/workflow-new1.png b/images/workflow-new1.png
index 50d0e1f42..498fc4e80 100644
Binary files a/images/workflow-new1.png and b/images/workflow-new1.png differ
diff --git a/images/workflow-new2.png b/images/workflow-new2.png
index 74a4922be..58698d30f 100644
Binary files a/images/workflow-new2.png and b/images/workflow-new2.png differ
diff --git a/images/workflow-status.png b/images/workflow-status.png
new file mode 100644
index 000000000..6c3d989f3
Binary files /dev/null and b/images/workflow-status.png differ
diff --git a/images/workflow.png b/images/workflow.png
index a0a0d4216..7506c730f 100644
Binary files a/images/workflow.png and b/images/workflow.png differ
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index f67b6fe44..784b54c90 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -121,7 +121,6 @@ include/modules/Materials.h
include/modules/Notes.h
include/modules/Screen.h
include/modules/Translation.h
-include/modules/Vegetation.h
include/modules/Vermin.h
include/modules/World.h
include/modules/Graphic.h
@@ -142,7 +141,6 @@ modules/Materials.cpp
modules/Notes.cpp
modules/Screen.cpp
modules/Translation.cpp
-modules/Vegetation.cpp
modules/Vermin.cpp
modules/World.cpp
modules/Graphic.cpp
diff --git a/library/Core.cpp b/library/Core.cpp
index fd96d5601..7e9c90e98 100644
--- a/library/Core.cpp
+++ b/library/Core.cpp
@@ -343,6 +343,50 @@ command_result Core::runCommand(color_ostream &out, const std::string &command)
return CR_NOT_IMPLEMENTED;
}
+static bool try_autocomplete(color_ostream &con, const std::string &first, std::string &completed)
+{
+ std::vector
possible;
+
+ auto plug_mgr = Core::getInstance().getPluginManager();
+ for(size_t i = 0; i < plug_mgr->size(); i++)
+ {
+ const Plugin * plug = (plug_mgr->operator[](i));
+ for (size_t j = 0; j < plug->size(); j++)
+ {
+ const PluginCommand &pcmd = plug->operator[](j);
+ if (pcmd.isHotkeyCommand())
+ continue;
+ if (pcmd.name.substr(0, first.size()) == first)
+ possible.push_back(pcmd.name);
+ }
+ }
+
+ bool all = (first.find('/') != std::string::npos);
+
+ std::map scripts;
+ listScripts(plug_mgr, scripts, Core::getInstance().getHackPath() + "scripts/", all);
+ for (auto iter = scripts.begin(); iter != scripts.end(); ++iter)
+ if (iter->first.substr(0, first.size()) == first)
+ possible.push_back(iter->first);
+
+ if (possible.size() == 1)
+ {
+ completed = possible[0];
+ fprintf(stderr, "Autocompleted %s to %s\n", first.c_str(), completed.c_str());
+ return true;
+ }
+
+ if (possible.size() > 1 && possible.size() < 8)
+ {
+ std::string out;
+ for (size_t i = 0; i < possible.size(); i++)
+ out += " " + possible[i];
+ con.print("Possible completions:%s\n", out.c_str());
+ }
+
+ return false;
+}
+
command_result Core::runCommand(color_ostream &con, const std::string &first, vector &parts)
{
if (!first.empty())
@@ -665,10 +709,14 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve
if(res == CR_NOT_IMPLEMENTED)
{
auto filename = getHackPath() + "scripts/" + first;
+ std::string completed;
+
if (fileExists(filename + ".lua"))
res = runLuaScript(con, first, parts);
else if (plug_mgr->eval_ruby && fileExists(filename + ".rb"))
res = runRubyScript(con, plug_mgr, first, parts);
+ else if (try_autocomplete(con, first, completed))
+ return runCommand(con, completed, parts);
else
con.printerr("%s is not a recognized command.\n", first.c_str());
}
@@ -733,7 +781,6 @@ void fIOthread(void * iodata)
{
string command = "";
int ret = con.lineedit("[DFHack]# ",command, main_history);
- fprintf(stderr,"Command: [%s]\n",command.c_str());
if(ret == -2)
{
cerr << "Console is shutting down properly." << endl;
@@ -747,14 +794,10 @@ void fIOthread(void * iodata)
else if(ret)
{
// a proper, non-empty command was entered
- fprintf(stderr,"Adding command to history\n");
main_history.add(command);
- fprintf(stderr,"Saving history\n");
main_history.save("dfhack.history");
}
- fprintf(stderr,"Running command\n");
-
auto rv = core->runCommand(con, command);
if (rv == CR_NOT_IMPLEMENTED)
diff --git a/library/include/DFHack.h b/library/include/DFHack.h
index d606df94b..8a094cf86 100644
--- a/library/include/DFHack.h
+++ b/library/include/DFHack.h
@@ -61,7 +61,6 @@ distribution.
#include "modules/Translation.h"
#include "modules/World.h"
#include "modules/Items.h"
-#include "modules/Vegetation.h"
#include "modules/Maps.h"
#include "modules/Gui.h"
diff --git a/library/include/ModuleFactory.h b/library/include/ModuleFactory.h
index 1f3d4222a..87c9a726f 100644
--- a/library/include/ModuleFactory.h
+++ b/library/include/ModuleFactory.h
@@ -33,7 +33,6 @@ namespace DFHack
Module* createGui();
Module* createWorld();
Module* createMaterials();
- Module* createVegetation();
Module* createNotes();
Module* createGraphic();
}
diff --git a/library/include/modules/Maps.h b/library/include/modules/Maps.h
index 632e8ec13..82f79e94b 100644
--- a/library/include/modules/Maps.h
+++ b/library/include/modules/Maps.h
@@ -32,7 +32,6 @@ distribution.
#include "Export.h"
#include "Module.h"
-#include "modules/Vegetation.h"
#include
#include "BitArray.h"
#include "modules/Materials.h"
diff --git a/library/include/modules/Vegetation.h b/library/include/modules/Vegetation.h
deleted file mode 100644
index 89ba5ff6c..000000000
--- a/library/include/modules/Vegetation.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-https://github.com/peterix/dfhack
-Copyright (c) 2009-2012 Petr Mrázek (peterix@gmail.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-#pragma once
-#ifndef CL_MOD_VEGETATION
-#define CL_MOD_VEGETATION
-/**
- * \defgroup grp_vegetation Vegetation : stuff that grows and gets cut down or trampled by dwarves
- * @ingroup grp_modules
- */
-
-#include "Export.h"
-#include "DataDefs.h"
-#include "df/plant.h"
-
-namespace DFHack
-{
-namespace Vegetation
-{
-const uint32_t sapling_to_tree_threshold = 120 * 28 * 12 * 3; // 3 years
-
-// "Simplified" copy of plant
-struct t_plant {
- df::language_name name;
- df::plant_flags flags;
- int16_t material;
- df::coord pos;
- int32_t grow_counter;
- uint16_t temperature_1;
- uint16_t temperature_2;
- int32_t is_burning;
- int32_t hitpoints;
- int16_t update_order;
- //std::vector unk1;
- //int32_t unk2;
- //uint16_t temperature_3;
- //uint16_t temperature_4;
- //uint16_t temperature_5;
- // Pointer to original object, in case you want to modify it
- df::plant *origin;
-};
-
-DFHACK_EXPORT bool isValid();
-DFHACK_EXPORT uint32_t getCount();
-DFHACK_EXPORT df::plant * getPlant(const int32_t index);
-DFHACK_EXPORT bool copyPlant (const int32_t index, t_plant &out);
-}
-}
-#endif
diff --git a/library/lua/gui.lua b/library/lua/gui.lua
index 99bf9263c..603c7ab44 100644
--- a/library/lua/gui.lua
+++ b/library/lua/gui.lua
@@ -13,6 +13,8 @@ CLEAR_PEN = to_pen{ch=32,fg=0,bg=0}
local FAKE_INPUT_KEYS = {
_MOUSE_L = true,
_MOUSE_R = true,
+ _MOUSE_L_DOWN = true,
+ _MOUSE_R_DOWN = true,
_STRING = true,
}
diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua
index ebbffbbbd..cb9e1c9be 100644
--- a/library/lua/gui/widgets.lua
+++ b/library/lua/gui/widgets.lua
@@ -418,7 +418,13 @@ List.ATTRS{
function List:init(info)
self.page_top = 1
self.page_size = 1
- self:setChoices(info.choices, info.selected)
+
+ if info.choices then
+ self:setChoices(info.choices, info.selected)
+ else
+ self.choices = {}
+ self.selected = 1
+ end
end
function List:setChoices(choices, selected)
@@ -481,6 +487,9 @@ function List:moveCursor(delta, force_cb)
if cnt < 1 then
self.page_top = 1
self.selected = 1
+ if force_cb and self.on_select then
+ self.on_select(nil,nil)
+ end
return
end
@@ -657,13 +666,17 @@ function FilteredList:init(info)
end
end
self.not_found = Label{
- visible = false,
+ visible = true,
text = info.not_found_label or 'No matches',
text_pen = COLOR_LIGHTRED,
frame = { l = info.icon_width, t = self.list.frame.t },
}
self:addviews{ self.edit, self.list, self.not_found }
- self:setChoices(info.choices, info.selected)
+ if info.choices then
+ self:setChoices(info.choices, info.selected)
+ else
+ self.choices = {}
+ end
end
function FilteredList:getChoices()
diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp
index 363de8064..38f8bfb9f 100644
--- a/library/modules/Maps.cpp
+++ b/library/modules/Maps.cpp
@@ -59,6 +59,7 @@ using namespace std;
#include "df/z_level_flags.h"
#include "df/region_map_entry.h"
#include "df/flow_info.h"
+#include "df/plant.h"
using namespace DFHack;
using namespace df::enums;
diff --git a/library/modules/Screen.cpp b/library/modules/Screen.cpp
index cd20bc25e..782bb317d 100644
--- a/library/modules/Screen.cpp
+++ b/library/modules/Screen.cpp
@@ -664,14 +664,24 @@ int dfhack_lua_viewscreen::do_input(lua_State *L)
if (enabler && enabler->tracking_on)
{
- if (enabler->mouse_lbut) {
+ if (enabler->mouse_lbut_down) {
lua_pushboolean(L, true);
lua_setfield(L, -2, "_MOUSE_L");
}
- if (enabler->mouse_rbut) {
+ if (enabler->mouse_rbut_down) {
lua_pushboolean(L, true);
lua_setfield(L, -2, "_MOUSE_R");
}
+ if (enabler->mouse_lbut) {
+ lua_pushboolean(L, true);
+ lua_setfield(L, -2, "_MOUSE_L_DOWN");
+ enabler->mouse_lbut = 0;
+ }
+ if (enabler->mouse_rbut) {
+ lua_pushboolean(L, true);
+ lua_setfield(L, -2, "_MOUSE_R_DOWN");
+ enabler->mouse_rbut = 0;
+ }
}
lua_call(L, 2, 0);
diff --git a/library/modules/Translation.cpp b/library/modules/Translation.cpp
index 6f4ca2b04..90f8bbb81 100644
--- a/library/modules/Translation.cpp
+++ b/library/modules/Translation.cpp
@@ -115,6 +115,9 @@ void Translation::setNickname(df::language_name *name, std::string nick)
if (!name->has_name)
{
+ if (nick.empty())
+ return;
+
*name = df::language_name();
name->language = 0;
@@ -122,6 +125,18 @@ void Translation::setNickname(df::language_name *name, std::string nick)
}
name->nickname = nick;
+
+ // If the nick is empty, check if this made the whole name empty
+ if (name->nickname.empty() && name->first_name.empty())
+ {
+ bool has_words = false;
+ for (int i = 0; i < 7; i++)
+ if (name->words[i] >= 0)
+ has_words = true;
+
+ if (!has_words)
+ name->has_name = false;
+ }
}
string Translation::TranslateName(const df::language_name * name, bool inEnglish, bool onlyLastPart)
diff --git a/library/modules/Vegetation.cpp b/library/modules/Vegetation.cpp
deleted file mode 100644
index f7c4c9b0c..000000000
--- a/library/modules/Vegetation.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-https://github.com/peterix/dfhack
-Copyright (c) 2009-2012 Petr Mrázek (peterix@gmail.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-
-#include "Internal.h"
-
-#include
-#include
-#include