21 lines
621 B
C#
21 lines
621 B
C#
using Content.Shared.Construction;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Content.Server.Construction.Completions
|
|
{
|
|
[UsedImplicitly]
|
|
[DataDefinition]
|
|
public sealed partial class AddContainer : IGraphAction
|
|
{
|
|
[DataField("container")] public string? Container { get; private set; }
|
|
|
|
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
|
|
{
|
|
if (string.IsNullOrEmpty(Container))
|
|
return;
|
|
|
|
entityManager.EntitySysManager.GetEntitySystem<ConstructionSystem>().AddContainer(uid, Container);
|
|
}
|
|
}
|
|
}
|