- fix: more fixes for interactions

This commit is contained in:
2024-02-24 20:54:20 +03:00
parent f76373a16a
commit e15ae4ced8
7 changed files with 62 additions and 28 deletions

View File

@@ -8,24 +8,6 @@ namespace Content.Server._Amour.Animation;
public sealed class SharebleAnimationSystem : SharedAnimationSystem
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override void Initialize()
{
SubscribeLocalEvent<HoleContainerComponent,GetVerbsEvent<Verb>>(OnVerb);
}
private void OnVerb(EntityUid uid, HoleContainerComponent component, GetVerbsEvent<Verb> args)
{
if(!_prototypeManager.TryIndex<AnimationPrototype>("meow",out var prototype))
return;
args.Verbs.Add(new Verb()
{
Text = "MEOW ABOUT IT",
Act = () => Play(uid, prototype)
});
}
public override void Play(EntityUid uid, ProtoId<AnimationPrototype> protoId)
{
RaiseNetworkEvent(new AnimationProtoStartMessage(GetNetEntity(uid),protoId));