Skip to content

Commit 2e65e01

Browse files
Update TGS DMAPI
1 parent 5366aa5 commit 2e65e01

7 files changed

Lines changed: 32 additions & 3 deletions

File tree

code/__DEFINES/tgs.dm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tgstation-server DMAPI
22
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119.
33

4-
#define TGS_DMAPI_VERSION "7.3.5"
4+
#define TGS_DMAPI_VERSION "7.4.0"
55

66
// All functions and datums outside this document are subject to change with any version and should not be relied on.
77

@@ -584,11 +584,17 @@
584584
/world/proc/TgsTriggerEvent(event_name, list/parameters, wait_for_completion = FALSE)
585585
CAN_BE_REDEFINED(TRUE)
586586
return
587+
588+
589+
/// Trigger a TGS deployment for the current instance. The current state of the repository will not be changed.
590+
/world/proc/TgsTriggerDeployment()
591+
CAN_BE_REDEFINED(TRUE)
592+
return
587593

588594
/*
589595
The MIT License
590596
591-
Copyright (c) 2017-2024 Jordan Brown
597+
Copyright (c) 2017-2026 Jordan Brown
592598
593599
Permission is hereby granted, free of charge,
594600
to any person obtaining a copy of this software and

code/modules/tgs/core/core.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,8 @@
177177
parameters = list()
178178

179179
return api.TriggerEvent(event_name, parameters, wait_for_completion)
180+
181+
/world/TgsTriggerDeployment()
182+
var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs)
183+
if(api)
184+
return api.TriggerDeployment()

code/modules/tgs/core/datum.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ TGS_PROTECT_DATUM(/datum/tgs_api)
7272

7373
/datum/tgs_api/proc/TriggerEvent(event_name, list/parameters, wait_for_completion)
7474
return FALSE
75+
76+
/datum/tgs_api/proc/TriggerDeployment()
77+
return TGS_UNIMPLEMENTED
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"5.10.1"
1+
"5.11.0"

code/modules/tgs/v5/_defines.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define DMAPI5_BRIDGE_COMMAND_CHAT_SEND 5
1616
#define DMAPI5_BRIDGE_COMMAND_CHUNK 6
1717
#define DMAPI5_BRIDGE_COMMAND_EVENT 7
18+
#define DMAPI5_BRIDGE_COMMAND_DEPLOY 8
1819

1920
#define DMAPI5_PARAMETER_ACCESS_IDENTIFIER "accessIdentifier"
2021
#define DMAPI5_PARAMETER_CUSTOM_COMMANDS "customCommands"

code/modules/tgs/v5/api.dm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,19 @@
294294

295295
return TRUE
296296

297+
/datum/tgs_api/v5/TriggerDeployment(event_name, list/parameters, wait_for_completion)
298+
RequireInitialBridgeResponse()
299+
WaitForReattach(TRUE)
300+
301+
if(interop_version.minor < 11)
302+
TGS_WARNING_LOG("Interop version too low for triggering deployments!")
303+
return FALSE
304+
305+
var response = Bridge(DMAPI5_BRIDGE_COMMAND_DEPLOY)
306+
if(!response)
307+
return FALSE
308+
return TRUE
309+
297310
/datum/tgs_api/v5/proc/DecodeChannels(chat_update_json)
298311
TGS_DEBUG_LOG("DecodeChannels()")
299312
var/list/chat_channels_json = chat_update_json[DMAPI5_CHAT_UPDATE_CHANNELS]

code/modules/tgs/v5/undefs.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#undef DMAPI5_BRIDGE_COMMAND_CHAT_SEND
1616
#undef DMAPI5_BRIDGE_COMMAND_CHUNK
1717
#undef DMAPI5_BRIDGE_COMMAND_EVENT
18+
#undef DMAPI5_BRIDGE_COMMAND_DEPLOY
1819

1920
#undef DMAPI5_PARAMETER_ACCESS_IDENTIFIER
2021
#undef DMAPI5_PARAMETER_CUSTOM_COMMANDS

0 commit comments

Comments
 (0)