]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Rotation warnings cleanup (#36197)
authorJ <billsmith116@gmail.com>
Tue, 1 Apr 2025 21:56:37 +0000 (21:56 +0000)
committerGitHub <noreply@github.com>
Tue, 1 Apr 2025 21:56:37 +0000 (23:56 +0200)
* Rotation warnings cleanup

* Naming convention fix

* Adding component that we already have

Content.Client/Rotation/RotationVisualizerSystem.cs
Content.Server/Rotatable/RotatableSystem.cs

index 6d3be4d1c05dedc2eb7cf3e8732024740d3ce6ac..8dbcf9732014688349c83384d9c076941f4caaf0 100644 (file)
@@ -52,7 +52,7 @@ public sealed class RotationVisualizerSystem : SharedRotationVisualsSystem
         // Stop the current rotate animation and then start a new one
         if (_animation.HasRunningAnimation(animationComp, animationKey))
         {
-            _animation.Stop(animationComp, animationKey);
+            _animation.Stop((uid, animationComp), animationKey);
         }
 
         var animation = new Animation
index 63b5e44c3d27f4bf4515de9e58503b055543682d..85681535ca7a47046da4d12150b601e7503f684c 100644 (file)
@@ -21,6 +21,7 @@ namespace Content.Server.Rotatable
         [Dependency] private readonly PopupSystem _popup = default!;
         [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
         [Dependency] private readonly SharedInteractionSystem _interaction = default!;
+        [Dependency] private readonly SharedTransformSystem _transform = default!;
 
         public override void Initialize()
         {
@@ -112,7 +113,7 @@ namespace Content.Server.Rotatable
             var entity = EntityManager.SpawnEntity(component.MirrorEntity, oldTransform.Coordinates);
             var newTransform = EntityManager.GetComponent<TransformComponent>(entity);
             newTransform.LocalRotation = oldTransform.LocalRotation;
-            newTransform.Anchored = false;
+            _transform.Unanchor(entity, newTransform);
             EntityManager.DeleteEntity(uid);
         }