mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 13:07:07 +01:00
511 DMAPI compatibility + CI
This commit is contained in:
@@ -65,7 +65,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
byond: [ '512.1488', '513.1542', '514.1589', 'EDGE' ]
|
||||
byond: [ '511.1385', '512.1488', '513.1542', '514.1589', 'EDGE' ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install x86 libc Dependencies
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
user.friendly_name = sender
|
||||
|
||||
// Discord hack, fix the mention if it's only numbers (fuck you IRC trolls)
|
||||
var/regex/discord_id_regex = regex(@"^[0-9]+$")
|
||||
var/regex/discord_id_regex = regex("^\[0-9\]+$")
|
||||
if(findtext(sender, discord_id_regex))
|
||||
sender = "<@[sender]>"
|
||||
|
||||
@@ -55,4 +55,4 @@
|
||||
var/datum/tgs_message_content/result = stc.Run(user, params)
|
||||
result = UpgradeDeprecatedCommandResponse(result, command)
|
||||
|
||||
return result?.text || TRUE
|
||||
return result ? result.text : TRUE
|
||||
|
||||
@@ -40,5 +40,5 @@
|
||||
var/datum/tgs_message_content/result = sc.Run(u, params)
|
||||
result = UpgradeDeprecatedCommandResponse(result, command)
|
||||
|
||||
return result?.text
|
||||
return result ? result.text : TRUE
|
||||
return "Unknown command: [command]!"
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
response = UpgradeDeprecatedCommandResponse(response, command)
|
||||
|
||||
var/list/topic_response = TopicResponse()
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE] = response?.text
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE] = response?._interop_serialize()
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE] = response ? response.text : null
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE] = response ? response._interop_serialize() : null
|
||||
return topic_response
|
||||
return TopicResponse("Unknown custom chat command: [command]!")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/tgs_message_content/proc/_interop_serialize()
|
||||
return list("text" = text, "embed" = embed?._interop_serialize())
|
||||
return list("text" = text, "embed" = embed ? embed._interop_serialize() : null)
|
||||
|
||||
/datum/tgs_chat_embed/proc/_interop_serialize()
|
||||
CRASH("Base /proc/interop_serialize called on [type]!")
|
||||
@@ -16,12 +16,12 @@
|
||||
"url" = url,
|
||||
"timestamp" = timestamp,
|
||||
"colour" = colour,
|
||||
"image" = image?._interop_serialize(),
|
||||
"thumbnail" = thumbnail?._interop_serialize(),
|
||||
"video" = video?._interop_serialize(),
|
||||
"footer" = footer?._interop_serialize(),
|
||||
"provider" = provider?._interop_serialize(),
|
||||
"author" = author?._interop_serialize(),
|
||||
"image" = src.image ? src.image._interop_serialize() : null,
|
||||
"thumbnail" = thumbnail ? thumbnail._interop_serialize() : null,
|
||||
"video" = video ? video._interop_serialize() : null,
|
||||
"footer" = footer ? footer._interop_serialize() : null,
|
||||
"provider" = provider ? provider._interop_serialize() : null,
|
||||
"author" = author ? author._interop_serialize() : null,
|
||||
"fields" = serialized_fields
|
||||
)
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return TopicResponse()
|
||||
|
||||
if(DMAPI5_TOPIC_COMMAND_HEALTHCHECK)
|
||||
if(event_handler?.receive_health_checks)
|
||||
if(event_handler && event_handler.receive_health_checks)
|
||||
event_handler.HandleEvent(TGS_EVENT_HEALTH_CHECK)
|
||||
return TopicResponse()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user