From a4c406a1d3ca846380ac09c1cc5f6c18bde081cd Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 22 Nov 2023 07:06:18 +0100 Subject: [PATCH] [MIRROR] Fix refresh button in log viewer [MDB IGNORE] (#24810) * Fix refresh button in log viewer (#79520) ## About The Pull Request `re-render` is a typo? https://github.com/tgstation/tgstation/blob/137aa7dc607de6e09bc890bddea15b544347f4d1/tgui/packages/tgui/interfaces/LogViewer.tsx#L66 ## Changelog :cl: fix: Fix refresh button in log viewer /:cl: * Fix refresh button in log viewer --------- Co-authored-by: vvvv-vvvv <136390975+vvvv-vvvv@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/game/world.dm | 2 +- code/modules/logging/log_holder.dm | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/code/game/world.dm b/code/game/world.dm index de638624319..99cffb74ad2 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -190,7 +190,7 @@ GLOBAL_VAR(restart_counter) data["tick_usage"] = world.tick_usage data["tick_lag"] = world.tick_lag data["time"] = world.time - data["timestamp"] = logger.unix_timestamp_string() + data["timestamp"] = rustg_unix_timestamp() return data /world/proc/SetupLogs() diff --git a/code/modules/logging/log_holder.dm b/code/modules/logging/log_holder.dm index 7d8386e77b6..1cea0e554be 100644 --- a/code/modules/logging/log_holder.dm +++ b/code/modules/logging/log_holder.dm @@ -107,7 +107,7 @@ GENERAL_PROTECT_DATUM(/datum/log_holder) return switch(action) - if("re-render") + if("refresh") cache_ui_data() SStgui.update_uis(src) return TRUE @@ -121,7 +121,7 @@ GENERAL_PROTECT_DATUM(/datum/log_holder) CRASH("Attempted to call init_logging twice!") round_id = GLOB.round_id - logging_start_timestamp = unix_timestamp_string() + logging_start_timestamp = rustg_unix_timestamp() log_categories = list() disabled_categories = list() @@ -243,13 +243,10 @@ GENERAL_PROTECT_DATUM(/datum/log_holder) if(human_readable_enabled) rustg_file_write("\[[human_readable_timestamp()]\] Starting up round ID [round_id].\n - -------------------------\n", category_instance.get_output_file(null, "log")) -/datum/log_holder/proc/unix_timestamp_string() // pending change to rust-g - return RUSTG_CALL(RUST_G, "unix_timestamp")() - /datum/log_holder/proc/human_readable_timestamp(precision = 3) var/start = time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss") // now we grab the millis from the rustg timestamp - var/rustg_stamp = unix_timestamp_string() + var/rustg_stamp = rustg_unix_timestamp() var/list/timestamp = splittext(rustg_stamp, ".") #ifdef UNIT_TESTS if(length(timestamp) != 2)