Files
Delta-v/Content.Shared/_DV/Abilities/CrawlUnderObjectsComponent.cs
T
deltanedasanddeltanedas 92a1e0dfc6 rodentia crawling refactor (#2754)
* make draw depth stuff reusable and good

* rodentia crawling refactor

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2025-01-16 15:28:03 +00:00

44 lines
1.2 KiB
C#

using Content.Shared.Actions;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared._DV.Abilities;
/// <summary>
/// Gives the player an action to sneak under tables at a slower move speed.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class CrawlUnderObjectsComponent : Component
{
[DataField]
public EntityUid? ToggleHideAction;
[DataField(required: true)]
public EntProtoId ActionProto;
[DataField, AutoNetworkedField]
public bool Enabled;
/// <summary>
/// List of fixtures that had their collision mask changed.
/// Required for re-adding the collision mask.
/// </summary>
[DataField]
public List<(string key, int originalMask)> ChangedFixtures = new();
[DataField]
public float SneakSpeedModifier = 0.7f;
}
[Serializable, NetSerializable]
public enum SneakingVisuals : byte
{
Sneaking
}
public sealed partial class ToggleCrawlingStateEvent : InstantActionEvent;
[ByRefEvent]
public readonly record struct CrawlingUpdatedEvent(bool Enabled, CrawlUnderObjectsComponent Comp);