Refactor minds to be entities with components, make roles components (#19591)

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
DrSmugleaf
2023-08-28 16:53:24 -07:00
committed by GitHub
parent e0ee397af7
commit 15c0211fb2
119 changed files with 1445 additions and 1289 deletions

View File

@@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Content.Server.Mind.Components
{
/// <summary>
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
/// Stores a <see cref="MindComponent"/> on a mob.
/// </summary>
[RegisterComponent, Access(typeof(MindSystem))]
public sealed partial class MindContainerComponent : Component
@@ -13,7 +13,7 @@ namespace Content.Server.Mind.Components
/// </summary>
[ViewVariables]
[Access(typeof(MindSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public Mind? Mind { get; set; }
public EntityUid? Mind { get; set; }
/// <summary>
/// True if we have a mind, false otherwise.
@@ -40,10 +40,12 @@ namespace Content.Server.Mind.Components
public sealed class MindRemovedMessage : EntityEventArgs
{
public Mind OldMind;
public EntityUid OldMindId;
public MindComponent OldMind;
public MindRemovedMessage(Mind oldMind)
public MindRemovedMessage(EntityUid oldMindId, MindComponent oldMind)
{
OldMindId = oldMindId;
OldMind = oldMind;
}
}