mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 23:17:20 +01:00
Add DMAPI versions to code
This commit is contained in:
+4
-2
@@ -1,5 +1,7 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "5.0.0"
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
//CONFIGURATION
|
||||
@@ -108,12 +110,12 @@
|
||||
|
||||
//represents a version of tgstation-server
|
||||
/datum/tgs_version
|
||||
var/suite //The suite version, can be >=3
|
||||
var/suite //The suite/major version, can be >=3
|
||||
|
||||
//this group of variables can be null to represent a wild card
|
||||
var/major //The major version
|
||||
var/minor //The minor version
|
||||
var/patch //The patch version
|
||||
var/deprecated_patch //The legacy version
|
||||
|
||||
var/raw_parameter //The unparsed parameter
|
||||
var/deprefixed_parameter //The version only bit of raw_parameter
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
suite = text2num(version_bits[1])
|
||||
if(version_bits.len > 1)
|
||||
major = text2num(version_bits[2])
|
||||
minor = text2num(version_bits[2])
|
||||
if(version_bits.len > 2)
|
||||
minor = text2num(version_bits[3])
|
||||
patch = text2num(version_bits[3])
|
||||
if(version_bits.len == 4)
|
||||
patch = text2num(version_bits[4])
|
||||
deprecated_patch = text2num(version_bits[4])
|
||||
|
||||
/datum/tgs_version/proc/Valid(allow_wildcards = FALSE)
|
||||
if(suite == null)
|
||||
@@ -19,4 +19,4 @@
|
||||
return !Wildcard()
|
||||
|
||||
/datum/tgs_version/Wildcard()
|
||||
return major == null || minor == null || patch == null
|
||||
return minor == null || patch == null || deprecated_patch == null
|
||||
|
||||
@@ -20,6 +20,11 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <inheritdoc />
|
||||
sealed class SessionController : ISessionController, ICommHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// The DMAPI version being used.
|
||||
/// </summary>
|
||||
public static readonly Version DMApiVersion = new Version(5, 0, 0);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsPrimary
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user