29 lines
895 B
C#
29 lines
895 B
C#
namespace IdleSpectator;
|
|
|
|
/// <summary>
|
|
/// Shared catalog row for discrete / library-backed spectator events.
|
|
/// Lives in <c>Events/</c> with <see cref="EventReason"/> - catalogs own dials; director only ranks.
|
|
/// </summary>
|
|
public sealed class DiscreteEventEntry
|
|
{
|
|
public string Id = "";
|
|
public float EventStrength = 50f;
|
|
public string Category = "Event";
|
|
public bool CreatesInterest = true;
|
|
public string LabelTemplate = "{a}";
|
|
public bool IsFallback;
|
|
|
|
public string MakeLabel(Actor a, Actor b = null)
|
|
{
|
|
return EventReason.Apply(LabelTemplate, a, b, Id);
|
|
}
|
|
|
|
public string MakeLabel(string a, string b)
|
|
{
|
|
string template = string.IsNullOrEmpty(LabelTemplate) ? "{id}" : LabelTemplate;
|
|
return template
|
|
.Replace("{id}", Id ?? "")
|
|
.Replace("{a}", a ?? "")
|
|
.Replace("{b}", b ?? "");
|
|
}
|
|
}
|