24 lines
717 B
C#
24 lines
717 B
C#
using System.Threading.Tasks;
|
|
using Content.Shared.Construction;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.Physics;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Server.Construction.Completions
|
|
{
|
|
[UsedImplicitly]
|
|
[DataDefinition]
|
|
public class SetAnchor : IGraphAction
|
|
{
|
|
[DataField("value")] public bool Value { get; private set; } = true;
|
|
|
|
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
|
|
{
|
|
var transform = entityManager.GetComponent<TransformComponent>(uid);
|
|
transform.Anchored = Value;
|
|
}
|
|
}
|
|
}
|