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