namespace IdleSpectator;
///
/// Shared catalog row for discrete / library-backed spectator events.
/// Lives in Events/ with - catalogs own dials; director only ranks.
///
public sealed class DiscreteEventEntry
{
public string Id = "";
public float EventStrength = 50f;
public string Category = "Event";
public bool CreatesInterest = true;
public string LabelTemplate = "{a}";
///
/// Optional infinitive clause for decision-style reasons
/// (e.g. change the kingdom's culture → {a} decides to …).
///
public string ActionPhrase = "";
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;
string displayId = string.IsNullOrEmpty(Id) ? "" : EventReason.HumanizeId(Id);
return template
.Replace("{id}", displayId)
.Replace("{a}", a ?? "")
.Replace("{b}", b ?? "");
}
}