Меньше попапов в чат (#143)

* add: less popups in chat

* fix: less brackets
This commit is contained in:
ThereDrD0
2024-02-29 13:36:13 +03:00
committed by GitHub
parent 97b0cb1acb
commit be32d673cb
21 changed files with 18 additions and 51 deletions

View File

@@ -308,15 +308,9 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
private void OnThrowCollide(EntityUid uid, SharedDisposalUnitComponent component, ThrowHitByEvent args)
{
var canInsert = CanInsert(uid, component, args.Thrown);
var randDouble = _robustRandom.NextDouble();
if (!canInsert || randDouble > 0.75)
{
_audioSystem.PlayPvs(component.MissSound, uid);
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid);
if (!canInsert) // WD edit
return;
}
var inserted = _containerSystem.Insert(args.Thrown, component.Container);