* Converted all SnapGridPositionChangedEvent subscriptions to AnchorStateChangedEvent. * Fixes power tests with new anchored requirements. * Moved AnchorableComponent into construction. AnchorableComponent now uses Transform.Anchored. * Fixed bug with nodes, power works again. * Adds lifetime stages to Component. * Update Engine to v0.4.70.
28 lines
701 B
C#
28 lines
701 B
C#
using Robust.Client.GameObjects;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Log;
|
|
|
|
namespace Content.Client.Singularity.Components
|
|
{
|
|
public class ContainmentFieldComponent : Component
|
|
{
|
|
public override string Name => "Containment Field";
|
|
|
|
private SpriteComponent? _spriteComponent;
|
|
|
|
protected override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
if (!Owner.TryGetComponent(out _spriteComponent))
|
|
{
|
|
Logger.Error("Containmentfieldcomponent created without spritecomponent");
|
|
}
|
|
else
|
|
{
|
|
_spriteComponent.Directional = false;
|
|
}
|
|
}
|
|
}
|
|
}
|