Update dwarfmonitor documentation and NEWS

develop
lethosor 2015-06-13 21:46:36 -04:00
parent 93c9a41a3a
commit 7581bda7d5
3 changed files with 37 additions and 9 deletions

@ -27,8 +27,8 @@ DFHack Future
workflow: Fixed some issues with stuck jobs workflow: Fixed some issues with stuck jobs
- Note: Existing stuck jobs must be cancelled and re-added - Note: Existing stuck jobs must be cancelled and re-added
Misc Improvements Misc Improvements
dwarfmonitor date format can be modified (see Readme) dwarfmonitor widgets' positions, formats, etc. are now customizable (see Readme)
dwarfmonitor weather display can be configured separately dwarfmonitor weather display now separated from the date display
"keybinding list" accepts a context "keybinding list" accepts a context
nyan: Can now be stopped with dfhack-run nyan: Can now be stopped with dfhack-run
quicksave: Restricted to fortress mode quicksave: Restricted to fortress mode

@ -1702,17 +1702,45 @@ Options:
``dwarfmonitor reload``: ``dwarfmonitor reload``:
Reload configuration file (``dfhack-config/dwarfmonitor.json``) Reload configuration file (``dfhack-config/dwarfmonitor.json``)
Configuration options: Widget configuration:
``date_format``: The file ``dfhack-config/dwarfmonitor.json`` can be edited to control the
Date format positions and settings of all widgets displayed on the main fortress mode screen
(currently weather, misery, and date indicators). This file should contain a
Example configuration:: JSON object with the key ``widgets`` containing an array of objects - see the
included file in the ``dfhack-config`` folder for an example::
{ {
"date_format": "y-m-d" "widgets": [
{
"type": "widget type (weather, misery, or date)",
"x": X coordinate,
"y": Y coordinate
<...additional options...>
}
]
} }
X and Y coordinates begin at zero (in the upper left corner of the screen).
Negative coordinates will be treated as distances from the lower right corner,
beginning at 1 - e.g. an x coordinate of 0 is the leftmost column, while an x
coordinate of 1 is the rightmost column.
By default, the x and y coordinates given correspond to the leftmost tile of
the widget. Including an ``anchor`` option set to ``right`` will cause the
rightmost tile of the widget to be located at this position instead.
The date widget supports an additional option, ``format``, which replaces the
following characters (all others, such as punctuation, are not modified):
* ``Y`` or ``y``: The current year
* ``M``: The current month, zero-padded if necessary
* ``m``: The current month, *not* zero-padded
* ``D``: The current day, zero-padded if necessary
* ``d``: The current day, *not* zero-padded
The default date format is ``Y-M-D``.
seedwatch seedwatch
--------- ---------
Watches the numbers of seeds available and enables/disables seed and plant cooking. Watches the numbers of seeds available and enables/disables seed and plant cooking.

@ -23,7 +23,7 @@ function Widget:get_pos()
return x, y return x, y
end end
function Widget:render() function Widget:render()
if not monitor_state(self.opts.type) then if monitor_state(self.opts.type) == false then
return return
end end
self:update() self:update()