Skip to content

Commit

Permalink
Fix compatibility with DFHack/df-structures@c189fe2.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Mar 1, 2019
1 parent d64f1ff commit 3648998
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ void Population::report(std::ostream & out, bool html)
{
out << "\n## Deaths\n";
}
for (auto e : world->history.events2)
for (auto e : world->history.events_death)
{
auto d = virtual_cast<df::history_event_hist_figure_diedst>(e);

Expand Down
8 changes: 4 additions & 4 deletions population_death.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ REQUIRE_GLOBAL(world);

void Population::deathwatch(color_ostream & out)
{
if (world->history.events2.size() == seen_death)
if (world->history.events_death.size() == seen_death)
{
return;
}

auto it = world->history.events2.begin();
auto it = world->history.events_death.begin();
std::advance(it, seen_death);
for (; it != world->history.events2.end(); it++)
for (; it != world->history.events_death.end(); it++)
{
auto d = virtual_cast<df::history_event_hist_figure_diedst>(*it);

Expand All @@ -35,7 +35,7 @@ void Population::deathwatch(color_ostream & out)
ai.debug(out, "[RIP] " + AI::describe_event(d));
}

seen_death = world->history.events2.size();
seen_death = world->history.events_death.size();
}

void Population::update_deads(color_ostream & out)
Expand Down

0 comments on commit 3648998

Please sign in to comment.