]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Things that can't go in disposals now don't "Miss" (#26716)
authorbeck-thompson <107373427+beck-thompson@users.noreply.github.com>
Thu, 4 Apr 2024 06:25:47 +0000 (23:25 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 06:25:47 +0000 (17:25 +1100)
* 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>
Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs

index 8a7ea438be20fc8eb1cbd70d4f45fd379097387d..ba84546258738b3f6bd80373176ea87a63d6c22b 100644 (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);