Retry a failed portrait from the notice with the same scene builder.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -29,9 +29,14 @@ internal abstract record WorkerCommand
|
||||
/// <summary>Test/dev post onto the school board. Looks up an EventDef by name.</summary>
|
||||
internal sealed record PostNotice(
|
||||
string DefName,
|
||||
uint PersonId,
|
||||
string PersonKey,
|
||||
string Kind,
|
||||
TaskCompletionSource<PostedNotice?> Result) : WorkerCommand;
|
||||
|
||||
internal sealed record GetNoticePortraitTarget(
|
||||
uint NoticeId,
|
||||
TaskCompletionSource<NoticePortraitTarget> Result) : WorkerCommand;
|
||||
|
||||
internal sealed record Dump(TaskCompletionSource<SchoolLiveDump?> Result) : WorkerCommand;
|
||||
|
||||
internal sealed record GetPerson(
|
||||
@@ -96,3 +101,29 @@ internal abstract record WorkerCommand
|
||||
}
|
||||
|
||||
internal sealed record PostedNotice(uint Id, string DefName, bool Pause);
|
||||
|
||||
internal enum NoticePortraitTargetError
|
||||
{
|
||||
None,
|
||||
UnknownSchool,
|
||||
UnknownNotice,
|
||||
CannotGenerate,
|
||||
}
|
||||
|
||||
internal sealed record NoticePortraitTarget(
|
||||
NoticePortraitTargetError Error,
|
||||
string PersonId,
|
||||
PortraitKind Kind)
|
||||
{
|
||||
public static NoticePortraitTarget UnknownSchool { get; } =
|
||||
new(NoticePortraitTargetError.UnknownSchool, "", PortraitKind.Full);
|
||||
|
||||
public static NoticePortraitTarget UnknownNotice { get; } =
|
||||
new(NoticePortraitTargetError.UnknownNotice, "", PortraitKind.Full);
|
||||
|
||||
public static NoticePortraitTarget CannotGenerate { get; } =
|
||||
new(NoticePortraitTargetError.CannotGenerate, "", PortraitKind.Full);
|
||||
|
||||
public static NoticePortraitTarget Ok(string personId, PortraitKind kind) =>
|
||||
new(NoticePortraitTargetError.None, personId, kind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user