Make forcing others into disposals take longer and more apparent (#20687)

This commit is contained in:
I.K
2023-10-02 14:35:58 -05:00
committed by GitHub
parent 2d20ca0545
commit dc95582679
3 changed files with 11 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ using Content.Shared.DragDrop;
using Content.Shared.Emag.Systems;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Movement.Events;
@@ -489,7 +490,12 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
if (!CanInsert(unitId, unit, toInsertId))
return false;
var delay = userId == toInsertId ? unit.EntryDelay : unit.DraggedEntryDelay;
bool insertingSelf = userId == toInsertId;
var delay = insertingSelf ? unit.EntryDelay : unit.DraggedEntryDelay;
if (userId != null && !insertingSelf)
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-being-inserted", ("user", Identity.Entity((EntityUid) userId, EntityManager))), toInsertId, toInsertId, PopupType.Large);
if (delay <= 0 || userId == null)
{