Files
tbd-station-14/Content.Server/GameObjects/Components/Singularity/ContainmentFieldComponent.cs
Pieter-Jan Briers 1eb0fbd8d0 Revert "Physics (#3452)"
This reverts commit 3e64fd56a1.
2021-02-28 18:49:48 +01:00

24 lines
577 B
C#

#nullable enable
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Singularity
{
[RegisterComponent]
public class ContainmentFieldComponent : Component, ICollideBehavior
{
public override string Name => "ContainmentField";
public ContainmentFieldConnection? Parent;
public void CollideWith(IEntity collidedWith)
{
if (Parent == null)
{
Owner.Delete();
return;
}
Parent.TryRepell(Owner, collidedWith);
}
}
}