Add EventDef notices, morning and lesson bells, and info toasts.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -318,6 +318,7 @@ public sealed class CatalogLoader
|
||||
var topics = new Dictionary<string, TopicDef>(StringComparer.Ordinal);
|
||||
var orientations = new Dictionary<string, OrientationDef>(StringComparer.Ordinal);
|
||||
var affinity = new Dictionary<string, AffinityRulesDef>(StringComparer.Ordinal);
|
||||
var events = new Dictionary<string, EventDef>(StringComparer.Ordinal);
|
||||
|
||||
foreach (var (key, json) in resolved)
|
||||
{
|
||||
@@ -392,6 +393,9 @@ public sealed class CatalogLoader
|
||||
case DefKind.AffinityRules:
|
||||
affinity[key.Name] = Jsonc.Deserialize<AffinityRulesDef>(json);
|
||||
break;
|
||||
case DefKind.Event:
|
||||
events[key.Name] = Jsonc.Deserialize<EventDef>(json);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,6 +424,7 @@ public sealed class CatalogLoader
|
||||
topics,
|
||||
orientations,
|
||||
affinity,
|
||||
events,
|
||||
ru,
|
||||
en);
|
||||
}
|
||||
@@ -534,6 +539,7 @@ public sealed class CatalogLoader
|
||||
}
|
||||
|
||||
PeopleDefValidator.Validate(catalog, log);
|
||||
EventDefValidator.Validate(catalog);
|
||||
}
|
||||
|
||||
private static void WarnMissingLabels(DefCatalog catalog, IContentLog log)
|
||||
@@ -571,7 +577,8 @@ public sealed class CatalogLoader
|
||||
.Concat(Enumerate(catalog.Colors.Values))
|
||||
.Concat(Enumerate(catalog.Topics.Values))
|
||||
.Concat(Enumerate(catalog.Orientations.Values))
|
||||
.Concat(Enumerate(catalog.Affinity.Values));
|
||||
.Concat(Enumerate(catalog.Affinity.Values))
|
||||
.Concat(Enumerate(catalog.Events.Values));
|
||||
|
||||
static IEnumerable<Def> Enumerate(IEnumerable<Def> defs) => defs.Where(def => !def.Abstract);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user