Add EventDef notices, morning and lesson bells, and info toasts.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
namespace HSchool.Content;
|
||||
|
||||
public static class EventSeverities
|
||||
{
|
||||
public const string Info = "info";
|
||||
public const string Warning = "warning";
|
||||
public const string Error = "error";
|
||||
}
|
||||
|
||||
public static class EventTriggers
|
||||
{
|
||||
public const string DayStart = "dayStart";
|
||||
public const string LessonStart = "lessonStart";
|
||||
public const string GenerationFailed = "generationFailed";
|
||||
}
|
||||
|
||||
public static class EventActions
|
||||
{
|
||||
public const string None = "none";
|
||||
public const string GenerateImage = "generateImage";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A fact the world can raise. Systems emit a trigger; the worker matches this def and builds a notice.
|
||||
/// </summary>
|
||||
public sealed class EventDef : Def
|
||||
{
|
||||
public string Severity { get; init; } = EventSeverities.Info;
|
||||
|
||||
public bool Pause { get; init; }
|
||||
|
||||
/// <summary>Client toast lifetime in milliseconds. Zero means it stays until dismiss.</summary>
|
||||
public int TtlMs { get; init; }
|
||||
|
||||
public string Trigger { get; init; } = "";
|
||||
|
||||
public string Action { get; init; } = EventActions.None;
|
||||
}
|
||||
Reference in New Issue
Block a user