52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
namespace IdleSpectator;
|
|
|
|
/// <summary>One row in the Lore panel Living / Fallen tabs.</summary>
|
|
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;
|
|
/// <summary>Newest event time for Fallen sort (unscaledTime).</summary>
|
|
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;
|
|
}
|
|
}
|
|
}
|