decouple briefing from traitor (#19668)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -17,7 +17,18 @@ public sealed class RoleSystem : SharedRoleSystem
|
||||
|
||||
public string? MindGetBriefing(EntityUid? mindId)
|
||||
{
|
||||
// TODO this should be an event
|
||||
return CompOrNull<TraitorRoleComponent>(mindId)?.Briefing;
|
||||
if (mindId == null)
|
||||
return null;
|
||||
|
||||
var ev = new GetBriefingEvent();
|
||||
RaiseLocalEvent(mindId.Value, ref ev);
|
||||
return ev.Briefing;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event raised on the mind to get its briefing.
|
||||
/// Handlers can either replace or append to the briefing, whichever is more appropriate.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct GetBriefingEvent(string? Briefing = null);
|
||||
|
||||
Reference in New Issue
Block a user