Skip to main content

GameServerInfoExtensions

A static class in Root.Township, the global namespace.

Extension methods on GameServerInfo for joining a server and naming its save folder.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger for this class.

Methods​

MemberWhat it is
static string GetFolderName(GameServerInfo serverInfo)Save folder name for a server: its ID. The private overload builds the old "ID - Name" form.
static string GetOldFolderName(GameServerInfo serverInfo)Old save folder name, "ID - Name", for finding saves made before the ID-only naming.
static async Task<ServerJoinResult> JoinServerAsync(GameServerInfo gameServer)Asks the API to join the server; dev servers and ID -1 skip the API and connect locally (loopback, port 1757).
1 private and internal method
MemberWhat it is
private static string GetFolderName(int id, string name)Save folder name for a server: its ID. The private overload builds the old "ID - Name" form.