Lock the V3 DMAPI behind a define to fix #717

This commit is contained in:
Cyberboss
2018-09-25 15:08:55 -04:00
parent 9905762ee2
commit 9236427713
3 changed files with 14 additions and 0 deletions
+4
View File
@@ -7,6 +7,10 @@
//create this define if you want to do configuration outside of this file
#ifndef TGS_EXTERNAL_CONFIGURATION
//Uncomment this if you wish to allow the game to interact with TGS 3
//This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()()
//#define TGS_V3_API
//Comment this out once you've filled in the below
#error TGS API unconfigured
+8
View File
@@ -4,6 +4,10 @@
TGS_ERROR_LOG("TgsNew(): TGS API datum already set ([current_api])!")
return
#ifdef TGS_V3_API
minimum_required_security_level = TGS_SECURITY_TRUSTED
#endif
var/tgs_version = world.params[TGS_VERSION_PARAMETER]
if(!tgs_version)
return
@@ -36,9 +40,13 @@
switch(super)
if(3)
#ifndef TGS_V3_API
TGS_ERROR_LOG("Detected V3 API but TGS_V3_API isn't defined!")
#else
switch(major)
if(2)
return /datum/tgs_api/v3210
#endif
if(4)
switch(major)
if(0)
+2
View File
@@ -2,7 +2,9 @@
#include "core\core.dm"
#include "core\datum.dm"
#include "core\default_event_handler.dm"
#ifdef TGS_V3_API
#include "v3210\api.dm"
#include "v3210\commands.dm"
#endif
#include "v4\api.dm"
#include "v4\commands.dm"