Command resolves and LEC conversions batch 4 (#38382)

* reeeecolllaaaaaaaa

* gonna convert these to public while I'm here for consistency sake

* requested changes.
This commit is contained in:
Kyle Tyo
2025-06-18 20:03:28 -04:00
committed by GitHub
parent d36a45a57f
commit ca72ca1464
18 changed files with 104 additions and 102 deletions

View File

@@ -6,17 +6,17 @@ using Robust.Shared.Enums;
namespace Content.Server.Chat.Commands
{
[AnyCommand]
internal sealed class MeCommand : IConsoleCommand
internal sealed class MeCommand : LocalizedEntityCommands
{
public string Command => "me";
public string Description => "Perform an action.";
public string Help => "me <text>";
[Dependency] private readonly ChatSystem _chatSystem = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "me";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (shell.Player is not { } player)
{
shell.WriteError("This command cannot be run from the server.");
shell.WriteError(Loc.GetString($"shell-cannot-run-command-from-server"));
return;
}
@@ -25,7 +25,7 @@ namespace Content.Server.Chat.Commands
if (player.AttachedEntity is not {} playerEntity)
{
shell.WriteError("You don't have an entity!");
shell.WriteError(Loc.GetString($"shell-must-be-attached-to-entity"));
return;
}
@@ -36,8 +36,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>()
.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Emote, ChatTransmitRange.Normal, false, shell, player);
_chatSystem.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Emote, ChatTransmitRange.Normal, false, shell, player);
}
}
}