mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Adds a timer to staffwho AFK notifications.
This commit is contained in:
@@ -86,7 +86,10 @@
|
|||||||
msg += " - Playing"
|
msg += " - Playing"
|
||||||
|
|
||||||
if(C.is_afk())
|
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"
|
msg += "\n"
|
||||||
|
|
||||||
num_admins_online++
|
num_admins_online++
|
||||||
@@ -101,7 +104,10 @@
|
|||||||
modmsg += " - Playing"
|
modmsg += " - Playing"
|
||||||
|
|
||||||
if(C.is_afk())
|
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"
|
modmsg += "\n"
|
||||||
num_mods_online++
|
num_mods_online++
|
||||||
|
|
||||||
@@ -115,7 +121,10 @@
|
|||||||
mentmsg += " - Playing"
|
mentmsg += " - Playing"
|
||||||
|
|
||||||
if(C.is_afk())
|
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"
|
mentmsg += "\n"
|
||||||
num_mentors_online++
|
num_mentors_online++
|
||||||
|
|
||||||
|
|||||||
@@ -281,6 +281,9 @@
|
|||||||
if(inactivity > duration) return inactivity
|
if(inactivity > duration) return inactivity
|
||||||
return 0
|
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
|
//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()
|
/client/proc/send_resources()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user