diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 5a0abab666..ef3d530b8f 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -26,6 +26,7 @@ using Robust.Shared.Log; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Players; +using Robust.Shared.Random; namespace Content.Server.GameObjects.EntitySystems.Click { @@ -36,6 +37,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click public sealed class InteractionSystem : SharedInteractionSystem { [Dependency] private readonly IEntityManager _entityManager = default!; + [Dependency] private readonly IRobustRandom _random = default!; public override void Initialize() { @@ -685,6 +687,10 @@ namespace Content.Server.GameObjects.EntitySystems.Click return; } + if(item.TryGetComponent(out var transformComponent)) + transformComponent.LocalRotation = intentional ? Angle.Zero : (_random.Next(0, 100) / 100f) * MathHelper.TwoPi; + + var comps = item.GetAllComponents().ToList(); // Call Land on all components that implement the interface