From 4420d67f924ac04a60f90a62731e6078a820eda0 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Wed, 7 May 2025 15:08:28 +0200 Subject: [PATCH] make throw insert container code more clear (#36873) make throw insert container more clear --- Content.Server/Containers/ThrowInsertContainerComponent.cs | 2 +- Content.Server/Containers/ThrowInsertContainerSystem.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Containers/ThrowInsertContainerComponent.cs b/Content.Server/Containers/ThrowInsertContainerComponent.cs index 7eb5f4657d..9dd6cfe72c 100644 --- a/Content.Server/Containers/ThrowInsertContainerComponent.cs +++ b/Content.Server/Containers/ThrowInsertContainerComponent.cs @@ -16,7 +16,7 @@ public sealed partial class ThrowInsertContainerComponent : Component /// Throw chance of hitting into the container /// [DataField] - public float Probability = 0.75f; + public float Probability = 0.25f; /// /// Sound played when an object is throw into the container. diff --git a/Content.Server/Containers/ThrowInsertContainerSystem.cs b/Content.Server/Containers/ThrowInsertContainerSystem.cs index 1b87cb83ef..8fa11abe67 100644 --- a/Content.Server/Containers/ThrowInsertContainerSystem.cs +++ b/Content.Server/Containers/ThrowInsertContainerSystem.cs @@ -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);