From d6162cd1892d880d0681a962d4f9791695a6ed34 Mon Sep 17 00:00:00 2001 From: Quietust Date: Tue, 29 Jul 2014 16:26:14 -0500 Subject: [PATCH] death_info -> incident --- library/RemoteTools.cpp | 8 ++++---- plugins/cursecheck.cpp | 4 ++-- plugins/tweak.cpp | 4 ++-- scripts/gui/unit-info-viewer.lua | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/library/RemoteTools.cpp b/library/RemoteTools.cpp index 17f5258e1..ae352a6f9 100644 --- a/library/RemoteTools.cpp +++ b/library/RemoteTools.cpp @@ -1,4 +1,4 @@ -/* +/* https://github.com/peterix/dfhack Copyright (c) 2011 Petr Mrázek @@ -76,7 +76,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "df/historical_entity.h" #include "df/squad.h" #include "df/squad_position.h" -#include "df/death_info.h" +#include "df/incident.h" #include "BasicApi.pb.h" @@ -283,7 +283,7 @@ void DFHack::describeUnit(BasicUnitInfo *info, df::unit *unit, if (unit->counters.death_id >= 0) { info->set_death_id(unit->counters.death_id); - if (auto death = df::death_info::find(unit->counters.death_id)) + if (auto death = df::incident::find(unit->counters.death_id)) info->set_death_flags(death->flags.whole); } @@ -455,7 +455,7 @@ static command_result ListEnums(color_ostream &stream, BITFIELD(cie_add_tag_mask1); BITFIELD(cie_add_tag_mask2); - describe_bitfield(out->mutable_death_info_flags()); + describe_bitfield(out->mutable_incident_flags()); ENUM(profession); diff --git a/plugins/cursecheck.cpp b/plugins/cursecheck.cpp index d4005d3d0..5dbc872c9 100644 --- a/plugins/cursecheck.cpp +++ b/plugins/cursecheck.cpp @@ -42,7 +42,7 @@ using namespace std; #include "df/language_name.h" #include "df/world.h" #include "df/world_raws.h" -#include "df/death_info.h" +#include "df/incident.h" using std::vector; using std::string; @@ -260,7 +260,7 @@ command_result cursecheck (color_ostream &out, vector & parameters) out.print("Unnamed creature "); } - auto death = df::death_info::find(unit->counters.death_id); + auto death = df::incident::find(unit->counters.death_id); bool missing = false; if (death && !death->flags.bits.discovered) { diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp index 98e97cb0a..9c5999ca5 100644 --- a/plugins/tweak.cpp +++ b/plugins/tweak.cpp @@ -27,7 +27,7 @@ #include "df/historical_figure_info.h" #include "df/assumed_identity.h" #include "df/language_name.h" -#include "df/death_info.h" +#include "df/incident.h" #include "df/criminal_case.h" #include "df/unit_inventory_item.h" #include "df/viewscreen_dwarfmodest.h" @@ -1211,7 +1211,7 @@ static command_result tweak(color_ostream &out, vector ¶meters) if (!unit) return CR_FAILURE; - auto death = df::death_info::find(unit->counters.death_id); + auto death = df::incident::find(unit->counters.death_id); if (death) { diff --git a/scripts/gui/unit-info-viewer.lua b/scripts/gui/unit-info-viewer.lua index 029db28d5..aa8cb3a20 100644 --- a/scripts/gui/unit-info-viewer.lua +++ b/scripts/gui/unit-info-viewer.lua @@ -417,16 +417,16 @@ function Identity:init(args) end end if u.counters.death_id > -1 then -- if undead/ghostly dead or dead-dead - self.death_info = df.global.world.deaths.all[u.counters.death_id] - if not self.death_info.flags.discovered then + self.incident = df.global.world.incidents.all[u.counters.death_id] + if not self.incident.flags.discovered then self.missing = true end end -- slaughtered? if self.death_event then self.death_date = Time{year = self.death_event.year, ticks = self.death_event.seconds} - elseif self.death_info then - self.death_date = Time{year = self.death_info.event_year, ticks = self.death_info.event_time} + elseif self.incident then + self.death_date = Time{year = self.incident.event_year, ticks = self.incident.event_time} end -- age now or age death? if self.dead and self.death_date then -- if cursed with no age? -- if hacked a ressurection, such that they aren't dead anymore, don't use the death date @@ -753,14 +753,14 @@ function UnitInfoViewer:chunk_Dead() --str << ", shot by a #{df.world.raws.itemdefs.weapons[e.weapon.bow_item_subtype].name}" if e.weapon.bow_item_type == :WEAPON str = DEATH_TYPES[i.death_event.death_cause]..PERIOD pen = pens.MAGENTA - elseif i.death_info then + elseif i.incident then --str = "The #{u.race_tg.name[0]}" --str << " #{u.name}" if u.name.has_name --str << " died" - --str << " in year #{death_info.event_year}" if death_info + --str << " in year #{incident.event_year}" if incident --str << " (cause: #{u.counters.death_cause.to_s.downcase})," if u.counters.death_cause != -1 --str << " killed by the #{killer.race_tg.name[0]} #{killer.name}" if killer - str = DEATH_TYPES[i.death_info.death_cause]..PERIOD + str = DEATH_TYPES[i.incident.death_cause]..PERIOD pen = pens.MAGENTA elseif i.unit.flags2.slaughter and i.unit.flags2.killed then str = ' was slaughtered.'