From 7bbe4767faaf145d4fc0fb4e14ec801833b04d0f Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sun, 3 Jun 2012 05:04:46 +0000 Subject: [PATCH] - When an admin uses 'adminwho', they will now also get information on whether the connected admins are observing (they're a ghost), playing (they're a living mob) or if they have not even entered the game (they're a new_player mob type) - In addition when an admin uses 'adminwho' they will see if the admin in the list is AFK or not. You are deemed as AFK if you have been inactive for 300 seconds = 5 minutes. - A little code standardization for port gens. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3730 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/verbs/who.dm | 10 +++++++++- code/modules/power/port_gen.dm | 13 ++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index 6c7ab4db72..3e3f37b4d9 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -31,6 +31,14 @@ for (var/mob/M in world) if(M && M.client && M.client.holder) if(usr.client.holder) - usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""]" + var/afk = 0 + if( M.client.inactivity > 3000 ) //3000 deciseconds = 300 seconds = 5 minutes + afk = 1 + if(isobserver(M)) + usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""] - Observing [afk ? "(AFK)" : ""]" + else if(istype(M,/mob/new_player)) + usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""] - Has not entered [afk ? "(AFK)" : ""]" + else if(istype(M,/mob/living)) + usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""] - Playing [afk ? "(AFK)" : ""]" else if(!M.client.stealth) usr << "\t[M.client] is a [M.client.holder.rank]" diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index cd276ee89a..12f05481ff 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -57,15 +57,14 @@ display round(lastgen) and plasmatank amount var/recent_fault = 0 var/power_output = 1 - proc - HasFuel() //Placeholder for fuel check. - return 1 + proc/HasFuel() //Placeholder for fuel check. + return 1 - UseFuel() //Placeholder for fuel use. - return + proc/UseFuel() //Placeholder for fuel use. + return - handleInactive() - return + proc/handleInactive() + return process() if(active && HasFuel() && !crit_fail && anchored)