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
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user