Fix barber scissors cancel errors (#40329)

Fix
This commit is contained in:
Winkarst-cpu 2025-10-13 14:29:30 +03:00 committed by GitHub
parent 4f3bd1fa50
commit 6aa0812fa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,6 +107,8 @@ public sealed class MagicMirrorSystem : SharedMagicMirrorSystem
private void OnSelectSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorSelectDoAfterEvent args) private void OnSelectSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorSelectDoAfterEvent args)
{ {
component.DoAfter = null;
if (args.Handled || args.Target == null || args.Cancelled) if (args.Handled || args.Target == null || args.Cancelled)
return; return;
@ -185,6 +187,8 @@ public sealed class MagicMirrorSystem : SharedMagicMirrorSystem
} }
private void OnChangeColorDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorChangeColorDoAfterEvent args) private void OnChangeColorDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorChangeColorDoAfterEvent args)
{ {
component.DoAfter = null;
if (args.Handled || args.Target == null || args.Cancelled) if (args.Handled || args.Target == null || args.Cancelled)
return; return;
@ -265,6 +269,8 @@ public sealed class MagicMirrorSystem : SharedMagicMirrorSystem
private void OnRemoveSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorRemoveSlotDoAfterEvent args) private void OnRemoveSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorRemoveSlotDoAfterEvent args)
{ {
component.DoAfter = null;
if (args.Handled || args.Target == null || args.Cancelled) if (args.Handled || args.Target == null || args.Cancelled)
return; return;
@ -342,6 +348,8 @@ public sealed class MagicMirrorSystem : SharedMagicMirrorSystem
} }
private void OnAddSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorAddSlotDoAfterEvent args) private void OnAddSlotDoAfter(EntityUid uid, MagicMirrorComponent component, MagicMirrorAddSlotDoAfterEvent args)
{ {
component.DoAfter = null;
if (args.Handled || args.Target == null || args.Cancelled || !TryComp(component.Target, out HumanoidAppearanceComponent? humanoid)) if (args.Handled || args.Target == null || args.Cancelled || !TryComp(component.Target, out HumanoidAppearanceComponent? humanoid))
return; return;