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>
(cherry picked from commit b709e24d87670270a71b476d30346a1f110a4313)
This commit is contained in:
beck-thompson 2024-04-03 23:25:47 -07:00 committed by NullWanderer
parent 16e3b45130
commit 251ef32e94
No known key found for this signature in database
GPG Key ID: 65CF92BD1D26F4AC
1 changed files with 6 additions and 1 deletions

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);