1
0

HolopadUserComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Holopad;
  4. /// <summary>
  5. /// Holds data pertaining to entities that are using holopads
  6. /// </summary>
  7. /// <remarks>
  8. /// This component is added and removed automatically from entities
  9. /// </remarks>
  10. [RegisterComponent, NetworkedComponent]
  11. [Access(typeof(SharedHolopadSystem))]
  12. public sealed partial class HolopadUserComponent : Component
  13. {
  14. /// <summary>
  15. /// A list of holopads that the user is interacting with
  16. /// </summary>
  17. [ViewVariables]
  18. public HashSet<Entity<HolopadComponent>> LinkedHolopads = new();
  19. }
  20. /// <summary>
  21. /// A networked event raised when the visual state of a hologram is being updated
  22. /// </summary>
  23. [Serializable, NetSerializable]
  24. public sealed class HolopadUserTypingChangedEvent : EntityEventArgs
  25. {
  26. /// <summary>
  27. /// The hologram being updated
  28. /// </summary>
  29. public readonly NetEntity User;
  30. /// <summary>
  31. /// The typing indicator state
  32. /// </summary>
  33. public readonly bool IsTyping;
  34. public HolopadUserTypingChangedEvent(NetEntity user, bool isTyping)
  35. {
  36. User = user;
  37. IsTyping = isTyping;
  38. }
  39. }