Skip to content

Commit

Permalink
Upstream merge 70: Holopad fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stalengd committed Jan 19, 2025
1 parent 56aec0e commit d32b32f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 1 addition & 3 deletions Content.Client/Holopad/HolopadSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,7 +46,7 @@ private void OnTypingChanged(TypingChangedEvent ev, EntitySessionEventArgs args)
if (!HasComp<HolopadUserComponent>(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);
}

Expand Down
5 changes: 2 additions & 3 deletions Content.Server/Holopad/HolopadSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using System.Linq;
using System.Numerics;

namespace Content.Server.Holopad;

Expand Down Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -578,7 +577,7 @@ private void SyncHolopadHologramAppearanceWithTarget(Entity<HolopadComponent> 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);
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/Holopad/HolopadUserComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Numerics;
using Content.Shared.Chat.TypingIndicator;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;

Expand Down Expand Up @@ -35,11 +35,11 @@ public sealed class HolopadUserTypingChangedEvent : EntityEventArgs
/// <summary>
/// The typing indicator state
/// </summary>
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
}
}

0 comments on commit d32b32f

Please sign in to comment.