using Robust.Shared.Players; namespace Robust.Shared.Console { /// /// The console shell that executes commands. Each shell executes commands in the context of a player /// session, or without a session in a local context. /// public interface IConsoleShell { /// /// The console host that owns this shell. /// IConsoleHost ConsoleHost { get; } /// /// Is the shell running on the client? /// bool IsClient => !IsServer; /// /// Is the shell running in a local context (no remote peer session)? If true, will be null. /// bool IsLocal => Player is not null; /// /// Is the shell running on the server? /// bool IsServer { get; } /// /// The remote peer that owns this shell. This is null if the shell is running local ( is true.). /// ICommonSession? Player { get; } /// /// Executes a command string on this specific session shell. If the command does not exist, the command will be forwarded /// to the /// remote shell. /// /// command line string to execute. void ExecuteCommand(string command); /// /// Executes the command string on the remote peer. This is mainly used to forward commands from the client to the server. /// If there is no remote peer (this is a local shell), this function does nothing. /// /// Command line string to execute at the remote endpoint. void RemoteExecuteCommand(string command); /// /// Writes a line to the output of the console. /// /// Line of text to write. void WriteLine(string text); /// /// Write an error line to the console window. /// /// Line of text to write. void WriteError(string text); /// /// Clears the entire console of text. /// void Clear(); } }