mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 08:33:19 +01:00
Lock the V3 DMAPI behind a define to fix #717
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
Reference in New Issue
Block a user