mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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
31 lines
881 B
C#
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;
|
|
}
|
|
}
|