From e346238472aa16a1f39d70f82bb6c3bd805812ec Mon Sep 17 00:00:00 2001
From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Date: Thu, 27 Oct 2022 18:13:11 +0100
Subject: [PATCH] DMAPI 515 compat for TGS3
---
build/Version.props | 2 +-
src/DMAPI/tgs.dm | 2 +-
src/DMAPI/tgs/v3210/api.dm | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/build/Version.props b/build/Version.props
index 2cab724f17..e8cb350332 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -8,7 +8,7 @@
9.7.0
10.1.0
11.1.0
- 6.0.5
+ 6.0.6
5.3.0
1.2.0
1.2.0
diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm
index 51bf6e66f7..83e06658c5 100644
--- a/src/DMAPI/tgs.dm
+++ b/src/DMAPI/tgs.dm
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
-#define TGS_DMAPI_VERSION "6.0.5"
+#define TGS_DMAPI_VERSION "6.0.6"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
diff --git a/src/DMAPI/tgs/v3210/api.dm b/src/DMAPI/tgs/v3210/api.dm
index 9bcc801897..3c218d5b10 100644
--- a/src/DMAPI/tgs/v3210/api.dm
+++ b/src/DMAPI/tgs/v3210/api.dm
@@ -99,7 +99,11 @@
if(skip_compat_check && !fexists(SERVICE_INTERFACE_DLL))
TGS_ERROR_LOG("Service parameter present but no interface DLL detected. This is symptomatic of running a service less than version 3.1! Please upgrade.")
return
+ #if DM_VERSION >= 515
+ call_ext(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
+ #else
call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval
+ #endif
return TRUE
/datum/tgs_api/v3210/OnTopic(T)