2023-05-05 18:31:39 +03:00
|
|
|
using Content.Shared.Actions;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
2024-01-28 18:37:24 +07:00
|
|
|
namespace Content.Shared._White.Animations;
|
2023-05-05 18:31:39 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-16 00:46:38 +03:00
|
|
|
/// Event for playing animations
|
2023-05-05 18:31:39 +03:00
|
|
|
/// </summary>
|
2024-01-17 09:41:50 +03:00
|
|
|
public sealed partial class EmoteActionEvent : InstantActionEvent
|
2023-05-16 00:46:38 +03:00
|
|
|
{
|
2024-01-26 16:35:45 +07:00
|
|
|
[ViewVariables, DataField("emote", readOnly: true, required: true)]
|
2023-05-16 00:46:38 +03:00
|
|
|
public string Emote = default!;
|
|
|
|
|
};
|
2023-05-05 18:31:39 +03:00
|
|
|
|
2024-01-26 16:35:45 +07:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2024-01-17 09:41:50 +03:00
|
|
|
public sealed partial class EmoteAnimationComponent : Component
|
2023-05-05 18:31:39 +03:00
|
|
|
{
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public string AnimationId = "none";
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2024-01-26 16:35:45 +07:00
|
|
|
public partial class EmoteAnimationComponentState : ComponentState
|
2023-05-05 18:31:39 +03:00
|
|
|
{
|
|
|
|
|
public string AnimationId { get; init; }
|
|
|
|
|
|
|
|
|
|
public EmoteAnimationComponentState(string animationId)
|
|
|
|
|
{
|
|
|
|
|
AnimationId = animationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|