This commit is contained in:
ShadowCommander
2023-03-26 11:31:13 -07:00
committed by GitHub
parent 0e5dc41fe8
commit bfc4da9377
85 changed files with 1150 additions and 684 deletions

View File

@@ -0,0 +1,48 @@
using System.Diagnostics.CodeAnalysis;
using YamlDotNet.Core.Tokens;
namespace Content.Server.Mind.Components
{
/// <summary>
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
/// </summary>
[RegisterComponent, Access(typeof(MindSystem))]
public sealed class MindContainerComponent : Component
{
/// <summary>
/// The mind controlling this mob. Can be null.
/// </summary>
[ViewVariables]
[Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public Mind? Mind { get; set; }
/// <summary>
/// True if we have a mind, false otherwise.
/// </summary>
[ViewVariables]
[MemberNotNullWhen(true, nameof(Mind))]
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 sealed class MindRemovedMessage : EntityEventArgs
{
}
public sealed class MindAddedMessage : EntityEventArgs
{
}
}