Files
tbd-station-14/Content.Server/Roles/RoleSystem.cs
deltanedas 24810d916b ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-10 16:20:27 +10:00

37 lines
1.0 KiB
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<NinjaRoleComponent>();
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);