Throwing into disposals logic splitting (#27487)

* wtf

* fix
This commit is contained in:
Ed
2024-04-29 16:12:42 +03:00
committed by GitHub
parent 6b5e99f5eb
commit bf8002569c
7 changed files with 93 additions and 46 deletions

View 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";
}