* 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
32 lines
1.0 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|