CatStation/Content.Server/Movement/LockEyesCommand.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

31 lines
881 B
C#

using Content.Server.Administration;
using Content.Shared.Administration;
using Content.Shared.Movement.Systems;
using Robust.Shared.Console;
namespace Content.Server.Movement;
[AdminCommand(AdminFlags.Fun)]
public sealed partial class LockEyesCommand : LocalizedEntityCommands
{
[Dependency] private SharedMoverController _controller = default!;
public override string Command => $"lockeyes";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
shell.WriteError(Loc.GetString("shell-need-exactly-one-argument"));
return;
}
if (!bool.TryParse(args[0], out var value))
{
shell.WriteError(Loc.GetString("parse-bool-fail", ("args", args[0])));
return;
}
_controller.CameraRotationLocked = value;
}
}