using Content.Server.Antag; using Content.Server.Traitor.Components; using Content.Shared.Mind.Components; using Robust.Shared.Prototypes; namespace Content.Server.Traitor.Systems; /// /// Makes entities with a traitor either immediately if they have a mind or when a mind is added. /// public sealed class AutoTraitorSystem : EntitySystem { [Dependency] private readonly AntagSelectionSystem _antag = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnMindAdded); } private void OnMindAdded(EntityUid uid, AutoTraitorComponent comp, MindAddedMessage args) { _antag.ForceMakeAntag(args.Mind.Comp.Session, comp.Profile); } }