- Soft-cool kill, courtship, intent, construction, status fx, hatch, rest, and worldlog meta - Block cooled tips from resuming after a cut-in - Name only dead theater partners in stands-over aftermath - Add harness gates through 0.28.54
77 lines
2.8 KiB
C#
77 lines
2.8 KiB
C#
namespace IdleSpectator;
|
|
|
|
/// <summary>Subject-led orange Labels for synthetic story aftermath / epilogue beats.</summary>
|
|
public static class StoryReason
|
|
{
|
|
public const string AftermathSurvivor = "aftermath_survivor";
|
|
public const string AftermathMourner = "aftermath_mourner";
|
|
public const string AftermathWarLinger = "aftermath_war_linger";
|
|
public const string AftermathPlotFallout = "aftermath_plot_fallout";
|
|
public const string AftermathLoveLinger = "aftermath_love_linger";
|
|
public const string EpilogueRelated = "epilogue_related";
|
|
|
|
public static bool IsStoryAsset(string assetId)
|
|
{
|
|
if (string.IsNullOrEmpty(assetId))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return assetId.StartsWith("aftermath_", System.StringComparison.OrdinalIgnoreCase)
|
|
|| assetId.StartsWith("epilogue_", System.StringComparison.OrdinalIgnoreCase);
|
|
}
|
|
|
|
public static string AftermathLabel(string assetId, Actor follow, Actor related)
|
|
{
|
|
string name = EventFeedUtil.SafeName(follow);
|
|
if (string.IsNullOrEmpty(name))
|
|
{
|
|
name = "Someone";
|
|
}
|
|
|
|
string other = EventFeedUtil.SafeName(related);
|
|
string id = (assetId ?? "").Trim().ToLowerInvariant();
|
|
switch (id)
|
|
{
|
|
case AftermathMourner:
|
|
return string.IsNullOrEmpty(other)
|
|
? name + " mourns the fallen"
|
|
: name + " mourns " + other;
|
|
case AftermathWarLinger:
|
|
return name + " lingers on the war front";
|
|
case AftermathPlotFallout:
|
|
return name + " faces the plot's fallout";
|
|
case AftermathLoveLinger:
|
|
return string.IsNullOrEmpty(other)
|
|
? name + " stays with their love"
|
|
: name + " stays beside " + other;
|
|
case EpilogueRelated:
|
|
return string.IsNullOrEmpty(other)
|
|
? name + " carries on after the story"
|
|
: name + " seeks " + other + " after the story";
|
|
case AftermathSurvivor:
|
|
default:
|
|
// Only name a dead theater partner. Living lover/friend fallbacks must never
|
|
// print as the fallen (soak: "stands over Clemond" after a duel vs someone else).
|
|
if (related != null)
|
|
{
|
|
bool dead = false;
|
|
try
|
|
{
|
|
dead = !related.isAlive();
|
|
}
|
|
catch
|
|
{
|
|
dead = true;
|
|
}
|
|
|
|
if (dead && !string.IsNullOrEmpty(other))
|
|
{
|
|
return name + " stands over " + other;
|
|
}
|
|
}
|
|
|
|
return name + " stands over the fallen";
|
|
}
|
|
}
|
|
}
|