remove a bunch of instances of component reference (#13164)

This commit is contained in:
Nemanja
2022-12-23 23:55:31 -05:00
committed by GitHub
parent 4a37f7b917
commit 6c04811e66
64 changed files with 355 additions and 537 deletions

View File

@@ -1,13 +0,0 @@
using Content.Shared.Ensnaring.Components;
using Robust.Shared.Containers;
namespace Content.Server.Ensnaring.Components;
[RegisterComponent]
[ComponentReference(typeof(SharedEnsnareableComponent))]
public sealed class EnsnareableComponent : SharedEnsnareableComponent
{
/// <summary>
/// The container where the <see cref="EnsnaringComponent"/> entity will be stored
/// </summary>
public Container Container = default!;
}

View File

@@ -1,43 +1,5 @@
using System.Threading;
using Content.Shared.Ensnaring.Components;
namespace Content.Server.Ensnaring.Components;
[RegisterComponent]
[ComponentReference(typeof(SharedEnsnaringComponent))]
public sealed class EnsnaringComponent : SharedEnsnaringComponent
{
/// <summary>
/// Should movement cancel breaking out?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canMoveBreakout")]
public bool CanMoveBreakout;
public CancellationTokenSource? CancelToken;
}
/// <summary>
/// Used for the do after event to free the entity that owns the <see cref="EnsnareableComponent"/>
/// </summary>
public sealed class FreeEnsnareDoAfterComplete : EntityEventArgs
{
public readonly EntityUid EnsnaringEntity;
public FreeEnsnareDoAfterComplete(EntityUid ensnaringEntity)
{
EnsnaringEntity = ensnaringEntity;
}
}
/// <summary>
/// Used for the do after event when it fails to free the entity that owns the <see cref="EnsnareableComponent"/>
/// </summary>
public sealed class FreeEnsnareDoAfterCancel : EntityEventArgs
{
public readonly EntityUid EnsnaringEntity;
public FreeEnsnareDoAfterCancel(EntityUid ensnaringEntity)
{
EnsnaringEntity = ensnaringEntity;
}
}