Files
tbd-station-14/Content.Shared/Chat/TypingIndicator/TypingIndicatorClothingComponent.cs
beck-thompson 91740ef5be Fix typing indicators! (#29492)
* First commit

* Removed pause stuff

* Make the event better

* Forgot to add the comment

* Proto id stuff

* cool comments

* serializer

* Added the time stuff
2024-07-10 15:51:47 +10:00

29 lines
1.2 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Chat.TypingIndicator;
/// <summary>
/// If an item is equipped to someones inventory (Anything but the pockets), and has this component
/// the users typing indicator will be replaced by the prototype given in <c>TypingIndicatorPrototype</c>.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentPause]
[Access(typeof(SharedTypingIndicatorSystem))]
public sealed partial class TypingIndicatorClothingComponent : Component
{
/// <summary>
/// The typing indicator that will override the default typing indicator when the item is equipped to a users
/// inventory.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("proto", required: true)]
public ProtoId<TypingIndicatorPrototype> TypingIndicatorPrototype = default!;
/// <summary>
/// This stores the time the item was equipped in someones inventory. If null, item is currently not equipped.
/// </summary>
[DataField, AutoPausedField]
public TimeSpan? GotEquippedTime = null;
}