ThrowInsertContainerComponent.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Robust.Shared.Audio;
  2. namespace Content.Server.Containers;
  3. /// <summary>
  4. /// Allows objects to fall inside the Container when thrown
  5. /// </summary>
  6. [RegisterComponent]
  7. [Access(typeof(ThrowInsertContainerSystem))]
  8. public sealed partial class ThrowInsertContainerComponent : Component
  9. {
  10. [DataField(required: true)]
  11. public string ContainerId = string.Empty;
  12. /// <summary>
  13. /// Throw chance of hitting into the container
  14. /// </summary>
  15. [DataField]
  16. public float Probability = 0.75f;
  17. /// <summary>
  18. /// Sound played when an object is throw into the container.
  19. /// </summary>
  20. [DataField]
  21. public SoundSpecifier? InsertSound = new SoundPathSpecifier("/Audio/Effects/trashbag1.ogg");
  22. /// <summary>
  23. /// Sound played when an item is thrown and misses the container.
  24. /// </summary>
  25. [DataField]
  26. public SoundSpecifier? MissSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg");
  27. [DataField]
  28. public LocId MissLocString = "container-thrown-missed";
  29. }