Skip to content

Commit

Permalink
remove witness report for now
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Apr 25, 2020
1 parent c686690 commit d06a8a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 55 deletions.
28 changes: 1 addition & 27 deletions population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,33 +811,7 @@ void Population::report(std::ostream & out, bool html)
out << (html ? "<br/>" : "\n ");
out << (html ? "<i>Awaiting trial</i>" : "Awaiting trial");
}

if (html)
{
out << "<ul>";
}
for (auto report : crime->reports)
{
out << (html ? "<li>" : "\n - ");
out << "[" << AI::timestamp(report->report_year, report->report_time) << "] ";
out << AI::describe_unit(df::unit::find(report->witness), html);
if (report->unk1 == 1)
{
out << " found the body.";
}
else
{
out << " accused ";
out << AI::describe_unit(df::unit::find(report->accuses), html);
out << ".";
}
if (html)
{
out << "</li>";
}
}

out << (html ? "</ul></li>" : "\n");
out << (html ? "</li>" : "\n");
}

if (html && !any_crimes)
Expand Down
28 changes: 0 additions & 28 deletions population_justice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,34 +199,6 @@ void Population::update_crimes(color_ostream & out)
ai.debug(out, "[Crime] New crime discovered: " + AI::describe_unit(criminal) + " is accused of " + accusation + with_victim + ".");
}

for (auto report : crime->reports)
{
if (report->report_year > not_before_year || (report->report_year == not_before_year && report->report_time >= not_before_tick))
{
// TODO: report->unk1

if (report->unk1)
{
df::unit *witness = df::unit::find(report->witness);
ai.debug(out, "[Crime] " + AI::describe_unit(witness) + " found evidence of " + accusation + with_victim + ".");
}
else
{
df::unit *witness = df::unit::find(report->witness);
df::unit *accuses = df::unit::find(report->accuses);
ai.debug(out, "[Crime] " + AI::describe_unit(witness) + " accuses " + AI::describe_unit(accuses) + " of " + accusation + with_victim + ".");
if (accuses == convicted)
{
ai.debug(out, "[Crime] The accused has already been convicted.");
}
else if (accuses != criminal)
{
ai.debug(out, "[Crime] However, they are lying. " + AI::describe_unit(criminal) + " committed the crime.");
}
}
}
}

if (crime->flags.bits.needs_trial && criminal && !convicted && AI::is_dwarfmode_viewscreen())
{
// FIXME: this should be an ExclusiveCallback
Expand Down

0 comments on commit d06a8a8

Please sign in to comment.