30 lines
1.0 KiB
C#
30 lines
1.0 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>
|
|
/// 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();
|
|
}
|