Files
RobustToolbox/Robust.Server/IBaseServer.cs
T
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00

55 lines
1.6 KiB
C#

using System;
using Robust.Shared.Log;
using Robust.Shared.Timing;
namespace Robust.Server
{
/// <summary>
/// Top level class that controls the game logic of the server.
/// </summary>
public interface IBaseServer
{
/// <summary>
/// The maximum number of players allowed in the server.
/// </summary>
int MaxPlayers { get; }
/// <summary>
/// The displayed name of our server.
/// </summary>
string ServerName { get; }
/// <summary>
/// Sets up the server, loads the game, gets ready for client connections.
/// </summary>
/// <returns></returns>
bool Start(Func<ILogHandler>? logHandler = null);
/// <summary>
/// Hard restarts the server, shutting it down, kicking all players, and starting the server again.
/// </summary>
void Restart();
/// <summary>
/// Shuts down the server, and ends the process.
/// </summary>
/// <param name="reason">Reason why the server was shut down.</param>
void Shutdown(string? reason);
/// <summary>
/// Enters the main loop of the server. This functions blocks until the server is shut down.
/// </summary>
void MainLoop();
}
internal interface IBaseServerInternal : IBaseServer
{
bool DisableLoadContext { set; }
bool LoadConfigAndUserData { set; }
void OverrideMainLoop(IGameLoop gameLoop);
void SetCommandLineArgs(CommandLineArgs args);
}
}