mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* documentation pass on content.server -> E! * APi pass on content.server for the E folder. * documentation pass on content.shared for e. * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * fixing documentation according to review part 1. * typo * Very minor fixes * And a short explanation about EUI --------- Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
35 lines
1 KiB
C#
35 lines
1 KiB
C#
using Content.Server.NodeContainer;
|
|
using Content.Server.NodeContainer.EntitySystems;
|
|
using Content.Server.NodeContainer.Nodes;
|
|
using Content.Shared.NodeContainer;
|
|
using Robust.Shared.Map.Components;
|
|
|
|
namespace Content.Server.Electrocution
|
|
{
|
|
|
|
[DataDefinition]
|
|
public sealed partial class ElectrocutionNode : Node
|
|
{
|
|
|
|
[DataField("cable")]
|
|
public EntityUid? CableEntity;
|
|
|
|
[DataField("node")]
|
|
public string? NodeName;
|
|
|
|
public override IEnumerable<Node> GetReachableNodes(
|
|
Entity<TransformComponent> xform,
|
|
EntityQuery<NodeContainerComponent> nodeQuery,
|
|
EntityQuery<TransformComponent> xformQuery,
|
|
Entity<MapGridComponent>? grid,
|
|
IEntityManager entMan)
|
|
{
|
|
if (CableEntity == null || NodeName == null)
|
|
yield break;
|
|
|
|
var _nodeContainer = entMan.System<NodeContainerSystem>();
|
|
if (_nodeContainer.TryGetNode(CableEntity.Value, NodeName, out Node? node))
|
|
yield return node;
|
|
}
|
|
}
|
|
}
|