diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 4d507c865f8..52a3ce078cd 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -28,7 +28,7 @@ var/global/datum/getrev/revdata = new()
to_world_log(branch)
to_world_log(date)
to_world_log(revision)
-
+/* // HEARTH EDIT
/client/verb/showrevinfo()
set category = "OOC"
set name = "Show Server Revision"
@@ -43,4 +43,5 @@ var/global/datum/getrev/revdata = new()
else
to_chat(src, "Server Revision: Revision Unknown")
to_chat(src, "Game ID: [game_id]")
- to_chat(src, "Current map: [global.using_map.full_name]")
\ No newline at end of file
+ to_chat(src, "Current map: [global.using_map.full_name]")
+*/ //END HEARTH EDIT
\ No newline at end of file
diff --git a/mods/utility/tgsv4_integration/___tgs.dme b/mods/utility/tgsv4_integration/___tgs.dme
index bbeed1a1ce2..800f46757e7 100644
--- a/mods/utility/tgsv4_integration/___tgs.dme
+++ b/mods/utility/tgsv4_integration/___tgs.dme
@@ -5,6 +5,6 @@
#include "hooks.dm"
#include "webhook_defines.dm"
#include "chat_commands.dm"
+#include "getrev.dm"
#include "tgs2webhook_manifest.dm"
-//#include "decls.dm"
#endif
\ No newline at end of file
diff --git a/mods/utility/tgsv4_integration/__tgs.dm b/mods/utility/tgsv4_integration/__tgs.dm
index 629758c246f..ba9281fd88f 100644
--- a/mods/utility/tgsv4_integration/__tgs.dm
+++ b/mods/utility/tgsv4_integration/__tgs.dm
@@ -31,7 +31,7 @@
#define TGS_PROTECT_DATUM(Path)
/// Display an announcement `message` from the server to all players.
-#define TGS_WORLD_ANNOUNCE(message) to_chat(world, "[html_encode(##message)]")
+#define TGS_WORLD_ANNOUNCE(message) to_world("[html_encode(##message)]")
/// Notify current in-game administrators of a string `event`.
#define TGS_NOTIFY_ADMINS(event) log_and_message_admins(message)
diff --git a/mods/utility/tgsv4_integration/chat_commands.dm b/mods/utility/tgsv4_integration/chat_commands.dm
index 346a28a5c33..afc8fa780c7 100644
--- a/mods/utility/tgsv4_integration/chat_commands.dm
+++ b/mods/utility/tgsv4_integration/chat_commands.dm
@@ -16,7 +16,7 @@
/datum/tgs_chat_command/tgscheck/Run(datum/tgs_chat_user/sender, params)
var/server = config.server
- return "[game_id ? "Round #[game_id]: " : ""][global.clients.len] players on [global.using_map.full_name], Mode: [SSticker.mode ? SSticker.mode.name : "Not started"]; Round [Master.current_runlevel >= RUNLEVEL_GAME ? (Master.current_runlevel == RUNLEVEL_GAME ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]"
+ return "[game_id ? "Round #[game_id]: " : ""][global.clients.len] players on [global.using_map.full_name], Mode: [SSticker.mode ? PUBLIC_GAME_MODE : "Not started"]; Round [GAME_STATE >= RUNLEVEL_GAME ? (GAME_STATE == RUNLEVEL_GAME ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]"
/datum/tgs_chat_command/tgs_manifest_webhook
name = "manifest"
diff --git a/mods/utility/tgsv4_integration/decls.dm b/mods/utility/tgsv4_integration/decls.dm
deleted file mode 100644
index 8ab852a4e57..00000000000
--- a/mods/utility/tgsv4_integration/decls.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/decl/topic_command/tgs
- base_type = /decl/topic_command/tgs
-#ifdef TGS_V3_AI
-/decl/topic_command/tgs/three
- name = SERVICE_CMD_PARAM_COMMAND
-#endif
-/decl/topic_command/tgs/four
- name = TGS4_PARAMETER_COMMAND
-/decl/topic_command/tgs/five
- name = DMAPI5_TOPIC_DATA
-/// Bypasses can_use for TGS' internal handling.
-/decl/topic_command/tgs/try_use(var/T, var/addr, var/master, var/key)
- TGS_TOPIC
\ No newline at end of file
diff --git a/mods/utility/tgsv4_integration/getrev.dm b/mods/utility/tgsv4_integration/getrev.dm
new file mode 100644
index 00000000000..662fd0d05a7
--- /dev/null
+++ b/mods/utility/tgsv4_integration/getrev.dm
@@ -0,0 +1,67 @@
+/datum/getrev
+ var/origincommit // git rev-parse origin/dev
+ var/list/testmerge = list()
+
+/datum/getrev/proc/load_tgs_info()
+ testmerge = world.TgsTestMerges()
+ var/datum/tgs_revision_information/revinfo = world.TgsRevision()
+ if(revinfo)
+ revision = revinfo.commit
+ origincommit = revinfo.origin_commit
+ date = revinfo.timestamp
+
+ // goes to DD log and config_error.txt
+ log_world(get_log_message())
+
+/datum/getrev/proc/get_log_message()
+ var/list/msg = list()
+ msg += "Running Hearth of Hestia revision: [date]"
+ if(origincommit)
+ msg += "Origin commit: [origincommit]"
+
+ for(var/datum/tgs_revision_information/test_merge/tm as anything in testmerge)
+ msg += "Test merge active of PR #[tm.number] commit [tm.head_commit]"
+
+ if(revision && revision != origincommit)
+ msg += "HEAD: [revision]"
+ else if(!origincommit)
+ msg += "No commit information"
+
+ return msg.Join("\n")
+
+/datum/getrev/proc/GetTestMergeInfo(header = TRUE)
+ if(!testmerge.len)
+ return ""
+ . = header ? "The following pull requests are currently test merged:
" : ""
+ for(var/datum/tgs_revision_information/test_merge/tm as anything in testmerge)
+ var/cm = tm.head_commit
+ var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
+ if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
+ continue
+ . += "#[tm.number][details]
"
+
+/client/verb/showrevinfo()
+ set category = "OOC"
+ set name = "Show Server Revision"
+ set desc = "Check the current server code revision"
+
+ to_chat(src, "Game ID: [game_id]>")
+ to_chat(src, "Client BYOND Version: [byond_version].[byond_build]")
+ to_chat(src, "Server BYOND Version: [world.byond_version].[world.byond_build]")
+ if(DM_VERSION != world.byond_version || DM_BUILD != world.byond_build)
+ to_chat(src, "Compiled with BYOND Version: [DM_VERSION].[DM_BUILD]")
+ to_chat(src, "Current map: [global.using_map.full_name]")
+ if(global.revdata.branch)
+ to_chat(src, "Origin branch: [global.revdata.branch]")
+ var/parent_commit = global.revdata.origincommit
+ if(parent_commit)
+ to_chat(src, "Origin commit: [parent_commit]")
+ if(global.revdata.testmerge.len)
+ to_chat(src, global.revdata.GetTestMergeInfo())
+ if(global.revdata.revision && global.revdata.revision != parent_commit)
+ to_chat(src, "Local commit: [global.revdata.revision]")
+ if(world.TgsAvailable())
+ var/datum/tgs_version/version = world.TgsVersion()
+ to_chat(src, "TGS version: [version.raw_parameter]")
+ var/datum/tgs_version/api_version = world.TgsApiVersion()
+ to_chat(src, "DMAPI version: [api_version.raw_parameter]")
\ No newline at end of file
diff --git a/mods/utility/tgsv4_integration/hooks.dm b/mods/utility/tgsv4_integration/hooks.dm
index dfd8b980a43..4847c51c2a6 100644
--- a/mods/utility/tgsv4_integration/hooks.dm
+++ b/mods/utility/tgsv4_integration/hooks.dm
@@ -4,6 +4,7 @@
/hook/global_init/proc/tgs_on_init()
world.TgsInitializationComplete()
+ global.revdata.load_tgs_info()
return TRUE
/hook/shutdown/proc/tgs_on_shutdown()
diff --git a/mods/utility/tgsv4_integration/tgs/decls.dm b/mods/utility/tgsv4_integration/tgs/decls.dm
index 8ab852a4e57..8aa2ccd4253 100644
--- a/mods/utility/tgsv4_integration/tgs/decls.dm
+++ b/mods/utility/tgsv4_integration/tgs/decls.dm
@@ -1,6 +1,6 @@
/decl/topic_command/tgs
base_type = /decl/topic_command/tgs
-#ifdef TGS_V3_AI
+#ifdef TGS_V3_API
/decl/topic_command/tgs/three
name = SERVICE_CMD_PARAM_COMMAND
#endif