Revert "Mind ecs" (#14881)

This commit is contained in:
Leon Friedrich
2023-03-27 10:24:00 +13:00
committed by GitHub
parent c6c8fa2075
commit 4d71b1b81e
85 changed files with 684 additions and 1150 deletions

View File

@@ -1,13 +1,10 @@
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
public sealed class MindComponent : Component
{
/// <summary>
/// The mind controlling this mob. Can be null.
@@ -20,7 +17,6 @@ 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,8 +3,14 @@ namespace Content.Server.Mind.Components
[RegisterComponent]
public sealed class VisitingMindComponent : Component
{
[ViewVariables]
public Mind Mind { get; set; } = default!;
[ViewVariables] public Mind Mind { get; set; } = default!;
protected override void OnRemove()
{
base.OnRemove();
Mind?.UnVisit();
}
}
public sealed class MindUnvisitedMessage : EntityEventArgs