From 7510667932a9eb8efb2d9821530a29d8fbeb22de Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 15:22:55 -0600 Subject: [PATCH 1/7] Update st_commands.dm --- code/modules/server_tools/st_commands.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/server_tools/st_commands.dm b/code/modules/server_tools/st_commands.dm index 9ec87a595c..1e071550e0 100644 --- a/code/modules/server_tools/st_commands.dm +++ b/code/modules/server_tools/st_commands.dm @@ -51,7 +51,7 @@ /* The MIT License -Copyright (c) 2011 Dominic Tarr +Copyright (c) 2017 Jordan Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and From a85f5eea6b0ce6c401f0f4c4c0a223b7c56577ab Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 15:23:55 -0600 Subject: [PATCH 2/7] Update server_tools.dm --- code/__DEFINES/server_tools.dm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/code/__DEFINES/server_tools.dm b/code/__DEFINES/server_tools.dm index 9547c381c1..a444caf02a 100644 --- a/code/__DEFINES/server_tools.dm +++ b/code/__DEFINES/server_tools.dm @@ -1,28 +1,29 @@ -// /tg/station 13 server tools API v3.1.0.2 +// /tg/station 13 server tools API +#define SERVICE_API_VERSION_STRING "3.2.0.1" //CONFIGURATION //use this define if you want to do configuration outside of this file #ifndef SERVER_TOOLS_EXTERNAL_CONFIGURATION //Comment this out once you've filled in the below -//#error /tg/station server tools interface unconfigured +#error /tg/station server tools interface unconfigured //Required interfaces (fill in with your codebase equivalent): //create a global variable named `Name` and set it to `Value` //These globals must not be modifiable from anywhere outside of the server tools -#define SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name) +#define SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(Name, Value) //Read the value in the global variable `Name` -#define SERVER_TOOLS_READ_GLOBAL(Name) GLOB.##Name +#define SERVER_TOOLS_READ_GLOBAL(Name) //Set the value in the global variable `Name` to `Value` -#define SERVER_TOOLS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value +#define SERVER_TOOLS_WRITE_GLOBAL(Name, Value) //display an announcement `message` from the server to all players -#define SERVER_TOOLS_WORLD_ANNOUNCE(message) to_chat(world, "[html_encode(##message)]") +#define SERVER_TOOLS_WORLD_ANNOUNCE(message) //Write a string `message` to a server log -#define SERVER_TOOLS_LOG(message) log_world("SERVICE: [##message]") +#define SERVER_TOOLS_LOG(message) //Notify current in-game administrators of a string `event` -#define SERVER_TOOLS_NOTIFY_ADMINS(event) message_admins(##event) +#define SERVER_TOOLS_NOTIFY_ADMINS(event) //The current amount of connected clients -#define SERVER_TOOLS_CLIENT_COUNT GLOB.clients.len +#define SERVER_TOOLS_CLIENT_COUNT #endif //Required hooks: @@ -64,16 +65,15 @@ //IMPLEMENTATION -#define SERVICE_API_VERSION_STRING "3.1.0.2" - #define REBOOT_MODE_NORMAL 0 #define REBOOT_MODE_HARD 1 #define REBOOT_MODE_SHUTDOWN 2 #define SERVICE_WORLD_PARAM "server_service" #define SERVICE_VERSION_PARAM "server_service_version" +#define SERVICE_INSTANCE_PARAM "server_instance" #define SERVICE_PR_TEST_JSON "prtestjob.json" -#define SERVICE_INTERFACE_DLL "TGServiceInterface.dll" +#define SERVICE_INTERFACE_DLL "TGDreamDaemonBridge.dll" #define SERVICE_INTERFACE_FUNCTION "DDEntryPoint" #define SERVICE_CMD_HARD_REBOOT "hard_reboot" @@ -98,11 +98,12 @@ #define SERVICE_REQUEST_WORLD_REBOOT "worldreboot" #define SERVICE_REQUEST_API_VERSION "api_ver" +#define SERVICE_RETURN_SUCCESS "SUCCESS" + /* The MIT License -Copyright (c) 2011 Dominic Tarr - +Copyright (c) 2017 Jordan Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to From 15adc5d0b044352f3b8a26aa31b391c4947f3dd6 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 15:24:23 -0600 Subject: [PATCH 3/7] Update st_interface.dm --- code/modules/server_tools/st_interface.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/modules/server_tools/st_interface.dm b/code/modules/server_tools/st_interface.dm index 39bebbbb3d..b0b1b0a43c 100644 --- a/code/modules/server_tools/st_interface.dm +++ b/code/modules/server_tools/st_interface.dm @@ -30,7 +30,10 @@ SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(server_tools_api_compatible, FALSE) return if(skip_compat_check && !fexists(SERVICE_INTERFACE_DLL)) CRASH("Service parameter present but no interface DLL detected. This is symptomatic of running a service less than version 3.1! Please upgrade.") - call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(command) //trust no retval + var/instance = params[SERVICE_INSTANCE_PARAM] + if(!instance) + instance = "TG Station Server" //maybe just upgraded + call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance, command) //trust no retval return TRUE /world/proc/ChatBroadcast(message) @@ -72,7 +75,7 @@ SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(server_tools_api_compatible, FALSE) switch(command) if(SERVICE_CMD_API_COMPATIBLE) SERVER_TOOLS_WRITE_GLOBAL(server_tools_api_compatible, TRUE) - return "SUCCESS" + return SERVICE_RETURN_SUCCESS if(SERVICE_CMD_HARD_REBOOT) if(SERVER_TOOLS_READ_GLOBAL(reboot_mode) != REBOOT_MODE_HARD) SERVER_TOOLS_WRITE_GLOBAL(reboot_mode, REBOOT_MODE_HARD) @@ -88,7 +91,7 @@ SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(server_tools_api_compatible, FALSE) if(!istext(msg) || !msg) return "No message set!" SERVER_TOOLS_WORLD_ANNOUNCE(msg) - return "SUCCESS" + return SERVICE_RETURN_SUCCESS if(SERVICE_CMD_PLAYER_COUNT) return "[SERVER_TOOLS_CLIENT_COUNT]" if(SERVICE_CMD_LIST_CUSTOM) @@ -96,13 +99,13 @@ SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(server_tools_api_compatible, FALSE) else var/custom_command_result = HandleServiceCustomCommand(lowertext(command), params[SERVICE_CMD_PARAM_SENDER], params[SERVICE_CMD_PARAM_CUSTOM]) if(custom_command_result) - return istext(custom_command_result) ? custom_command_result : "SUCCESS" + return istext(custom_command_result) ? custom_command_result : SERVICE_RETURN_SUCCESS return "Unknown command: [command]" /* The MIT License -Copyright (c) 2011 Dominic Tarr +Copyright (c) 2017 Jordan Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and From 390c24b3fd05fba47bbb14631644e2131aa3238e Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 16:42:17 -0600 Subject: [PATCH 4/7] Create server_tools.config.dm --- code/__DEFINES/server_tools.config.dm | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 code/__DEFINES/server_tools.config.dm diff --git a/code/__DEFINES/server_tools.config.dm b/code/__DEFINES/server_tools.config.dm new file mode 100644 index 0000000000..7d3c5b8eba --- /dev/null +++ b/code/__DEFINES/server_tools.config.dm @@ -0,0 +1,8 @@ +#define SERVER_TOOLS_EXTERNAL_CONFIGURATION +#define SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name) +#define SERVER_TOOLS_READ_GLOBAL(Name) GLOB.##Name +#define SERVER_TOOLS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value +#define SERVER_TOOLS_WORLD_ANNOUNCE(message) to_chat(world, "[html_encode(##message)]") +#define SERVER_TOOLS_LOG(message) log_world("SERVICE: [##message]") +#define SERVER_TOOLS_NOTIFY_ADMINS(event) message_admins(##event) +#define SERVER_TOOLS_CLIENT_COUNT GLOB.clients.len From 75d0b6c9423d58ad4248029e9b1d3c15c8b4d2f8 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 16:43:05 -0600 Subject: [PATCH 5/7] Update tgstation.dme --- tgstation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/tgstation.dme b/tgstation.dme index 4d438607f5..737f7e8274 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -73,6 +73,7 @@ #include "code\__DEFINES\robots.dm" #include "code\__DEFINES\role_preferences.dm" #include "code\__DEFINES\say.dm" +#include "code\__DEFINES\server_tools.config.dm" #include "code\__DEFINES\server_tools.dm" #include "code\__DEFINES\shuttles.dm" #include "code\__DEFINES\sight.dm" From a9ed49d7753c4672a951f414592fef364b784d19 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 16:44:13 -0600 Subject: [PATCH 6/7] Update README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index e2b9bbfbbc..3aefb8c03e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ - -<<<<<<< HEAD ##Citadel Station 13
Based and maintained from /tg/station.
-======= + [![Build Status](https://travis-ci.org/tgstation/tgstation.png)](https://travis-ci.org/tgstation/tgstation) [![Krihelimeter](https://www.krihelinator.xyz/badge/tgstation/tgstation)](https://www.krihelinator.xyz) [![Percentage of issues still open](https://isitmaintained.com/badge/open/tgstation/tgstation.svg)](https://isitmaintained.com/project/tgstation/tgstation "Percentage of issues still open") [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/tgstation/tgstation.svg)](https://isitmaintained.com/project/tgstation/tgstation "Average time to resolve an issue") ![Coverage](https://img.shields.io/badge/coverage---2%25-red.svg) [![forthebadge](https://forthebadge.com/images/badges/built-with-resentment.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/contains-technical-debt.svg)](https://forthebadge.com) [![forinfinityandbyond](https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif)](https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a) ->>>>>>> c47dde9... Merge pull request #33172 from praisenarsie/patch-12 [![Build Status](https://api.travis-ci.org/Citadel-Station-13/Citadel-Station-13.png)](https://travis-ci.org/Citadel-Station-13/Citadel-Station-13) [![Krihelimeter](http://www.krihelinator.xyz/badge/Citadel-Station-13/Citadel-Station-13)](http://www.krihelinator.xyz) From 76e6cb4e48d84f3ef71b732e0ca6d6c5c58713c2 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 18 Dec 2017 17:31:07 -0600 Subject: [PATCH 7/7] Update server_tools.dm --- code/__DEFINES/server_tools.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/server_tools.dm b/code/__DEFINES/server_tools.dm index a444caf02a..c0fc133ada 100644 --- a/code/__DEFINES/server_tools.dm +++ b/code/__DEFINES/server_tools.dm @@ -5,7 +5,7 @@ //use this define if you want to do configuration outside of this file #ifndef SERVER_TOOLS_EXTERNAL_CONFIGURATION //Comment this out once you've filled in the below -#error /tg/station server tools interface unconfigured +//#error /tg/station server tools interface unconfigured //Required interfaces (fill in with your codebase equivalent):