Merge remote-tracking branch 'upstream/master' into dev

Conflicts:
	code/__HELPERS/unsorted.dm
This commit is contained in:
Mloc-Argent
2014-06-12 18:56:26 +01:00
20 changed files with 2314 additions and 2189 deletions

View File

@@ -1096,7 +1096,22 @@ var/global/floorIsLava = 0
if(istype(H))
H.regenerate_icons()
proc/get_options_bar(whom, detail = 2, name = 0, link = 1)
/*
helper proc to test if someone is a mentor or not. Got tired of writing this same check all over the place.
*/
/proc/is_mentor(client/C)
if(!istype(C))
return 0
if(!C.holder)
return 0
if(C.holder.rights == R_MENTOR)
return 1
return 0
/proc/get_options_bar(whom, detail = 2, name = 0, link = 1)
if(!whom)
return "<b>(*null*)</b>"
var/mob/M

View File

@@ -360,9 +360,16 @@ var/list/admin_verbs_mentor = list(
if(istype(mob,/mob/dead/observer))
//re-enter
var/mob/dead/observer/ghost = mob
ghost.can_reenter_corpse = 1 //just in-case.
ghost.reenter_corpse()
if(!is_mentor(usr.client))
ghost.can_reenter_corpse = 1
if(ghost.can_reenter_corpse)
ghost.reenter_corpse()
else
ghost << "<font color='red'>Error: Aghost: Can't reenter corpse, mentors that use adminHUD while aghosting are not permitted to enter their corpse again</font>"
return
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(istype(mob,/mob/new_player))
src << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>"
else

View File

@@ -322,6 +322,7 @@
/datum/admins/proc/player_panel_old()
if (!usr.client.holder)
return
var/dat = "<html><head><title>Player Menu</title></head>"
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name</th><th>Real Name</th><th>Assigned Job</th><th>Key</th><th>Options</th><th>PM</th><th>Traitor?</th></tr></B>"
//add <th>IP:</th> to this if wanting to add back in IP checking
@@ -364,13 +365,25 @@
<td align=center><A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>X</A></td>
<td align=center><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>
"}
switch(is_special_character(M))
if(0)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'>Traitor?</A></td>"}
if(1)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'><font color=red>Traitor?</font></A></td>"}
if(2)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'><font color=red><b>Traitor?</b></font></A></td>"}
if(usr.client)
var/client/C = usr.client
if(is_mentor(C))
dat += {"<td align=center> N/A </td>"}
else
switch(is_special_character(M))
if(0)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'>Traitor?</A></td>"}
if(1)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'><font color=red>Traitor?</font></A></td>"}
if(2)
dat += {"<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'><font color=red><b>Traitor?</b></font></A></td>"}
else
dat += {"<td align=center> N/A </td>"}
dat += "</table></body></html>"

View File

@@ -80,12 +80,17 @@
var/missing_ages = 0
var/msg = ""
var/highlight_special_characters = 1
if(is_mentor(usr.client))
highlight_special_characters = 0
for(var/client/C in clients)
if(C.player_age == "Requires database")
missing_ages = 1
continue
if(C.player_age < age)
msg += "[key_name_admin(C)]: account is [C.player_age] days old<br>"
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
if(missing_ages)
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"