namespace IdleSpectator;
/// One row in the Lore panel Living / Fallen tabs.
public sealed class ChronicleCharacterSummary
{
public long UnitId;
public string Name = "";
public string SpeciesId = "";
public int HistoryCount;
public bool IsFavorite;
public bool IsAlive;
public bool IsRecent;
public int RecentIndex = -1;
public DeathManner DeathManner;
/// Newest event time for Fallen sort (unscaledTime).
public float SortTime;
public string Title
{
get
{
if (string.IsNullOrEmpty(Name))
{
return SpeciesId ?? "creature";
}
if (string.IsNullOrEmpty(SpeciesId))
{
return Name;
}
return Name + " (" + SpeciesId + ")";
}
}
public string DeathLabel =>
!IsAlive ? Chronicle.DeathMannerLabel(DeathManner) : "";
public string Detail
{
get
{
string hist = HistoryCount <= 0 ? "no history" : HistoryCount + " events";
if (!IsAlive && DeathManner != DeathManner.None)
{
return DeathLabel + " ยท " + hist;
}
return hist;
}
}
}