MCPcopy Create free account
hub / github.com/DFHack/dfhack / showAutoAnnouncement

Method showAutoAnnouncement

library/modules/Gui.cpp:2029–2045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2027}
2028
2029void Gui::showAutoAnnouncement(
2030 df::announcement_type type, df::coord pos, std::string message, int color, bool bright,
2031 df::unit *unit_a, df::unit *unit_d)
2032{
2033 using df::global::d_init;
2034
2035 df::announcement_flags flags;
2036 flags.bits.D_DISPLAY = flags.bits.A_DISPLAY = true;
2037
2038 if (is_valid_enum_item(type) && type != df::announcement_type::NONE && d_init)
2039 flags = d_init->announcements.flags[type];
2040
2041 int id = makeAnnouncement(type, flags, pos, message, color, bright);
2042
2043 addCombatReportAuto(unit_a, flags, id);
2044 addCombatReportAuto(unit_d, flags, id);
2045}
2046
2047bool Gui::autoDFAnnouncement(df::announcement_infost info, string message)
2048{ // Based on reverse-engineering of "make_announcement" FUN_1400574e0 (v50.11 win64 Steam)

Callers

nothing calls this directly

Calls 1

is_valid_enum_itemFunction · 0.85

Tested by

no test coverage detected