From b709e24d87670270a71b476d30346a1f110a4313 Mon Sep 17 00:00:00 2001 From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Wed, 3 Apr 2024 23:25:47 -0700 Subject: [PATCH] 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> --- .../Disposal/Unit/EntitySystems/DisposalUnitSystem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 8a7ea438be..ba84546258 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -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); -- 2.52.0