using Content.Shared.DoAfter;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared._DV.NodeCrawl;
///
/// Handles entities that can enter and exit node-constrained movement.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
[Access(typeof(SharedNodeCrawlSystem))]
public sealed partial class NodeCrawlerComponent : Component
{
///
/// The mover this crawler is currently being carried by, if any
///
[DataField, AutoNetworkedField]
public EntityUid? Mover;
///
/// Components of entities to reveal while inside a mover
///
[DataField(readOnly: true)]
public Type[] RevealedComponents;
///
/// Whitelist for entities that will be considered as exit nodes.
///
[DataField]
public EntityWhitelist? ExitNodes;
///
/// How long it takes to enter a node.
///
[DataField, AutoNetworkedField]
public TimeSpan EnterDelay = TimeSpan.FromSeconds(0.5f);
///
/// How long it takes to enter the node if entity is zombified.
///
[DataField]
public TimeSpan ZombieEnterDelay = TimeSpan.FromSeconds(2.0f);
}
[Serializable, NetSerializable]
public sealed partial class NodeCrawlEnterDoAfterEvent : SimpleDoAfterEvent;
[ByRefEvent]
public readonly record struct NodeCrawlerStartedCrawlingEvent(Entity Mover);