Files
tbd-station-14/Content.Server/Electrocution/ElectrocutionNode.cs
metalgearsloth bd69fc612a Predicted internals (#33800)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
2025-05-02 18:22:29 +10:00

32 lines
1.0 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(TransformComponent xform,
EntityQuery<NodeContainerComponent> nodeQuery,
EntityQuery<TransformComponent> xformQuery,
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;
}
}
}