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

@@ -1,10 +1,13 @@
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 MindComponent : Component
public sealed class MindContainerComponent : Component
{
/// <summary>
/// The mind controlling this mob. Can be null.
@@ -17,6 +20,7 @@ namespace Content.Server.Mind.Components
/// True if we have a mind, false otherwise.
/// </summary>
[ViewVariables]
[MemberNotNullWhen(true, nameof(Mind))]
public bool HasMind => Mind != null;
/// <summary>

View File

@@ -3,14 +3,8 @@ namespace Content.Server.Mind.Components
[RegisterComponent]
public sealed class VisitingMindComponent : Component
{
[ViewVariables] public Mind Mind { get; set; } = default!;
protected override void OnRemove()
{
base.OnRemove();
Mind?.UnVisit();
}
[ViewVariables]
public Mind Mind { get; set; } = default!;
}
public sealed class MindUnvisitedMessage : EntityEventArgs