diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index a7921a48bbb..2c3c85b002f 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -1,13 +1,15 @@ //Returns the world time in english /proc/worldtime2text() - return gameTimestamp("hh:mm:ss") + return gameTimestamp("hh:mm:ss", world.time) /proc/time_stamp(format = "hh:mm:ss", show_ds) var/time_string = time2text(world.timeofday, format) return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string -/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text - return time2text(world.time - timezoneOffset + 432000 - round_start_time, format) +/proc/gameTimestamp(format = "hh:mm:ss", wtime=null) + if(!wtime) + wtime = world.time + return time2text(wtime - timezoneOffset + ticker.gametime_offset - round_start_time, format) /* Returns 1 if it is the selected month and day */ /proc/isDay(month, day) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 7aafb8c3ebb..54887e5cefd 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -44,6 +44,8 @@ var/datum/controller/subsystem/ticker/ticker var/timeLeft //pregame timer var/start_at + var/gametime_offset = 432000 // equal to 12 hours, making gametime at roundstart 12:00:00 + var/totalPlayers = 0 //used for pregame stats on statpanel var/totalPlayersReady = 0 //used for pregame stats on statpanel