TypingIndicatorClothingComponent.cs 1.2 KB

12345678910111213141516171819202122232425262728
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Shared.Chat.TypingIndicator;
  5. /// <summary>
  6. /// If an item is equipped to someones inventory (Anything but the pockets), and has this component
  7. /// the users typing indicator will be replaced by the prototype given in <c>TypingIndicatorPrototype</c>.
  8. /// </summary>
  9. [RegisterComponent, NetworkedComponent, AutoGenerateComponentPause]
  10. [Access(typeof(SharedTypingIndicatorSystem))]
  11. public sealed partial class TypingIndicatorClothingComponent : Component
  12. {
  13. /// <summary>
  14. /// The typing indicator that will override the default typing indicator when the item is equipped to a users
  15. /// inventory.
  16. /// </summary>
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. [DataField("proto", required: true)]
  19. public ProtoId<TypingIndicatorPrototype> TypingIndicatorPrototype = default!;
  20. /// <summary>
  21. /// This stores the time the item was equipped in someones inventory. If null, item is currently not equipped.
  22. /// </summary>
  23. [DataField, AutoPausedField]
  24. public TimeSpan? GotEquippedTime = null;
  25. }