Files
tbd-station-14/Content.Server/Mind/Components/MindComponent.cs
Vera Aguilera Puerto 675a29ed33 ECS MindComponent (#5917)
2022-01-04 13:37:50 +01:00

59 lines
1.7 KiB
C#

using Content.Server.GameTicking;
using Content.Server.Ghost.Components;
using Content.Shared.Examine;
using Content.Shared.Ghost;
using Content.Shared.MobState.Components;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.Mind.Components
{
/// <summary>
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
/// </summary>
[RegisterComponent, ComponentProtoName("Mind"), Friend(typeof(MindSystem))]
public class MindComponent : Component
{
/// <summary>
/// The mind controlling this mob. Can be null.
/// </summary>
[ViewVariables]
public Mind? Mind { get; set; }
/// <summary>
/// True if we have a mind, false otherwise.
/// </summary>
[ViewVariables]
public bool HasMind => Mind != null;
/// <summary>
/// Whether examining should show information about the mind or not.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("showExamineInfo")]
public bool ShowExamineInfo { get; set; }
/// <summary>
/// Whether the mind will be put on a ghost after this component is shutdown.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("ghostOnShutdown")]
public bool GhostOnShutdown { get; set; } = true;
}
public class MindRemovedMessage : EntityEventArgs
{
}
public class MindAddedMessage : EntityEventArgs
{
}
}