From be0b86bed98570edcbe87b5bdbc79d0cd5909090 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Thu, 7 Jun 2012 01:21:26 +0100 Subject: [PATCH] TG: - 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. Revision: r3730 Author: baloh.matevz --- code/game/verbs/who.dm | 10 +++++++++- code/modules/power/port_gen.dm | 15 +++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index 26ac9307b61..e197d419f49 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -31,7 +31,15 @@ for (var/mob/M in world) if(M && M.client && M.client.holder) if(usr.client.holder && (usr.client.holder.level != 0)) - 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 && (M.client.holder.level != -3)) usr << "\t[pick(nobles)] [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 be46259e7ff..c421c563040 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -1,4 +1,4 @@ -//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 /* new portable generator - work in progress @@ -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)