Skip to content

Commit

Permalink
Merge pull request #1817 from tgstation/revert-1816-rinfo
Browse files Browse the repository at this point in the history
Revert "Add Revision Date to V3 DMAPI"
  • Loading branch information
Cyberboss authored May 11, 2024
2 parents 765dce8 + daac696 commit 0d96155
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TgsCommonLibraryVersion>7.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>13.3.0</TgsApiLibraryVersion>
<TgsClientVersion>15.3.0</TgsClientVersion>
<TgsDmapiVersion>7.1.3</TgsDmapiVersion>
<TgsDmapiVersion>7.1.2</TgsDmapiVersion>
<TgsInteropVersion>5.9.0</TgsInteropVersion>
<TgsHostWatchdogVersion>1.4.1</TgsHostWatchdogVersion>
<TgsContainerScriptVersion>1.2.1</TgsContainerScriptVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/DMAPI/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "7.1.3"
#define TGS_DMAPI_VERSION "7.1.2"

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

Expand Down
25 changes: 0 additions & 25 deletions src/DMAPI/tgs/v3210/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
var/instance_name
var/originmastercommit
var/commit
var/revision_date
var/list/cached_custom_tgs_chat_commands
var/warned_revison = FALSE
var/warned_custom_commands = FALSE
Expand Down Expand Up @@ -77,21 +76,6 @@
logs = splittext(logs[logs.len], " ")
if (logs.len >= 2)
originmastercommit = logs[2]
#if DM_VERSION >= 514
if(logs.len >= 5)
var/revision_date_epoch = text2num(logs[5])
if(isnum(revision_date_epoch))
revision_date = unix_epoch_to_iso_timestamp(revision_date_epoch)
else
revision_date = ""
TGS_ERROR_LOG("Error parsing origin commit timestamp as number")
else
revision_date = ""
TGS_ERROR_LOG("Error parsing origin commmit timestamp at all")
#else
revision_date = ""
TGS_WARNING_LOG("Revision date parsing is not support on versions below 514")
#endif
else
TGS_ERROR_LOG("Error parsing origin commmit logs")

Expand Down Expand Up @@ -200,7 +184,6 @@
var/datum/tgs_revision_information/ri = new
ri.commit = commit
ri.origin_commit = originmastercommit
ri.timestamp = revision_date
return ri

/datum/tgs_api/v3210/EndProcess()
Expand Down Expand Up @@ -228,14 +211,6 @@
/datum/tgs_api/v3210/SecurityLevel()
return TGS_SECURITY_TRUSTED

#if DM_VERSION >= 514
/datum/tgs_api/v3210/proc/unix_epoch_to_iso_timestamp(epoch)
epoch += world.timezone * 3600 // adjust for timezone
epoch -= 946684800 // adjust for unix to byond epoch lapse (30 years)
epoch *= 10 // adjust for time2text expecting decisonds
return time2text(epoch, "YYYY-MM-DDThh:mm:ss", 0)
#endif

#undef REBOOT_MODE_NORMAL
#undef REBOOT_MODE_HARD
#undef REBOOT_MODE_SHUTDOWN
Expand Down

0 comments on commit 0d96155

Please sign in to comment.