]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Changed PullingSystem to use MobStateChangedEvent instead of UpdateMo… (#41835)
authorWS01 <151183296+Tuchila-Adi-Bogdan@users.noreply.github.com>
Fri, 12 Dec 2025 12:10:43 +0000 (14:10 +0200)
committerGitHub <noreply@github.com>
Fri, 12 Dec 2025 12:10:43 +0000 (12:10 +0000)
Changed PullingSystem to use MobStateChangedEvent instead of UpdateMobStateEvent

Content.Shared/Movement/Pulling/Systems/PullingSystem.cs

index 01a65f852a52fa697ef5e46cec8e82fdedca3c21..0fcdf7ebed07e784bd8bc1e75f9bb446f6be597b 100644 (file)
@@ -70,7 +70,7 @@ public sealed class PullingSystem : EntitySystem
         SubscribeLocalEvent<PullableComponent, StopBeingPulledAlertEvent>(OnStopBeingPulledAlert);
         SubscribeLocalEvent<PullableComponent, GetInteractingEntitiesEvent>(OnGetInteractingEntities);
 
-        SubscribeLocalEvent<PullerComponent, UpdateMobStateEvent>(OnStateChanged, after: [typeof(MobThresholdSystem)]);
+        SubscribeLocalEvent<PullerComponent, MobStateChangedEvent>(OnStateChanged, after: [typeof(MobThresholdSystem)]);
         SubscribeLocalEvent<PullerComponent, AfterAutoHandleStateEvent>(OnAfterState);
         SubscribeLocalEvent<PullerComponent, EntGotInsertedIntoContainerMessage>(OnPullerContainerInsert);
         SubscribeLocalEvent<PullerComponent, EntityUnpausedEvent>(OnPullerUnpaused);
@@ -139,12 +139,12 @@ public sealed class PullingSystem : EntitySystem
         }
     }
 
-    private void OnStateChanged(EntityUid uid, PullerComponent component, ref UpdateMobStateEvent args)
+    private void OnStateChanged(EntityUid uid, PullerComponent component, ref MobStateChangedEvent args)
     {
         if (component.Pulling == null)
             return;
 
-        if (TryComp<PullableComponent>(component.Pulling, out var comp) && (args.State == MobState.Critical || args.State == MobState.Dead))
+        if (TryComp<PullableComponent>(component.Pulling, out var comp) && (args.NewMobState == MobState.Critical || args.NewMobState == MobState.Dead))
         {
             TryStopPull(component.Pulling.Value, comp);
         }