Another batch of DoAfter fixes (#14351)

This commit is contained in:
keronshb
2023-03-05 00:26:03 -05:00
committed by GitHub
parent 417569fe2e
commit eff088189d
11 changed files with 124 additions and 42 deletions

View File

@@ -77,9 +77,15 @@ public sealed class SharpSystem : EntitySystem
private void OnDoAfter(EntityUid uid, SharpComponent component, DoAfterEvent args)
{
if (args.Handled || args.Cancelled || !TryComp<ButcherableComponent>(args.Args.Target, out var butcher))
if (args.Handled || !TryComp<ButcherableComponent>(args.Args.Target, out var butcher))
return;
if (args.Cancelled)
{
component.Butchering.Remove(args.Args.Target.Value);
return;
}
component.Butchering.Remove(args.Args.Target.Value);
if (_containerSystem.IsEntityInContainer(args.Args.Target.Value))