Changed some global_list stuff:

>tried to make the comments less confusing.
>Removed the procs for rebuilding the lists (they weren't meant to be used and half were broken anyway).
>added a directory. It maps ckey to client like so directory[ckey] = client. It could be used for PMs, banning, and various other admin tools rather than using \ref[]
>var/list/admins is now a list of clients whom are admins.
>var/list/admin_datums is what var/list/admins used to be. A map from ckey -> admin datum
Most of this is so I can add modular admin ranks in a non-horrendous way and fix some existing issues.
>var/list/client_list is now var/list/clients (laziness sorry)
>removed some needless loops and stuff.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4951 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-10-24 20:11:39 +00:00
parent ca59c9fde9
commit b1fdee2e32
27 changed files with 123 additions and 261 deletions
+5 -6
View File
@@ -25,8 +25,8 @@
/client/proc/update_admins(var/rank)
if(!holder)
holder = new /datum/admins(rank)
admin_list |= src
admins[ckey] = holder
admins |= src
admin_datums[ckey] = holder
var/need_update = 0
//check if our rank has changed
@@ -253,7 +253,6 @@
verbs += /datum/admins/proc/adjump
verbs += /client/proc/callproc
verbs += /client/proc/triple_ai
verbs += /client/proc/get_admin_state
verbs += /client/proc/reload_admins
verbs += /client/proc/cmd_debug_make_powernets
verbs += /client/proc/object_talk
@@ -299,7 +298,6 @@
/client/proc/show_verbs,
/client/proc/colorooc,
/client/proc/triple_ai,
/client/proc/get_admin_state,
/client/proc/reload_admins,
/client/proc/kill_air,
/client/proc/cmd_debug_make_powernets,
@@ -419,11 +417,11 @@
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
/client/proc/get_admin_state()
set name = "Get Admin State"
set category = "Debug"
for(var/client/C in admin_list)
for(var/client/C in admins)
if(C.holder.state == 1)
src << "[C.key] is playing - [C.holder.state]"
else if(C.holder.state == 2)
@@ -431,6 +429,7 @@
else
src << "[C.key] is undefined - [C.holder.state]"
feedback_add_details("admin_verb","GAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
/client/proc/invisimin()
set name = "Invisimin"