This commit is contained in:
ShadowCommander
2023-06-18 11:33:19 -07:00
committed by GitHub
parent 8a943fb374
commit dd7032a860
85 changed files with 1432 additions and 711 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;
}
public sealed class MindUnvisitedMessage : EntityEventArgs