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,13 +6,12 @@ using Robust.Shared.Enums;
namespace Content.Server.Chat.Commands
{
[AnyCommand]
internal sealed class WhisperCommand : IConsoleCommand
internal sealed class WhisperCommand : LocalizedEntityCommands
{
public string Command => "whisper";
public string Description => "Send chat messages to the local channel as a whisper";
public string Help => "whisper <text>";
[Dependency] private readonly ChatSystem _chatSystem = default!;
public override string Command => "whisper";
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)
{
@@ -25,7 +24,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 +35,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>()
.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Whisper, ChatTransmitRange.Normal, false, shell, player);
_chatSystem.TrySendInGameICMessage(playerEntity, message, InGameICChatType.Whisper, ChatTransmitRange.Normal, false, shell, player);
}
}
}