CatStation/Content.Shared/Ensnaring/Components/EnsnareableComponent.cs
Ewanderer d7f7a91183
Documentation of e api (#44395)
* documentation pass on content.server -> E!

* APi pass on content.server for the E folder.

* documentation pass on content.shared for e.

* Apply suggestions from code review

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>

* fixing documentation according to review part 1.

* typo

* Very minor fixes

* And a short explanation about EUI

---------

Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
2026-07-01 08:38:04 +00:00

60 lines
1.6 KiB
C#

using Content.Shared.Alert;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Ensnaring.Components;
/// <summary>
/// Use this on an entity that you would like to be ensnared by anything that has the <see cref="EnsnaringComponent"/>
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
[Access(typeof(SharedEnsnareableSystem))]
public sealed partial class EnsnareableComponent : Component
{
/// <summary>
/// How much should this slow down the entities walk?
/// </summary>
[DataField, AutoNetworkedField]
public float WalkSpeed = 1.0f;
/// <summary>
/// How much should this slow down the entities sprint?
/// </summary>
[DataField, AutoNetworkedField]
public float SprintSpeed = 1.0f;
/// <summary>
/// The container where the <see cref="EnsnaringComponent"/> entity will be stored
/// </summary>
public Container? Container = default!;
/// <summary>
/// The sprite to show in the ensnared entity.
/// </summary>
[DataField]
public string? Sprite;
/// <summary>
/// The state layer of the sprite to be displayed.
/// </summary>
[DataField]
public string? State;
/// <summary>
/// The alert displayed when ensnared.
/// </summary>
[DataField]
public ProtoId<AlertPrototype> EnsnaredAlert = "Ensnared";
}
public sealed partial class RemoveEnsnareAlertEvent : BaseAlertEvent;
public sealed class EnsnaredChangedEvent : EntityEventArgs
{
public readonly bool IsEnsnared;
public EnsnaredChangedEvent(bool isEnsnared)
{
IsEnsnared = isEnsnared;
}
}