Add EventDef notices, morning and lesson bells, and info toasts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 20:46:33 +03:00
co-authored by Cursor
parent ea3f5c7bf1
commit a554738084
38 changed files with 952 additions and 22 deletions
+38
View File
@@ -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;
}