Files
wwdpublic/Content.Shared/Body/Components/BodyComponent.cs
vanx 7e2cd40a2c [Add] Minimal Movement Speed (#593)
* crawling in my sleeeeeeeeeep

* fix

---------

Co-authored-by: vanx <discord@vanxxxx>
2025-06-18 09:22:18 +03:00

54 lines
1.5 KiB
C#

using Content.Shared.Body.Prototypes;
using Content.Shared.Body.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Body.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedBodySystem))]
public sealed partial class BodyComponent : Component
{
/// <summary>
/// Relevant template to spawn for this body.
/// </summary>
[DataField, AutoNetworkedField]
public ProtoId<BodyPrototype>? Prototype;
/// <summary>
/// Container that holds the root body part.
/// </summary>
/// <remarks>
/// Typically is the torso.
/// </remarks>
[ViewVariables] public ContainerSlot RootContainer = default!;
[ViewVariables]
public string RootPartSlot => RootContainer.ID;
[DataField, AutoNetworkedField]
public SoundSpecifier GibSound = new SoundCollectionSpecifier("gib");
/// <summary>
/// The amount of legs required to move at full speed.
/// If 0, then legs do not impact speed.
/// </summary>
[DataField, AutoNetworkedField]
public int RequiredLegs;
[ViewVariables]
[DataField, AutoNetworkedField]
public HashSet<EntityUid> LegEntities = new();
[DataField, AutoNetworkedField]
public bool ThermalVisibility = true;
/// <summary>
/// WWDP; Minimal move speed regardless of any bodyparts
/// </summary>
[DataField, AutoNetworkedField]
public float MinimumMovementSpeed = 1f;
}