using System.Diagnostics.CodeAnalysis; using YamlDotNet.Core.Tokens; namespace Content.Server.Mind.Components { /// /// Stores a on a mob. /// [RegisterComponent, Access(typeof(MindSystem))] public sealed class MindContainerComponent : Component { /// /// The mind controlling this mob. Can be null. /// [ViewVariables] [Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends public Mind? 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 sealed class MindAddedMessage : EntityEventArgs { } }