diff --git a/NEWS b/NEWS index 933234c91..e84fff67c 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,7 @@ DFHack Future - Note: Existing stuck jobs must be cancelled and re-added Misc Improvements dwarfmonitor date format can be modified (see Readme) + dwarfmonitor weather display can be configured separately "keybinding list" accepts a context nyan: Can now be stopped with dfhack-run quicksave: Restricted to fortress mode diff --git a/Readme.rst b/Readme.rst index 00502edde..bd97755f8 100644 --- a/Readme.rst +++ b/Readme.rst @@ -1692,7 +1692,7 @@ Records dwarf activity to measure fort efficiency. Options: ``dwarfmonitor enable ``: - Start monitoring ``mode``. ``mode`` can be "work", "misery", or "all". + Start monitoring ``mode``. ``mode`` can be "work", "misery", "weather", or "all". ``dwarfmonitor disable ``: Stop monitoring ``mode`` (see above) ``dwarfmonitor stats``: diff --git a/plugins/dwarfmonitor.cpp b/plugins/dwarfmonitor.cpp index ce63bc096..5d6ff4b7c 100644 --- a/plugins/dwarfmonitor.cpp +++ b/plugins/dwarfmonitor.cpp @@ -77,6 +77,7 @@ static dwarfmonitor_configst dwarfmonitor_config; static bool monitor_jobs = false; static bool monitor_misery = true; static bool monitor_date = true; +static bool monitor_weather = true; static map> work_history; static int misery[] = { 0, 0, 0, 0, 0, 0, 0 }; @@ -1753,8 +1754,11 @@ struct dwarf_monitor_hook : public df::viewscreen_dwarfmodest OutputString(COLOR_GREY, x, y, date_str.str()); - x = 1; - y = gps->dimy - 1; + } + if (monitor_weather) + { + int x = 1; + int y = gps->dimy - 1; bool rain = false, snow = false; if (current_weather) @@ -1817,6 +1821,11 @@ static bool set_monitoring_mode(const string &mode, const bool &state) mode_recognized = true; monitor_date = state; } + else if (mode == "weather" || mode == "all") + { + mode_recognized = true; + monitor_weather = state; + } return mode_recognized; } @@ -1945,7 +1954,7 @@ DFhackCExport command_result plugin_init(color_ostream &out, std::vector \n" " Start monitoring \n" - " can be \"work\", \"misery\", or \"all\"\n" + " can be \"work\", \"misery\", \"weather\", or \"all\"\n" "dwarfmonitor disable \n" " as above\n\n" "dwarfmonitor stats\n"