36 lines
1003 B
C#
36 lines
1003 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<InitialInfectedRoleComponent>();
|
|
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);
|