Merge pull request #2943 from myk002/myk_autobutcher_deannouncement

[autobutcher] log to console instead of announcements
develop
Myk 2023-02-24 10:30:48 -08:00 committed by GitHub
commit 2659bf2ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 11 deletions

@ -47,6 +47,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
-@ `confirm`: fix fps drop when enabled
## Misc Improvements
- `autobutcher`: logs activity to the console terminal instead of making disruptive in-game announcements
- DFHack tool windows that capture mouse clicks (and therefore prevent you from clicking on the "pause" button) now unconditionally pause the game when they open (but you can still unpause with the keyboard if you want to). Examples of this behavior: `gui/quickfort`, `gui/blueprint`, `gui/liquids`
- `showmood`: now shows the number of items needed for cloth and bars in addition to the technically correct but always confusing "total dimension" (150 per bar or 10,000 per cloth)
-@ Stopped mouse clicks from affecting the map when a click on a DFHack screen dismisses the window

@ -19,8 +19,6 @@
#include "LuaTools.h"
#include "PluginManager.h"
#include "modules/Gui.h"
#include "modules/Maps.h"
#include "modules/Persistence.h"
#include "modules/Units.h"
#include "modules/World.h"
@ -805,8 +803,8 @@ static void autobutcher_cycle(color_ostream &out) {
w->UpdateConfig(out);
watched_races.emplace(unit->race, w);
string announce = "New race added to autobutcher watchlist: " + Units::getRaceNamePluralById(unit->race);
Gui::showAnnouncement(announce, 2, false);
INFO(cycle,out).print("New race added to autobutcher watchlist: %s\n",
Units::getRaceNamePluralById(unit->race).c_str());
}
if (w->isWatched) {
@ -828,9 +826,8 @@ static void autobutcher_cycle(color_ostream &out) {
if (slaughter_count) {
std::stringstream ss;
ss << slaughter_count;
string announce = Units::getRaceNamePluralById(w.first) + " marked for slaughter: " + ss.str();
DEBUG(cycle,out).print("%s\n", announce.c_str());
Gui::showAnnouncement(announce, 2, false);
INFO(cycle,out).print("%s marked for slaughter: %s\n",
Units::getRaceNamePluralById(w.first).c_str(), ss.str().c_str());
}
}
}
@ -954,10 +951,8 @@ static void autobutcher_setWatchListRace(color_ostream &out, unsigned id, unsign
WatchedRace * w = new WatchedRace(out, id, watched, fk, mk, fa, ma);
w->UpdateConfig(out);
watched_races.emplace(id, w);
string announce;
announce = "New race added to autobutcher watchlist: " + Units::getRaceNamePluralById(id);
Gui::showAnnouncement(announce, 2, false);
INFO(status,out).print("New race added to autobutcher watchlist: %s\n",
Units::getRaceNamePluralById(id).c_str());
}
// remove entry from watchlist