using Content.Shared.Construction;
using Content.Shared.Wires;
using JetBrains.Annotations;
namespace Content.Server.Construction.Completions;
///
/// This graph action is used to set values on entities with the
///
[UsedImplicitly]
[DataDefinition]
public sealed partial class SetWiresPanelSecurity : IGraphAction
{
///
/// Sets the Examine field on the entity's
///
[DataField("examine")]
public string Examine = string.Empty;
///
/// Sets the WiresAccessible field on the entity's
///
[DataField("wiresAccessible")]
public bool WiresAccessible = true;
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
if (entityManager.TryGetComponent(uid, out WiresPanelSecurityComponent? _))
{
var ev = new WiresPanelSecurityEvent(Examine, WiresAccessible);
entityManager.EventBus.RaiseLocalEvent(uid, ev);
}
}
}