GibbableComponent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. using Content.Shared.Gibbing.Systems;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Gibbing.Components;
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(GibbingSystem))]
  7. public sealed partial class GibbableComponent : Component
  8. {
  9. /// <summary>
  10. /// Giblet entity prototypes to randomly select from when spawning additional giblets
  11. /// </summary>
  12. [DataField, AutoNetworkedField]
  13. public List<EntProtoId> GibPrototypes = new();
  14. /// <summary>
  15. /// Number of giblet entities to spawn in addition to entity contents
  16. /// </summary>
  17. [DataField, AutoNetworkedField]
  18. public int GibCount;
  19. /// <summary>
  20. /// Sound to be played when this entity is gibbed, only played when playsound is true on the gibbing function
  21. /// </summary>
  22. [DataField, AutoNetworkedField]
  23. public SoundSpecifier? GibSound = new SoundCollectionSpecifier("gib", AudioParams.Default.WithVariation(0.025f));
  24. /// <summary>
  25. /// Max distance giblets can be dropped from an entity when NOT using physics-based scattering
  26. /// </summary>
  27. [DataField, AutoNetworkedField]
  28. public float GibScatterRange = 0.3f;
  29. }