Merge pull request #1095 from EmperorJon/27_Feb._AFK

Adds a timer to staffwho AFK notifications.
This commit is contained in:
Neerti
2016-02-28 07:13:56 -05:00
2 changed files with 15 additions and 3 deletions

View File

@@ -86,7 +86,10 @@
msg += " - Playing"
if(C.is_afk())
msg += " (AFK)"
var/seconds = C.last_activity_seconds()
msg += " (AFK - "
msg += "[round(seconds / 60)] minutes, "
msg += "[seconds % 60] seconds)"
msg += "\n"
num_admins_online++
@@ -101,7 +104,10 @@
modmsg += " - Playing"
if(C.is_afk())
modmsg += " (AFK)"
var/seconds = C.last_activity_seconds()
modmsg += " (AFK - "
modmsg += "[round(seconds / 60)] minutes, "
modmsg += "[seconds % 60] seconds)"
modmsg += "\n"
num_mods_online++
@@ -115,7 +121,10 @@
mentmsg += " - Playing"
if(C.is_afk())
mentmsg += " (AFK)"
var/seconds = C.last_activity_seconds()
mentmsg += " (AFK - "
mentmsg += "[round(seconds / 60)] minutes, "
mentmsg += "[seconds % 60] seconds)"
mentmsg += "\n"
num_mentors_online++

View File

@@ -281,6 +281,9 @@
if(inactivity > duration) return inactivity
return 0
/client/proc/last_activity_seconds()
return inactivity / 10
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()