|
|
|
@ -152,10 +152,10 @@ public:
|
|
|
|
|
selected_column = 0;
|
|
|
|
|
|
|
|
|
|
auto last_selected_index = dwarf_activity_column.highlighted_index;
|
|
|
|
|
dwarf_activity_column.clear();
|
|
|
|
|
dwarves_column.clear();
|
|
|
|
|
dwarf_activity_values.clear();
|
|
|
|
|
|
|
|
|
|
for (auto it = work_history.begin(); it != work_history.end(); it++)
|
|
|
|
|
for (auto it = work_history.begin(); it != work_history.end();)
|
|
|
|
|
{
|
|
|
|
|
auto unit = it->first;
|
|
|
|
|
if (Units::isDead(unit))
|
|
|
|
@ -1037,15 +1037,7 @@ static void update_dwarf_stats(bool is_paused)
|
|
|
|
|
if (!Units::isCitizen(unit))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (unit->profession == profession::BABY ||
|
|
|
|
|
unit->profession == profession::CHILD ||
|
|
|
|
|
unit->profession == profession::DRUNK)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
using namespace DFHack::Units;
|
|
|
|
|
if (!isSane(unit) || isDead(unit))
|
|
|
|
|
if (DFHack::Units::isDead(unit))
|
|
|
|
|
{
|
|
|
|
|
auto it = work_history.find(unit);
|
|
|
|
|
if (it != work_history.end())
|
|
|
|
@ -1076,6 +1068,13 @@ static void update_dwarf_stats(bool is_paused)
|
|
|
|
|
if (!monitor_jobs || is_paused)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (unit->profession == profession::BABY ||
|
|
|
|
|
unit->profession == profession::CHILD ||
|
|
|
|
|
unit->profession == profession::DRUNK)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ENUM_ATTR(profession, military, unit->profession))
|
|
|
|
|
{
|
|
|
|
|
add_work_history(unit, JOB_MILITARY);
|
|
|
|
|