Things that can't go in disposals now don't "Miss" (#26716)

* Moved is canInsert check to before miss check

* Update Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
beck-thompson
2024-04-03 23:25:47 -07:00
committed by GitHub
parent 36fefb99f0
commit b709e24d87

View File

@@ -299,7 +299,12 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
var canInsert = CanInsert(uid, component, args.Thrown);
var randDouble = _robustRandom.NextDouble();
if (!canInsert || randDouble > 0.75)
if (!canInsert)
{
return;
}
if (randDouble > 0.75)
{
_audioSystem.PlayPvs(component.MissSound, uid);