From d32b32f67cb8f6144458e2b300eabdde0bf1e2d1 Mon Sep 17 00:00:00 2001 From: stalengd Date: Sun, 19 Jan 2025 12:51:03 +0300 Subject: [PATCH] Upstream merge 70: Holopad fix --- Content.Client/Holopad/HolopadSystem.cs | 4 +--- Content.Server/Holopad/HolopadSystem.cs | 5 ++--- Content.Shared/Holopad/HolopadUserComponent.cs | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Content.Client/Holopad/HolopadSystem.cs b/Content.Client/Holopad/HolopadSystem.cs index 13b9c043399a..03595f75faac 100644 --- a/Content.Client/Holopad/HolopadSystem.cs +++ b/Content.Client/Holopad/HolopadSystem.cs @@ -5,8 +5,6 @@ using Robust.Shared.Prototypes; using Robust.Shared.Timing; using System.Linq; -using System.Numerics; -using Vector3 = Robust.Shared.Maths.Vector3; using DrawDepth = Content.Shared.DrawDepth.DrawDepth; namespace Content.Client.Holopad; @@ -48,7 +46,7 @@ private void OnTypingChanged(TypingChangedEvent ev, EntitySessionEventArgs args) if (!HasComp(uid)) return; - var netEv = new HolopadUserTypingChangedEvent(GetNetEntity(uid.Value), ev.State == TypingIndicatorState.Typing); + var netEv = new HolopadUserTypingChangedEvent(GetNetEntity(uid.Value), ev.State); // SS220 Typing indicator RaiseNetworkEvent(netEv); } diff --git a/Content.Server/Holopad/HolopadSystem.cs b/Content.Server/Holopad/HolopadSystem.cs index 846df524278e..b8e214cfe4ef 100644 --- a/Content.Server/Holopad/HolopadSystem.cs +++ b/Content.Server/Holopad/HolopadSystem.cs @@ -20,7 +20,6 @@ using Robust.Shared.Timing; using Robust.Shared.Utility; using System.Linq; -using System.Numerics; namespace Content.Server.Holopad; @@ -307,7 +306,7 @@ private void OnTypingChanged(HolopadUserTypingChangedEvent ev, EntitySessionEven if (receiverHolopad.Comp.Hologram == null) continue; - _appearanceSystem.SetData(receiverHolopad.Comp.Hologram.Value.Owner, TypingIndicatorVisuals.State, ev.IsTyping); + _appearanceSystem.SetData(receiverHolopad.Comp.Hologram.Value.Owner, TypingIndicatorVisuals.State, ev.TypingState); // SS220 Typing indicator } } } @@ -578,7 +577,7 @@ private void SyncHolopadHologramAppearanceWithTarget(Entity en continue; if (user == null) - _appearanceSystem.SetData(linkedHolopad.Comp.Hologram.Value.Owner, TypingIndicatorVisuals.IsTyping, false); + _appearanceSystem.SetData(linkedHolopad.Comp.Hologram.Value.Owner, TypingIndicatorVisuals.State, TypingIndicatorState.None); // SS220 Typing indicator linkedHolopad.Comp.Hologram.Value.Comp.LinkedEntity = user; Dirty(linkedHolopad.Comp.Hologram.Value); diff --git a/Content.Shared/Holopad/HolopadUserComponent.cs b/Content.Shared/Holopad/HolopadUserComponent.cs index eeabce485346..830a1c448b2f 100644 --- a/Content.Shared/Holopad/HolopadUserComponent.cs +++ b/Content.Shared/Holopad/HolopadUserComponent.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using Content.Shared.Chat.TypingIndicator; using Robust.Shared.GameStates; using Robust.Shared.Serialization; @@ -35,11 +35,11 @@ public sealed class HolopadUserTypingChangedEvent : EntityEventArgs /// /// The typing indicator state /// - public readonly bool IsTyping; + public readonly TypingIndicatorState TypingState; // SS220 Typing indicator - public HolopadUserTypingChangedEvent(NetEntity user, bool isTyping) + public HolopadUserTypingChangedEvent(NetEntity user, TypingIndicatorState typingState) // SS220 Typing indicator { User = user; - IsTyping = isTyping; + TypingState = typingState; // SS220 Typing indicator } }