35
Content.Server/Containers/ThrowInsertContainerComponent.cs
Normal file
35
Content.Server/Containers/ThrowInsertContainerComponent.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Containers;
|
||||
|
||||
/// <summary>
|
||||
/// Allows objects to fall inside the Container when thrown
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(ThrowInsertContainerSystem))]
|
||||
public sealed partial class ThrowInsertContainerComponent : Component
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public string? ContainerId;
|
||||
|
||||
/// <summary>
|
||||
/// Throw chance of hitting into the container
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float Probability = 0.75f;
|
||||
|
||||
/// <summary>
|
||||
/// Sound played when an object is throw into the container.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public SoundSpecifier? InsertSound = new SoundPathSpecifier("/Audio/Effects/trashbag1.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Sound played when an item is thrown and misses the container.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public SoundSpecifier? MissSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg");
|
||||
|
||||
[DataField]
|
||||
public LocId MissLocString = "container-thrown-missed";
|
||||
}
|
||||
Reference in New Issue
Block a user