Files
Delta-v/Content.Shared/_DV/NodeCrawl/CrawlableNodeComponent.cs
T
pathetic meowmeow e9a1e53279 Fix nodecrawl connecting to invalid nodes (#6149)
* Fix nodecrawl connecting to invalid nodes

* pain

* recycled
2026-07-01 12:41:06 -05:00

36 lines
1.2 KiB
C#

using Robust.Shared.GameStates;
namespace Content.Shared._DV.NodeCrawl;
/// <summary>
/// Represents an entity in a node network that can be crawled in
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedNodeCrawlSystem), typeof(NodeCrawlerMovementSystem))]
public sealed partial class CrawlableNodeComponent : Component
{
/// <summary>
/// Node types that can be connected to by this node
/// </summary>
[DataField(required: true)]
public List<string> ReachableNodeTypes = new();
/// <summary>
/// Other entities with <see cref="CrawlableNodeComponent" /> that can be reached from this one
/// </summary>
[ViewVariables, AutoNetworkedField]
public HashSet<EntityUid> ReachableNodes = new();
/// <summary>
/// Whether this node has an unconnected node and should be exited from on movement
/// </summary>
[ViewVariables, AutoNetworkedField]
public bool DeadEnd;
/// <summary>
/// All entities with <see cref="NodeCrawlerMovementComponent" /> that are associated with this one
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<EntityUid> Crawlers = new();
}