Another round of DoAfter fixes (#14295)

This commit is contained in:
keronshb
2023-02-28 19:51:42 -05:00
committed by GitHub
parent 20f54d2ace
commit e9dbcc4278
10 changed files with 60 additions and 20 deletions

View File

@@ -270,7 +270,17 @@ public sealed class MoppingSystem : SharedMoppingSystem
private void OnDoAfter(EntityUid uid, AbsorbentComponent component, DoAfterEvent<AbsorbantData> args)
{
if (args.Handled || args.Cancelled || args.Args.Target == null)
if (args.Args.Target == null)
return;
if (args.Cancelled)
{
//Remove the interacting entities or else it breaks the mop
component.InteractingEntities.Remove(args.Args.Target.Value);
return;
}
if (args.Handled)
return;
_audio.PlayPvs(args.AdditionalData.Sound, uid);