Merge pull request #25738 from coiax/minor-time-tweaks

Minor changes to some time procs
This commit is contained in:
duncathan salt
2017-04-02 02:10:32 -06:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+5 -3
View File
@@ -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)
+2
View File
@@ -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