перенос файлов сервера из папки White в _White

This commit is contained in:
Remuchi
2024-01-28 18:18:54 +07:00
parent 21dbccfec9
commit 1e4ad59270
309 changed files with 450 additions and 437 deletions

View File

@@ -0,0 +1,35 @@
using Content.Server.Chat.Systems;
using Content.Shared.Chat.Prototypes;
using Content.Shared.White.Animations;
using Robust.Shared.GameStates;
using static Content.Shared.White.Animations.EmoteAnimationComponent;
namespace Content.Server._White.Animations;
public sealed class EmoteAnimationSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<EmoteAnimationComponent, ComponentGetState>(OnGetState);
SubscribeLocalEvent<EmoteAnimationComponent, EmoteEvent>(OnEmote);
}
private void OnGetState(EntityUid uid, EmoteAnimationComponent component, ref ComponentGetState args)
{
args.State = new EmoteAnimationComponentState(component.AnimationId);
}
private void OnEmote(EntityUid uid, EmoteAnimationComponent component, ref EmoteEvent args)
{
if (args.Handled || !args.Emote.Category.HasFlag(EmoteCategory.Gesture))
return;
PlayEmoteAnimation(uid, component, args.Emote.ID);
}
public void PlayEmoteAnimation(EntityUid uid, EmoteAnimationComponent component, string emoteId)
{
component.AnimationId = emoteId;
Dirty(component);
}
}