using System.Diagnostics.CodeAnalysis; namespace Content.Server.Mind.Components { /// /// Stores a on a mob. /// [RegisterComponent, Access(typeof(MindSystem))] public sealed partial class MindContainerComponent : Component { /// /// The mind controlling this mob. Can be null. /// [ViewVariables] [Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public EntityUid? Mind { get; set; } /// /// True if we have a mind, false otherwise. /// [ViewVariables] [MemberNotNullWhen(true, nameof(Mind))] public bool HasMind => Mind != null; /// /// Whether examining should show information about the mind or not. /// [ViewVariables(VVAccess.ReadWrite)] [DataField("showExamineInfo")] public bool ShowExamineInfo { get; set; } /// /// Whether the mind will be put on a ghost after this component is shutdown. /// [ViewVariables(VVAccess.ReadWrite)] [DataField("ghostOnShutdown")] [Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public bool GhostOnShutdown { get; set; } = true; } public sealed class MindRemovedMessage : EntityEventArgs { public EntityUid OldMindId; public MindComponent OldMind; public MindRemovedMessage(EntityUid oldMindId, MindComponent oldMind) { OldMindId = oldMindId; OldMind = oldMind; } } public sealed class MindAddedMessage : EntityEventArgs { } }