Skip to content

Commit

Permalink
remove disposal miss
Browse files Browse the repository at this point in the history
  • Loading branch information
TokiJumper committed Sep 10, 2024
1 parent 95bde11 commit 084083d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
using Robust.Shared.Player;
using Robust.Shared.Random;
//using Robust.Shared.Random;
using Robust.Shared.Utility;

namespace Content.Server.Disposal.Unit.EntitySystems;

public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
{
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
//[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!;
[Dependency] private readonly AtmosphereSystem _atmosSystem = default!;
Expand Down Expand Up @@ -297,20 +297,21 @@ private void OnAfterInteractUsing(EntityUid uid, SharedDisposalUnitComponent com
private void OnThrowCollide(EntityUid uid, SharedDisposalUnitComponent component, ThrowHitByEvent args)
{
var canInsert = CanInsert(uid, component, args.Thrown);
var randDouble = _robustRandom.NextDouble();
//var randDouble = _robustRandom.NextDouble();

if (!canInsert)
{
return;
}

if (randDouble > 0.75)
{
_audioSystem.PlayPvs(component.MissSound, uid);

_popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid);
return;
}
// WWDP EDIT
// if (randDouble > 0.75)
// {
// _audioSystem.PlayPvs(component.MissSound, uid);
//
// _popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid);
// return;
// }

var inserted = _containerSystem.Insert(args.Thrown, component.Container);

Expand Down

0 comments on commit 084083d

Please sign in to comment.