From 20cb65f2e6d7d76cecc5e52eb41be7774ead4581 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:33:20 +1000 Subject: [PATCH] Fix double interaction popups (#30452) The issue is it plays the "you hug xyz" to everyone in range as well as the target client so they overlap. IDK if anything else is broken by this but this control flow is pretty bad so I wouldn't be surprised. --- Content.Shared/Interaction/InteractionPopupSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Interaction/InteractionPopupSystem.cs b/Content.Shared/Interaction/InteractionPopupSystem.cs index d956ff3d95..2a742d4211 100644 --- a/Content.Shared/Interaction/InteractionPopupSystem.cs +++ b/Content.Shared/Interaction/InteractionPopupSystem.cs @@ -113,7 +113,7 @@ public sealed class InteractionPopupSystem : EntitySystem Spawn(component.InteractFailureSpawn, _transform.GetMapCoordinates(uid)); } - if (component.MessagePerceivedByOthers != null) + if (!string.IsNullOrEmpty(component.MessagePerceivedByOthers)) { var msgOthers = Loc.GetString(component.MessagePerceivedByOthers, ("user", Identity.Entity(user, EntityManager)), ("target", Identity.Entity(uid, EntityManager))); @@ -131,7 +131,7 @@ public sealed class InteractionPopupSystem : EntitySystem return; } - _popupSystem.PopupPredicted(msg, uid, user); + _popupSystem.PopupClient(msg, uid, user); if (sfx == null) return; -- 2.52.0