mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Ghosts have follow buttons in chat (#44284) * Fix ghost follow buttons for station entity (#44289) --------- Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
27 lines
713 B
C#
27 lines
713 B
C#
using Content.Shared.Administration;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server.Ghost;
|
|
|
|
[AnyCommand]
|
|
internal sealed partial class GhostFollowEntityCommand : LocalizedEntityCommands
|
|
{
|
|
public const string CommandName = "ghost_follow_entity";
|
|
|
|
[Dependency] private GhostSystem _ghost = null!;
|
|
|
|
public override string Command => CommandName;
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length != 1 || shell.Player is not { } player)
|
|
return;
|
|
|
|
var target = args[0];
|
|
if (!NetEntity.TryParse(target, out var targetEnt))
|
|
return;
|
|
|
|
_ghost.GhostWarpRequest(player, targetEnt);
|
|
}
|
|
}
|