Files
VOREStation/code/modules/tgs/core/tgs_version.dm
T
Selis 355c8ca5f0 DMAPI Update (#17935)
* DMAPI Update

* Fix

* More changes

* InitTgs

* .

* css

* urg

* fix that

* some linux fixes

* .

* .

* .

* update

* .

* pref fixing

* .

* those are already sent

* .

* .

* .

* fully off

* fix that

* New classes & Format

* make this nicer

* CSS Edits

* .

* eh use switch

* .

* Update client procs.dm

* Hard restart counter

* Improved Staffwho style

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-07-02 22:21:14 +02:00

30 lines
937 B
Plaintext

/datum/tgs_version/New(raw_parameter)
..()
src.raw_parameter = raw_parameter
deprefixed_parameter = replacetext(raw_parameter, "/tg/station 13 Server v", "")
var/list/version_bits = splittext(deprefixed_parameter, ".")
suite = text2num(version_bits[1])
if(version_bits.len > 1)
minor = text2num(version_bits[2])
if(version_bits.len > 2)
patch = text2num(version_bits[3])
if(version_bits.len == 4)
deprecated_patch = text2num(version_bits[4])
/datum/tgs_version/proc/Valid(allow_wildcards = FALSE)
if(suite == null)
return FALSE
if(allow_wildcards)
return TRUE
return !Wildcard()
/datum/tgs_version/Wildcard()
return minor == null || patch == null
/datum/tgs_version/Equals(datum/tgs_version/other_version)
if(!istype(other_version))
return FALSE
return suite == other_version.suite && minor == other_version.minor && patch == other_version.patch && deprecated_patch == other_version.deprecated_patch