Add speech-topic policy from tomorrow and a morning family talk.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 13:53:12 +03:00
co-authored by Cursor
parent 5e147a8e47
commit 92c2143329
31 changed files with 909 additions and 35 deletions
+13 -5
View File
@@ -11,7 +11,7 @@ internal sealed class ActiveTalkCircle
public required string ActionId { get; init; }
public required string TopicId { get; init; }
public required string TopicId { get; set; }
public required string NodeId { get; init; }
@@ -227,8 +227,12 @@ internal static class TalkCircleSystem
school.Catalog!,
initiator,
initiator.AgeOn(school.Clock.Time),
Seed.Mix(school.PeopleSeed, initiator.Id, DateOnly.FromDateTime(school.Clock.Time).DayNumber, Seed.ApparelSalt + 20))
?? school.Catalog!.Topics.Values.First(topic => !topic.Abstract).DefName;
Seed.Mix(school.PeopleSeed, initiator.Id, DateOnly.FromDateTime(school.Clock.Time).DayNumber, Seed.ApparelSalt + 20),
speechPolicy: school.SpeechRules.For(initiator.IsStudent));
if (topicId is null)
{
return false;
}
var circle = new ActiveTalkCircle
{
@@ -272,7 +276,8 @@ internal static class TalkCircleSystem
initiator,
initiator.AgeOn(school.Clock.Time),
Seed.Mix(school.PeopleSeed, initiator.Id, DateOnly.FromDateTime(school.Clock.Time).DayNumber, Seed.ApparelSalt + 21),
whisperOnLesson: TalkActions.IsWhisper(action.DefName));
whisperOnLesson: TalkActions.IsWhisper(action.DefName),
speechPolicy: school.SpeechRules.For(initiator.IsStudent));
if (TalkActions.IsTeacherTalk(action.DefName))
{
topicId = TalkCircles.PickTeacherTopic(
@@ -281,7 +286,10 @@ internal static class TalkCircleSystem
Seed.Mix(school.PeopleSeed, initiator.Id, DateOnly.FromDateTime(school.Clock.Time).DayNumber, Seed.WhisperSalt));
}
topicId ??= school.Catalog.Topics.Values.First(topic => !topic.Abstract).DefName;
if (topicId is null)
{
return false;
}
var circle = new ActiveTalkCircle
{