Rotation warnings cleanup (#36197)

* Rotation warnings cleanup

* Naming convention fix

* Adding component that we already have
This commit is contained in:
J
2025-04-01 21:56:37 +00:00
committed by GitHub
parent 4cf14211f9
commit 3192a7fde5
2 changed files with 3 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ public sealed class RotationVisualizerSystem : SharedRotationVisualsSystem
// Stop the current rotate animation and then start a new one // Stop the current rotate animation and then start a new one
if (_animation.HasRunningAnimation(animationComp, animationKey)) if (_animation.HasRunningAnimation(animationComp, animationKey))
{ {
_animation.Stop(animationComp, animationKey); _animation.Stop((uid, animationComp), animationKey);
} }
var animation = new Animation var animation = new Animation

View File

@@ -21,6 +21,7 @@ namespace Content.Server.Rotatable
[Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -112,7 +113,7 @@ namespace Content.Server.Rotatable
var entity = EntityManager.SpawnEntity(component.MirrorEntity, oldTransform.Coordinates); var entity = EntityManager.SpawnEntity(component.MirrorEntity, oldTransform.Coordinates);
var newTransform = EntityManager.GetComponent<TransformComponent>(entity); var newTransform = EntityManager.GetComponent<TransformComponent>(entity);
newTransform.LocalRotation = oldTransform.LocalRotation; newTransform.LocalRotation = oldTransform.LocalRotation;
newTransform.Anchored = false; _transform.Unanchor(entity, newTransform);
EntityManager.DeleteEntity(uid); EntityManager.DeleteEntity(uid);
} }