* Command to open chatbox in a new window * Add command for users with AdminChat permission * Add command button to admin tools window
36 lines
951 B
C#
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();
|
|
}
|
|
}
|