Dsay Dirty and Follow commands converted to LEC and localized. (#38666)
* commit * whoopwhoopwhoop
This commit is contained in:
@@ -6,15 +6,13 @@ using Robust.Shared.Enums;
|
||||
namespace Content.Server.Administration.Commands;
|
||||
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
public sealed class FollowCommand : IConsoleCommand
|
||||
public sealed class FollowCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly FollowerSystem _followerSystem = default!;
|
||||
|
||||
public string Command => "follow";
|
||||
public string Description => Loc.GetString("follow-command-description");
|
||||
public string Help => Loc.GetString("follow-command-help");
|
||||
public override string Command => "follow";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (shell.Player is not { } player)
|
||||
{
|
||||
@@ -34,10 +32,7 @@ public sealed class FollowCommand : IConsoleCommand
|
||||
return;
|
||||
}
|
||||
|
||||
var entity = args[0];
|
||||
if (NetEntity.TryParse(entity, out var uidNet) && _entManager.TryGetEntity(uidNet, out var uid))
|
||||
{
|
||||
_entManager.System<FollowerSystem>().StartFollowingEntity(playerEntity, uid.Value);
|
||||
}
|
||||
if (NetEntity.TryParse(args[0], out var uidNet) && EntityManager.TryGetEntity(uidNet, out var uid))
|
||||
_followerSystem.StartFollowingEntity(playerEntity, uid.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user