mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 14:37:44 +01:00
Move Version from Definitions to Client
This commit is contained in:
@@ -14,6 +14,11 @@ namespace TGS.Interface
|
||||
/// <inheritdoc />
|
||||
sealed public class Client : IClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Version of the <see cref="Client"/>
|
||||
/// </summary>
|
||||
public static readonly Version Version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IServer Server => server;
|
||||
|
||||
@@ -147,10 +152,9 @@ namespace TGS.Interface
|
||||
/// <inheritdoc />
|
||||
public bool VersionMismatch(out string errorMessage)
|
||||
{
|
||||
var version = Definitions.Version;
|
||||
if (ServerVersion.Major != version.Major || ServerVersion.Minor != version.Minor || ServerVersion.Build != version.Build) //don't care about the patch level
|
||||
if (ServerVersion.Major != Version.Major || ServerVersion.Minor != Version.Minor || ServerVersion.Build != Version.Build) //don't care about the patch level
|
||||
{
|
||||
errorMessage = String.Format("Version mismatch between interface version ({0}) and service version ({1}). Some functionality may crash this program.", version, ServerVersion);
|
||||
errorMessage = String.Format("Version mismatch between interface version ({0}) and service version ({1}). Some functionality may crash this program.", Version, ServerVersion);
|
||||
return true;
|
||||
}
|
||||
errorMessage = null;
|
||||
|
||||
@@ -28,10 +28,5 @@ namespace TGS.Interface
|
||||
/// Base name of instance URLs
|
||||
/// </summary>
|
||||
public const string InstanceInterfaceName = MasterInterfaceName + "/Instance";
|
||||
|
||||
/// <summary>
|
||||
/// Version of the interface
|
||||
/// </summary>
|
||||
public static readonly Version Version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user