Files
tbd-station-14/Content.Client/UserInterface/Systems/Chat/ChatWindowCommand.cs
eoineoineoin 7c4b34c1de Command to open chatbox in a new window (#33548)
* Command to open chatbox in a new window

* Add command for users with AdminChat permission

* Add command button to admin tools window
2025-04-14 17:37:58 +02:00

36 lines
951 B
C#

using JetBrains.Annotations;
using Robust.Shared.Console;
namespace Content.Client.UserInterface.Systems.Chat;
/// <summary>
/// Command which creates a window containing a chatbox
/// </summary>
[UsedImplicitly]
public sealed class ChatWindowCommand : LocalizedCommands
{
public override string Command => "chatwindow";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var window = new ChatWindow();
window.OpenCentered();
}
}
/// <summary>
/// Command which creates a window containing a chatbox configured for admin use
/// </summary>
[UsedImplicitly]
public sealed class AdminChatWindowCommand : LocalizedCommands
{
public override string Command => "achatwindow";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var window = new ChatWindow();
window.ConfigureForAdminChat();
window.OpenCentered();
}
}