Retry a failed portrait from the notice with the same scene builder.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-21 01:48:30 +03:00
co-authored by Cursor
parent 3c70227229
commit 3061e09d3e
32 changed files with 712 additions and 105 deletions
+14 -1
View File
@@ -237,6 +237,10 @@ internal sealed class GameLoopService(
HandlePostNotice(postNotice);
break;
case GameCommand.GetNoticePortraitTarget getTarget:
HandleGetNoticePortraitTarget(getTarget);
break;
case GameCommand.ReloadSaves reload:
await HandleReloadAsync(reload).ConfigureAwait(false);
break;
@@ -690,12 +694,21 @@ internal sealed class GameLoopService(
private void HandlePostNotice(GameCommand.PostSchoolNotice command)
{
if (!_workers.TryGetValue(command.SchoolId, out var worker)
|| !worker.Post(new WorkerCommand.PostNotice(command.DefName, command.PersonId, command.Result)))
|| !worker.Post(new WorkerCommand.PostNotice(command.DefName, command.PersonKey, command.Kind, command.Result)))
{
command.Result.TrySetResult(null);
}
}
private void HandleGetNoticePortraitTarget(GameCommand.GetNoticePortraitTarget command)
{
if (!_workers.TryGetValue(command.SchoolId, out var worker)
|| !worker.Post(new WorkerCommand.GetNoticePortraitTarget(command.NoticeId, command.Result)))
{
command.Result.TrySetResult(NoticePortraitTarget.UnknownSchool);
}
}
private async Task StartWorkersFromDiskAsync()
{
var saves = store.LoadAll();