From 66d43823443b8cdb08a0f850930a73d89de92e88 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 25 Apr 2018 12:06:16 -0400 Subject: [PATCH] Fix DMAPI test build --- .gitignore | 3 + .travis.yml | 5 +- src/DMAPI/tgs.dm | 5 +- src/DMAPI/tgs/core/core.dm | 50 +++++++------- src/DMAPI/tgs/core/datum.dm | 46 ++++++------- src/DMAPI/tgs/core/default_event_handler.dm | 30 +++++++++ src/DMAPI/tgs/includes.dm | 1 + src/DMAPI/tgs/v3210/api.dm | 75 ++++++++++++--------- src/DMAPI/tgs/v3210/commands.dm | 21 +++--- tests/DMAPI/Test.dm | 28 ++------ tgstation-server.sln | 1 + 11 files changed, 147 insertions(+), 118 deletions(-) create mode 100644 src/DMAPI/tgs/core/default_event_handler.dm diff --git a/.gitignore b/.gitignore index 9b60069c91..5074f2b86e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ artifacts/ *.sln.ide /TestResults /src/Tgstation.Server.Host/appsettings.Development.json +/tests/DMAPI/travistester.lk +/tests/DMAPI/travistester.int +/tests/DMAPI/travistester.dmb diff --git a/.travis.yml b/.travis.yml index 97c26e9698..3643b77270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: generic sudo: false - +git: + depth: 1 env: global: - BYOND_MAJOR="511" @@ -21,4 +22,4 @@ install: - build/install_byond.sh script: - - test/DMAPI/build_byond.sh + - tests/DMAPI/build_byond.sh diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm index 9fbaf61555..e885b06397 100644 --- a/src/DMAPI/tgs.dm +++ b/src/DMAPI/tgs.dm @@ -76,6 +76,7 @@ //represents a merge of a GitHub pull request /datum/tgs_revision_information/test_merge var/number //pull request number + var/title //pull request title var/body //pull request body var/author //pull request github author var/url //link to pull request html @@ -104,7 +105,7 @@ return //user definable chat command -/datum/server_tools_command +/datum/tgs_chat_command var/name = "" //the string to trigger this command on a chat bot. e.g. TGS3_BOT: do_this_command var/help_text = "" //help text for this command var/admin_only = FALSE //set to TRUE if this command should only be usable by registered chat admins @@ -113,7 +114,7 @@ //sender: The tgs_chat_user who send to command //params: The trimmed string following the command name //The return value will be stringified and sent to the appropriate chat -/datum/server_tools_command/proc/Run(datum/tgs_chat_user/sender, params) +/datum/tgs_chat_command/proc/Run(datum/tgs_chat_user/sender, params) CRASH("[type] has no implementation for Run()") //FUNCTIONS diff --git a/src/DMAPI/tgs/core/core.dm b/src/DMAPI/tgs/core/core.dm index c36caa25c9..ffeab4289b 100644 --- a/src/DMAPI/tgs/core/core.dm +++ b/src/DMAPI/tgs/core/core.dm @@ -3,20 +3,20 @@ if(!tgs_version) return - var/path = SelectTgsApi(tgs_verison) + var/path = SelectTgsApi(tgs_version) if(!path) TGS_ERROR_LOG("Found unsupported API version: [tgs_version]. If this is a valid version please report this, backporting is done on demand.") var/datum/tgs_api/new_api = new path TGS_INFO_LOG("Activated tgstation-server API for version [tgs_version]") - - var/result = new_api.OnNew(event_handler ? event_handler : new /datum/tgs_event_handler/tgs_default) + + var/result = new_api.OnWorldNew(event_handler ? event_handler : new /datum/tgs_event_handler/tgs_default) if(result && result != TGS_UNIMPLEMENTED) TGS_WRITE_GLOBAL(tgs, new_api) /world/proc/SelectTgsApi(tgs_version) var/list/version_bits = splittext(tgs_version, ".") - + var/super = text2num(version_bits[0]) var/major = text2num(version_bits[1]) var/minor = text2num(version_bits[2]) @@ -27,14 +27,14 @@ switch(major) if(2) return /datum/tgs_api/v3210 - + if(super != null && major != null && minor != null && patch != null && tgs_version > TgsMaximumAPIVersion()) TGS_ERROR_LOG("Detected unknown API version! Defaulting to latest. Update the DMAPI to fix this problem.") return /datum/tgs_api/latest -/world/proc/TgsMaximumAPIVersion() +/world/TgsMaximumAPIVersion() return "4.0.0.0" - + /world/TgsMinimumAPIVersion() return "3.2.0.0" @@ -43,7 +43,7 @@ if(api) api.OnInitializationComplete() -/world/TgsTopic(T) +/world/proc/TgsTopic(T) var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs) if(api) var/result = api.OnTopic(T) @@ -53,7 +53,7 @@ /world/TgsRevision() var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs) if(api) - var/result = api.Revison() + var/result = api.Revision() if(result != TGS_UNIMPLEMENTED) return result @@ -104,7 +104,7 @@ /world/TgsTargetedChatBroadcast(message, admin_only) var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs) if(api) - api.TargetedChatBroadcast(message, admin_only) + api.ChatTargetedBroadcast(message, admin_only) /world/TgsChatPrivateMessage(message, datum/tgs_chat_user/user) var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs) @@ -116,24 +116,24 @@ The MIT License 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 -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ diff --git a/src/DMAPI/tgs/core/datum.dm b/src/DMAPI/tgs/core/datum.dm index 996412cfeb..0a8782529e 100644 --- a/src/DMAPI/tgs/core/datum.dm +++ b/src/DMAPI/tgs/core/datum.dm @@ -1,4 +1,4 @@ -SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(datum/tgs_api/tgs, null) +TGS_DEFINE_AND_SET_GLOBAL(datum/tgs_api/tgs, null) /datum/tgs_api @@ -9,25 +9,25 @@ TGS_PROTECT_DATUM(/datum/tgs_api) /datum/tgs_api/proc/ApiVersion() return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/OnWorldNew(datum/tgs_event_handler/event_handler) - return TGS_UNIMPLEMENTED + return TGS_UNIMPLEMENTED /datum/tgs_api/proc/OnInitializationComplete() return TGS_UNIMPLEMENTED /datum/tgs_api/proc/OnTopic(T) return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/OnReboot() return TGS_UNIMPLEMENTED /datum/tgs_api/proc/InstanceName() return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/TestMerges() return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/EndProcess() return TGS_UNIMPLEMENTED @@ -36,10 +36,10 @@ TGS_PROTECT_DATUM(/datum/tgs_api) /datum/tgs_api/proc/ChatChannelInfo() return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/ChatBroadcast(message, list/channels) return TGS_UNIMPLEMENTED - + /datum/tgs_api/proc/ChatTargetedBroadcast(message, admin_only) return TGS_UNIMPLEMENTED @@ -51,24 +51,24 @@ The MIT License 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 -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ diff --git a/src/DMAPI/tgs/core/default_event_handler.dm b/src/DMAPI/tgs/core/default_event_handler.dm new file mode 100644 index 0000000000..716715bb26 --- /dev/null +++ b/src/DMAPI/tgs/core/default_event_handler.dm @@ -0,0 +1,30 @@ +/datum/tgs_event_handler/tgs_default/HandleEvent(event_code) + //TODO + return + +/* +The MIT License + +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 +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ diff --git a/src/DMAPI/tgs/includes.dm b/src/DMAPI/tgs/includes.dm index 1d1d5dce1c..7ca906c840 100644 --- a/src/DMAPI/tgs/includes.dm +++ b/src/DMAPI/tgs/includes.dm @@ -1,5 +1,6 @@ #include "core\_definitions.dm" #include "core\core.dm" #include "core\datum.dm" +#include "core\default_event_handler.dm" #include "v3210\api.dm" #include "v3210\commands.dm" diff --git a/src/DMAPI/tgs/v3210/api.dm b/src/DMAPI/tgs/v3210/api.dm index fa495506a0..7de257f9b4 100644 --- a/src/DMAPI/tgs/v3210/api.dm +++ b/src/DMAPI/tgs/v3210/api.dm @@ -34,40 +34,51 @@ var/instance_name var/originmastercommit var/commit - var/list/cached_custom_server_tools_commands + var/list/cached_custom_tgs_chat_commands var/warned_revison = FALSE var/warned_custom_commands = FALSE /datum/tgs_api/v3210/ApiVersion() return "3.2.1.0" - + +/datum/tgs_api/v3210/proc/trim_left(text) + for (var/i = 1 to length(text)) + if (text2ascii(text, i) > 32) + return copytext(text, i) + return "" + +/datum/tgs_api/v3210/proc/trim_right(text) + for (var/i = length(text), i > 0, i--) + if (text2ascii(text, i) > 32) + return copytext(text, 1, i + 1) + return "" + /datum/tgs_api/v3210/OnWorldNew(datum/tgs_event_handler/event_handler) //don't use event handling in this version comms_key = world.params[SERVICE_WORLD_PARAM] instance_name = world.params[SERVICE_INSTANCE_PARAM] if(!instance_name) instance_name = "TG Station Server" //maybe just upgraded - - var/list/logs = world.file2list(".git/logs/HEAD") - if(logs) + var/list/logs = splittext(trim_left(trim_right(file2text(".git/logs/HEAD"))), "\n") + if(logs.len) logs = splittext(logs[logs.len - 1], " ") - date = unix2date(text2num(logs[5])) commit = logs[2] - log_world("[commit]: [date]") logs = world.file2list(".git/logs/refs/remotes/origin/master") if(logs.len) - originmastercommit = splittext(logs[logs.len - 1], " ")[2] + originmastercommit = splittext(logs[logs.len - 1], " ")[2] if(world.system_type != MS_WINDOWS) TGS_ERROR_LOG("This API version is only supported on Windows. Not running on Windows. Aborting initialization!") return FALSE ListServiceCustomCommands(TRUE) - ExportService("[SERVICE_REQUEST_API_VERSION] [SERVER_TOOLS_API_VERSION]", TRUE) + ExportService("[SERVICE_REQUEST_API_VERSION] [ApiVersion()]", TRUE) + +/world/proc/file2list(filename, seperator="\n", trim = TRUE) //nothing to do for v3 /datum/tgs_api/v3210/OnInitializationComplete() return - + /datum/tgs_api/v3210/InstanceName() return world.params[SERVICE_INSTANCE_PARAM] @@ -76,13 +87,13 @@ 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 - call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance, command) //trust no retval + call(SERVICE_INTERFACE_DLL, SERVICE_INTERFACE_FUNCTION)(instance_name, command) //trust no retval return TRUE /datum/tgs_api/v3210/OnTopic(T) var/list/params = params2list(T) var/their_sCK = params[SERVICE_CMD_PARAM_KEY] - if(!their_sCK || !RunningService(TRUE)) + if(!their_sCK) return FALSE //continue world/Topic if(their_sCK != comms_key) @@ -120,7 +131,7 @@ if(custom_command_result) return istext(custom_command_result) ? custom_command_result : SERVICE_RETURN_SUCCESS return "Unknown command: [command]" - + /datum/tgs_api/v3210/OnReboot() switch(reboot_mode) if(REBOOT_MODE_HARD) @@ -131,11 +142,11 @@ EndProcess() else ExportService(SERVICE_REQUEST_WORLD_REBOOT) //just let em know - + /datum/tgs_api/v3210/TestMerges() //do the best we can here as the datum can't be completed using the v3 api - . = list - if(!RunningService(TRUE) || !fexists(SERVICE_PR_TEST_JSON)) + . = list() + if(!fexists(SERVICE_PR_TEST_JSON)) return var/list/json = json_decode(file2text(SERVICE_PR_TEST_JSON)) if(!json) @@ -201,31 +212,31 @@ #undef SERVICE_REQUEST_WORLD_REBOOT #undef SERVICE_REQUEST_API_VERSION -#undef SERVICE_RETURN_SUCCESS "SUCCESS" +#undef SERVICE_RETURN_SUCCESS /* The MIT License 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 -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ diff --git a/src/DMAPI/tgs/v3210/commands.dm b/src/DMAPI/tgs/v3210/commands.dm index 9e4e6979f4..e823c16d26 100644 --- a/src/DMAPI/tgs/v3210/commands.dm +++ b/src/DMAPI/tgs/v3210/commands.dm @@ -8,13 +8,12 @@ var/list/command_name_types = list() var/list/warned_command_names = warnings_only ? list() : null var/warned_about_the_dangers_of_robutussin = !warnings_only - for(var/I in typesof(/datum/server_tools_command) - /datum/server_tools_command) + for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) if(!warned_about_the_dangers_of_robutussin) TGS_ERROR_LOG("Custom chat commands in [ApiVersion()] lacks the /datum/tgs_chat_user/sender.channel field!") warned_about_the_dangers_of_robutussin = TRUE - var/datum/server_tools_command/stc = I + var/datum/tgs_chat_command/stc = I var/command_name = initial(stc.name) - var/static/list/warned_server_tools_names = list() if(!command_name || findtext(command_name, " ") || findtext(command_name, "'") || findtext(command_name, "\"")) if(warnings_only && !warned_command_names[command_name]) TGS_ERROR_LOG("Custom command [command_name] can't be used as it is empty or contains illegal characters!") @@ -28,19 +27,19 @@ command_name_types[stc] = command_name if(!warnings_only) - .[command_name] = list(SERVICE_JSON_PARAM_HELPTEXT = initial(stc.help_text), SERVICE_JSON_PARAM_ADMINONLY = initial(stc.admin_only), SERVICE_JSON_PARAM_REQUIREDPARAMETERS = initial(stc.required_parameters)) + .[command_name] = list(SERVICE_JSON_PARAM_HELPTEXT = initial(stc.help_text), SERVICE_JSON_PARAM_ADMINONLY = initial(stc.admin_only), SERVICE_JSON_PARAM_REQUIREDPARAMETERS = 0) /datum/tgs_api/v3210/proc/HandleServiceCustomCommand(command, sender, params) - if(!cached_custom_server_tools_commands) - cached_custom_server_tools_commands = list() - for(var/I in typesof(/datum/server_tools_command) - /datum/server_tools_command) - var/datum/server_tools_command/stc = I - cached_custom_server_tools_commands[lowertext(initial(stc.name))] = stc + if(!cached_custom_tgs_chat_commands) + cached_custom_tgs_chat_commands = list() + for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command) + var/datum/tgs_chat_command/stc = I + cached_custom_tgs_chat_commands[lowertext(initial(stc.name))] = stc - var/command_type = cached_custom_server_tools_commands[command] + var/command_type = cached_custom_tgs_chat_commands[command] if(!command_type) return FALSE - var/datum/server_tools_command/stc = new command_type + var/datum/tgs_chat_command/stc = new command_type return stc.Run(sender, params) || TRUE /* diff --git a/tests/DMAPI/Test.dm b/tests/DMAPI/Test.dm index 91c97a26d6..addf8c7603 100644 --- a/tests/DMAPI/Test.dm +++ b/tests/DMAPI/Test.dm @@ -1,36 +1,18 @@ /world/New() - SERVER_TOOLS_ON_NEW - world.log << "Service API Version: [SERVER_TOOLS_API_VERSION]" - WaitForAPICompatResponse() + TgsNew() + TgsInitializationComplete() /world/Topic(T, Addr, Master, Keys) - SERVER_TOOLS_ON_TOPIC + TGS_TOPIC /world/Reboot(reason) - SERVER_TOOLS_ON_REBOOT - SERVER_TOOLS_REBOOT_BYOND(FALSE) + TgsReboot() /proc/message_admins(event) + event = "Admins: [event]" world << event world.log << event -/proc/WaitForAPICompatResponse() - set waitfor = FALSE - sleep(50) - if(!SERVER_TOOLS_PRESENT) - world.log << "No running service detected" - del(world) - return - world.log << "Running service version: [SERVER_TOOLS_VERSION]" - var/list/prs = SERVER_TOOLS_PR_LIST - for(var/I in prs) - var/data = prs[I] - world.log << "Testmerge: #[I]: [data["title"]] by [data["author"]] at commit [data["commit"]]" - var/checks_complete = "Server tools API checks complete! Rebooting..." - SERVER_TOOLS_CHAT_BROADCAST(checks_complete) - SERVER_TOOLS_RELAY_BROADCAST(checks_complete) - world.Reboot() - var/list/clients = list() /client/New() diff --git a/tgstation-server.sln b/tgstation-server.sln index a899fc5709..3cd8efcb76 100644 --- a/tgstation-server.sln +++ b/tgstation-server.sln @@ -71,6 +71,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{DCCBA9DA-4 src\DMAPI\tgs\core\_definitions.dm = src\DMAPI\tgs\core\_definitions.dm src\DMAPI\tgs\core\core.dm = src\DMAPI\tgs\core\core.dm src\DMAPI\tgs\core\datum.dm = src\DMAPI\tgs\core\datum.dm + src\DMAPI\tgs\core\default_event_handler.dm = src\DMAPI\tgs\core\default_event_handler.dm EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "v3210", "v3210", "{1B228ACB-60C3-4DF9-B716-9F0BD31F6766}"