Files
crystall-punk-14/Content.Server/Roles/RoleSystem.cs
deltanedas 7842f0d055 decouple briefing from traitor (#19668)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-08-31 14:29:45 -07:00

35 lines
941 B
C#

using Content.Shared.Roles;
namespace Content.Server.Roles;
public sealed class RoleSystem : SharedRoleSystem
{
public override void Initialize()
{
// TODO make roles entities
base.Initialize();
SubscribeAntagEvents<NukeopsRoleComponent>();
SubscribeAntagEvents<SubvertedSiliconRoleComponent>();
SubscribeAntagEvents<TraitorRoleComponent>();
SubscribeAntagEvents<ZombieRoleComponent>();
}
public string? MindGetBriefing(EntityUid? mindId)
{
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);