make throw insert container code more clear (#36873)

make throw insert container more clear
This commit is contained in:
lzk
2025-05-07 15:08:28 +02:00
committed by GitHub
parent 132dadeca8
commit 4420d67f92
2 changed files with 2 additions and 2 deletions

View 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.

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