There is one thing I still want. I saw
https://botsin.space/@it_was_inevitable (live feed of interesting dwarf conversation of a fortress) and thought, I'm missing on so much of my dwarfs' lives!
So, step 1 was adding D_D to [REGULAR_CONVERSATION:A_D:D_D] and [CONFLICT_CONVERSATION:A_D:UCR_A:D_D] in announcements.txt.
This ends up with A TON of uninteresting spam in announcements screen.
So, the next step is: figure out how to filter and/or redirect this.
We can hear to reports like this (those enabled in announcements.txt):
eventful=require('plugins.eventful')
eventful.onReport.print_report_text = function(id) local report=df.report.find(id); print(id, report.text); end
eventful.enableEvent(eventful.eventType.REPORT, 1)
We can also delete an entry at a given index with
df.report.get_vector():erase(idx)
but this doesn't delete it from announcements view.
This does, but only when the screen is open.
dfhack.gui.getViewscreenByType(df.viewscreen_announcelistst, 0).reports:erase(idx)
So, what I'm asking is,
1. is there an easy way to prevent reports from appearing on announcements screen (like set some flag inside the eventful.onReport or something);
2. lacking that, is there a way to access that `getViewscreenByType(df.viewscreen_announcelistst, 0).reports` when the screen isn't loaded;
3. and lacking that, is it possible to execute a script when the announcements screen opens?