make throw insert container code more clear (#36873)
make throw insert container more clear
This commit is contained in:
@@ -16,7 +16,7 @@ public sealed partial class ThrowInsertContainerComponent : Component
|
|||||||
/// Throw chance of hitting into the container
|
/// Throw chance of hitting into the container
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public float Probability = 0.75f;
|
public float Probability = 0.25f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sound played when an object is throw into the container.
|
/// Sound played when an object is throw into the container.
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public sealed class ThrowInsertContainerSystem : EntitySystem
|
|||||||
if (beforeThrowArgs.Cancelled)
|
if (beforeThrowArgs.Cancelled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_random.Prob(ent.Comp.Probability))
|
if (!_random.Prob(ent.Comp.Probability))
|
||||||
{
|
{
|
||||||
_audio.PlayPvs(ent.Comp.MissSound, ent);
|
_audio.PlayPvs(ent.Comp.MissSound, ent);
|
||||||
_popup.PopupEntity(Loc.GetString(ent.Comp.MissLocString), ent);
|
_popup.PopupEntity(Loc.GetString(ent.Comp.MissLocString), ent);
|
||||||
|
|||||||
Reference in New Issue
Block a user