BodyComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Content.Shared.Body.Prototypes;
  2. using Content.Shared.Body.Systems;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Containers;
  5. using Robust.Shared.GameStates;
  6. using Robust.Shared.Prototypes;
  7. namespace Content.Shared.Body.Components;
  8. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  9. [Access(typeof(SharedBodySystem))]
  10. public sealed partial class BodyComponent : Component
  11. {
  12. /// <summary>
  13. /// Relevant template to spawn for this body.
  14. /// </summary>
  15. [DataField, AutoNetworkedField]
  16. public ProtoId<BodyPrototype>? Prototype;
  17. /// <summary>
  18. /// Container that holds the root body part.
  19. /// </summary>
  20. /// <remarks>
  21. /// Typically is the torso.
  22. /// </remarks>
  23. [ViewVariables] public ContainerSlot RootContainer = default!;
  24. [ViewVariables]
  25. public string RootPartSlot => RootContainer.ID;
  26. [DataField, AutoNetworkedField]
  27. public SoundSpecifier GibSound = new SoundCollectionSpecifier("gib");
  28. /// <summary>
  29. /// The amount of legs required to move at full speed.
  30. /// If 0, then legs do not impact speed.
  31. /// </summary>
  32. [DataField, AutoNetworkedField]
  33. public int RequiredLegs;
  34. [ViewVariables]
  35. [DataField, AutoNetworkedField]
  36. public HashSet<EntityUid> LegEntities = new();
  37. }