Files
tbd-station-14/Content.Server/GameObjects/Components/PA/ParticleAcceleratorPartComponent.cs
Pieter-Jan Briers 251df93b71 Remove usages of AnchoredChangedMessage.
It was a component message which is now deprecated.
2021-05-13 02:05:46 +02:00

42 lines
910 B
C#

#nullable enable
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.PA
{
public abstract class ParticleAcceleratorPartComponent : Component
{
[ViewVariables] public ParticleAcceleratorControlBoxComponent? Master;
public override void Initialize()
{
base.Initialize();
// FIXME: this has to be an entity system, full stop.
Owner.Transform.Anchored = true;
}
public void OnAnchorChanged()
{
RescanIfPossible();
}
public override void OnRemove()
{
base.OnRemove();
RescanIfPossible();
}
private void RescanIfPossible()
{
Master?.RescanParts();
}
public virtual void Rotated()
{
RescanIfPossible();
}
}
}