From cf52ff7b4f0bfd7ac9dee094e46391dd0628c7dd Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Wed, 7 Jul 2021 01:29:13 -0500 Subject: [PATCH] Makes time/tram use REALTIMEOFDAY rather than world.time --- code/_helpers/time.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 11c7911159..e86a5aa2ae 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -44,7 +44,7 @@ var/next_station_date_change = 1 DAY #define duration2stationtime(time) time2text(station_time_in_ds + time, "hh:mm") #define worldtime2stationtime(time) time2text(GLOB.roundstart_hour HOURS + time, "hh:mm") -#define round_duration_in_ds (GLOB.round_start_time ? world.time - GLOB.round_start_time : 0) +#define round_duration_in_ds (GLOB.round_start_time ? REALTIMEOFDAY - GLOB.round_start_time : 0) #define station_time_in_ds (GLOB.roundstart_hour HOURS + round_duration_in_ds) /proc/stationtime2text() @@ -56,9 +56,7 @@ var/next_station_date_change = 1 DAY next_station_date_change += 1 DAY update_time = TRUE if(!station_date || update_time) - var/extra_days = round(station_time_in_ds / (1 DAY)) DAYS - var/timeofday = world.timeofday + extra_days - station_date = num2text((text2num(time2text(timeofday, "YYYY"))+300)) + "-" + time2text(timeofday, "MM-DD") //VOREStation Edit + station_date = num2text((text2num(time2text(REALTIMEOFDAY, "YYYY"))+300)) + "-" + time2text(REALTIMEOFDAY, "MM-DD") //VOREStation Edit return station_date //ISO 8601 @@ -96,7 +94,7 @@ var/last_round_duration = 0 GLOBAL_VAR_INIT(round_start_time, 0) /hook/roundstart/proc/start_timer() - GLOB.round_start_time = world.time + GLOB.round_start_time = REALTIMEOFDAY return 1 /proc/roundduration2text()