Merge branch 'phase/46-speech-home'
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # docs/phases/09-social/README.md # src/HSchool.Server/Game/SchoolWorker.cs # tests/HSchool.Ai.Tests/TalkCirclesTests.cs # tests/HSchool.Simulation.Tests/MorningOpinionsTests.cs # tests/HSchool.Simulation.Tests/TalkCircleTests.cs
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user