Files
crystall-punk-14/Content.Server/Weapons/TetherGunCommand.cs

26 lines
898 B
C#
Raw Normal View History

2022-09-01 13:11:45 +10:00
using Content.Server.Administration;
using Content.Server.Weapons.Ranged.Systems;
2022-09-01 13:11:45 +10:00
using Content.Shared.Administration;
using Content.Shared.Weapons.Ranged.Systems;
2022-05-13 12:24:34 +10:00
using Robust.Shared.Console;
namespace Content.Server.Weapons;
2022-05-13 12:24:34 +10:00
2022-09-01 13:11:45 +10:00
[AdminCommand(AdminFlags.Fun)]
2022-05-13 12:24:34 +10:00
public sealed class TetherGunCommand : IConsoleCommand
{
2022-09-01 13:11:45 +10:00
public string Command => SharedTetherGunSystem.CommandName;
2022-05-13 12:24:34 +10:00
public string Description => "Allows you to drag mobs around with your mouse.";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
2022-05-13 18:59:12 +10:00
var system = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<TetherGunSystem>();
2022-09-01 13:11:45 +10:00
system.Toggle(shell.Player);
2022-05-13 18:59:12 +10:00
2022-09-01 13:11:45 +10:00
if (system.IsEnabled(shell.Player))
2022-05-13 18:59:12 +10:00
shell.WriteLine("Tether gun toggled on");
else
shell.WriteLine("Tether gun toggled off");
2022-05-13 12:24:34 +10:00
}
}