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

Function recent_report

library/modules/Gui.cpp:1777–1782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775}
1776
1777static bool recent_report(df::unit *unit, df::unit_report_type slot)
1778{
1779 return unit && !unit->reports.log[slot].empty() &&
1780 *df::global::cur_year == unit->reports.last_year[slot] &&
1781 (*df::global::cur_year_tick - unit->reports.last_year_tick[slot]) <= RECENT_REPORT_TICKS;
1782}
1783
1784static bool recent_report_any(df::unit *unit)
1785{

Callers 2

FOR_ENUM_ITEMSFunction · 0.85
add_recent_reportsFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected