From 91a2479b66fd88d9daf6bc8ea8484e37463f6b98 Mon Sep 17 00:00:00 2001 From: Bakke Date: Mon, 13 Nov 2023 23:55:24 +0100 Subject: [PATCH] Fix voice mask popup location (#21638) The voice mask confirmation and error popups were placed at the cursor, which made the popup render hidden under the voice mask UI. This moves the message to the player entity, and colors the error feedback red to make it more distinct. --- Content.Server/VoiceMask/VoiceMaskSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/VoiceMask/VoiceMaskSystem.cs b/Content.Server/VoiceMask/VoiceMaskSystem.cs index 1df66b608c..81ff76fb7a 100644 --- a/Content.Server/VoiceMask/VoiceMaskSystem.cs +++ b/Content.Server/VoiceMask/VoiceMaskSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Chat.Systems; using Content.Server.Popups; using Content.Shared.Database; using Content.Shared.Inventory.Events; +using Content.Shared.Popups; using Content.Shared.Preferences; using Content.Shared.VoiceMask; using Robust.Server.GameObjects; @@ -35,7 +36,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem { if (message.Name.Length > HumanoidCharacterProfile.MaxNameLength || message.Name.Length <= 0) { - _popupSystem.PopupCursor(Loc.GetString("voice-mask-popup-failure"), message.Session); + _popupSystem.PopupEntity(Loc.GetString("voice-mask-popup-failure"), uid, message.Session, PopupType.SmallCaution); return; } @@ -45,7 +46,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem else _adminLogger.Add(LogType.Action, LogImpact.Medium, $"Voice of {ToPrettyString(uid):mask} set: {component.VoiceName}"); - _popupSystem.PopupCursor(Loc.GetString("voice-mask-popup-success"), message.Session); + _popupSystem.PopupEntity(Loc.GetString("voice-mask-popup-success"), uid, message.Session); TrySetLastKnownName(uid, message.Name);