mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
adds seconds_to_time() proc
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
/proc/time_stamp()
|
||||
return time2text(world.timeofday, "hh:mm:ss")
|
||||
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text
|
||||
return time2text(world.time - timezoneOffset + 432000, format)
|
||||
|
||||
@@ -61,6 +61,12 @@ proc/isDay(var/month, var/day)
|
||||
*/
|
||||
/proc/stop_watch(wh)
|
||||
return round(0.1 * (TimeOfGame - wh), 0.1)
|
||||
|
||||
|
||||
/proc/month2number(month)
|
||||
return month_names.Find(month)
|
||||
return month_names.Find(month)
|
||||
|
||||
//Take a value in seconds and returns a string of minutes and seconds in the format X minute(s) and X seconds.
|
||||
/proc/seconds_to_time(var/seconds as num)
|
||||
var/numSeconds = seconds % 60
|
||||
var/numMinutes = (seconds - numSeconds) / 60
|
||||
return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds."
|
||||
Reference in New Issue
Block a user