Retry a failed portrait from the notice with the same scene builder.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user