diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index e7fd4916c5a..08a908554a8 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -256,3 +256,6 @@ #define TRIGGER_GUARD_ALLOW_ALL -1 #define TRIGGER_GUARD_NONE 0 #define TRIGGER_GUARD_NORMAL 1 + +// Macro to get the current elapsed round time, rather than total world runtime +#define ROUND_TIME (round_start_time ? (world.time - round_start_time) : 0) diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 4973de14b81..ad1a6f25114 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -23,7 +23,7 @@ return wtime + (time_offset + wusage) * world.tick_lag //Returns the world time in english -/proc/worldtime2text(time = world.time) +/proc/worldtime2text(time = ROUND_TIME) return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]" /proc/time_stamp() diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 4917d82ed7c..035955e1de7 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -435,7 +435,7 @@ var/round_start_time = 0 end_state.count() var/station_integrity = min(round( 100.0 * start_state.score(end_state), 0.1), 100.0) - to_chat(world, "
[TAB]Shift Duration: [round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]") + to_chat(world, "
[TAB]Shift Duration: [round(ROUND_TIME / 36000)]:[add_zero("[ROUND_TIME / 600 % 60]", 2)]:[ROUND_TIME / 100 % 6][ROUND_TIME / 100 % 10]") to_chat(world, "
[TAB]Station Integrity: [mode.station_was_nuked ? "Destroyed" : "[station_integrity]%"]") to_chat(world, "
") diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 3802c7c7432..cb8d685604e 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -409,7 +409,7 @@ if (ticker && ticker.current_state >= GAME_STATE_PLAYING) var/dat = "Round Status

Round Status

" dat += "Current Game Mode: [ticker.mode.name]
" - dat += "Round Duration: [round(world.time / 36000)]:[add_zero(num2text(world.time / 600 % 60), 2)]:[add_zero(num2text(world.time / 10 % 60), 2)]
" + dat += "Round Duration: [round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]
" dat += "Emergency shuttle
" if(shuttle_master.emergency.mode < SHUTTLE_CALL) dat += "Call Shuttle
"