]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make throw insert container code more clear (#36873)
authorlzk <124214523+lzk228@users.noreply.github.com>
Wed, 7 May 2025 13:08:28 +0000 (15:08 +0200)
committerGitHub <noreply@github.com>
Wed, 7 May 2025 13:08:28 +0000 (15:08 +0200)
make throw insert container more clear

Content.Server/Containers/ThrowInsertContainerComponent.cs
Content.Server/Containers/ThrowInsertContainerSystem.cs

index 7eb5f4657d07a3c73da559a7a9f6c7a5def522c5..9dd6cfe72c617251f9f256e82d2f3d6898405612 100644 (file)
@@ -16,7 +16,7 @@ public sealed partial class ThrowInsertContainerComponent : Component
     /// Throw chance of hitting into the container
     /// </summary>
     [DataField]
-    public float Probability = 0.75f;
+    public float Probability = 0.25f;
 
     /// <summary>
     /// Sound played when an object is throw into the container.
index 1b87cb83efa54d8e726ca13d8cd367d523168086..8fa11abe67e01855a211f1145d6aad6be00c6838 100644 (file)
@@ -37,7 +37,7 @@ public sealed class ThrowInsertContainerSystem : EntitySystem
         if (beforeThrowArgs.Cancelled)
             return;
 
-        if (_random.Prob(ent.Comp.Probability))
+        if (!_random.Prob(ent.Comp.Probability))
         {
             _audio.PlayPvs(ent.Comp.MissSound, ent);
             _popup.PopupEntity(Loc.GetString(ent.Comp.MissLocString), ent);