Mentor permissions fixes and such.

Created a helper proc /proc/is_mentor(client) use this when determining if someone is a mentor and they aren't the usr of the proc (rights_check uses usr)

Mentors will no longer hear ghosts while playing
Mentors will no longer see orange text around names in check_player_age panel if they have special_roles
Mentors will no longer be able to tell players with special roles through the use of player_panel
Mentors will no longer be able to aghost, use antagHUD, then return to their bodies.
This commit is contained in:
Ccomp5950
2014-06-10 19:21:40 -05:00
parent f0a75407b8
commit 77c733b17c
7 changed files with 77 additions and 24 deletions

View File

@@ -257,20 +257,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!config.antag_hud_allowed && !client.holder)
if(!client)
return
var/mentor = is_mentor(usr.client)
if(!config.antag_hud_allowed && (!client.holder || mentor))
src << "\red Admins have disabled this for this round."
return
if(!client)
return
var/mob/dead/observer/M = src
if(jobban_isbanned(M, "AntagHUD"))
src << "\red <B>You have been banned from using this feature</B>"
return
if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder)
if(config.antag_hud_restricted && !M.has_enabled_antagHUD && (!client.holder || mentor))
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
if(response == "No") return
M.can_reenter_corpse = 0
if(!M.has_enabled_antagHUD && !client.holder)
if(!M.has_enabled_antagHUD && (!client.holder || mentor))
M.has_enabled_antagHUD = 1
if(M.antagHUD)
M.antagHUD = 0