BS12 Detective Work port.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3229 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
joe.heinemeyer@gmail.com
2012-03-02 05:23:08 +00:00
parent 39b8f7b798
commit 113beeb052
35 changed files with 9900 additions and 8470 deletions

View File

@@ -716,3 +716,73 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.update_clothing()
return
/client/proc/cmd_debug_blood()
set category = "Debug"
set name = "Analyze all blood_DNA"
// to prevent REALLY stupid activations
switch(alert("Are you sure?", ,"Yes", "No"))
if("No")
return
world << "\red ALERT! \black Standby for high CPU bugtesting to determine missing blood_DNA values!"
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
world << "Initiating in 10 BYOND seconds..."
log_admin("[key_name(src)] has initiated a scan of all blood_DNA lists!")
message_admins("[key_name_admin(src)] has initiated a scan of all blood_DNA lists!", 0)
sleep(100)
world << "\red SCAN INITIATED."
spawn(0) //I am not stupid enough to leave that in a regular loop.
for(var/atom/O in world)
if(!islist(O.blood_DNA))
var/turf/T = get_turf(O)
if(istype(O.loc,/turf))
src << "[O] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])"
else
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])"
world << "\red SCAN COMPLETE."
world << "Thank you for your patience."
return
/client/proc/cmd_debug_prints()
set category = "Debug"
set name = "Analyze all fingerprints"
// to prevent REALLY stupid activations
switch(alert("Are you sure?", ,"Yes", "No"))
if("No")
return
world << "\red ALERT! \black Standby for high CPU bugtesting to determine incorrect fingerprint values!"
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
world << "Initiating in 10 BYOND seconds..."
log_admin("[key_name(src)] has initiated a scan of all fingerprints!")
message_admins("[key_name_admin(src)] has initiated a scan of all fingerprints!", 0)
sleep(100)
world << "\red SCAN INITIATED."
spawn(0) //I am not stupid enough to leave that in a regular loop.
for(var/atom/O in world)
if(istype(O, /mob)) //Lets not.
continue
if(!islist(O.fingerprints))
var/turf/T = get_turf(O)
if(istype(O.loc,/turf))
src << "[O] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])"
else
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])"
else if (O.fingerprints.len)
for(var/i = 1, i <= O.fingerprints.len, i++)
if(length(O.fingerprints[i]) != 69)
var/turf/T = get_turf(O)
if(isnull(T))
src << "[O] at [O.loc] has a fingerprints variable of incorrect length! (TURF NOT FOUND). (Last touched by [O.fingerprintslast])"
else
if(istype(O.loc,/turf))
src << "[O] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])"
else
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])"
break
world << "\red SCAN COMPLETE."
world << "Thank you for your patience."
return