Remove IDestroyAct, IBreakAct (#7876)

This commit is contained in:
Alex Evgrashin
2022-05-03 01:43:25 +03:00
committed by GitHub
parent 5d23100af3
commit 50ae467c76
21 changed files with 135 additions and 151 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Buckle.Components;
using Content.Server.Interaction;
using Content.Shared.Destructible;
using Content.Shared.Interaction;
using Content.Shared.Storage;
using Content.Shared.Verbs;
@@ -22,6 +23,7 @@ namespace Content.Server.Buckle.Systems
SubscribeLocalEvent<StrapComponent, GetVerbsEvent<InteractionVerb>>(AddStrapVerbs);
SubscribeLocalEvent<StrapComponent, ContainerGettingInsertedAttemptEvent>(OnInsertAttempt);
SubscribeLocalEvent<StrapComponent, InteractHandEvent>(OnInteractHand);
SubscribeLocalEvent<StrapComponent, DestructionEventArgs>(OnDestroy);
}
private void OnInsertAttempt(EntityUid uid, StrapComponent component, ContainerGettingInsertedAttemptEvent args)
@@ -118,5 +120,10 @@ namespace Content.Server.Buckle.Systems
args.Verbs.Add(verb);
}
}
private void OnDestroy(EntityUid uid, StrapComponent component, DestructionEventArgs args)
{
component.RemoveAll();
}
}
}