From 0962cd26795e2df57e8c16fae464bb869061b472 Mon Sep 17 00:00:00 2001 From: Intigracy Date: Wed, 28 Aug 2013 15:51:45 -0700 Subject: [PATCH] Start of standardizing required permissions for admins. Using the dropdown menu / changing health / names of people in view variables now actually requires +VAREDIT. Shuttle moving moved from +FUN to +ADMIN for convenience sake. +ADMIN now required to view antagonists / law changes, before it was only required to check antags via verbs, which you could get around through the secrets menu. +ADMIN Also now required to view all of the special information given about players in who menu (like antagonist status), but all admins can still see stealth keyed admins. --- code/datums/datumvars.dm | 2 ++ code/game/verbs/who.dm | 29 +++++++++++++++-------------- code/modules/admin/admin.dm | 11 ++++++----- code/modules/admin/admin_verbs.dm | 12 ++++++------ code/modules/admin/topic.dm | 28 ++++++++++++++-------------- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 7613e40f383..7f25b86cb5b 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -402,6 +402,8 @@ client //This should all be moved over to datum/admins/Topic() or something ~Carn if( (usr.client != src) || !src.holder ) return + if(!check_rights(R_VAREDIT)) + return if(href_list["Vars"]) debug_variables(locate(href_list["Vars"])) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index fe77461a0fc..4d946bfb0f1 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -13,22 +13,23 @@ if(C.holder && C.holder.fakekey) entry += " (as [C.holder.fakekey])" entry += " - Playing as [C.mob.real_name]" - switch(C.mob.stat) - if(UNCONSCIOUS) - entry += " - Unconscious" - if(DEAD) - if(isobserver(C.mob)) - var/mob/dead/observer/O = C.mob - if(O.started_as_observer) - entry += " - Observing" + if(check_rights(R_ADMIN,0)) + switch(C.mob.stat) + if(UNCONSCIOUS) + entry += " - Unconscious" + if(DEAD) + if(isobserver(C.mob)) + var/mob/dead/observer/O = C.mob + if(O.started_as_observer) + entry += " - Observing" + else + entry += " - DEAD" else entry += " - DEAD" - else - entry += " - DEAD" - if(is_special_character(C.mob)) - entry += " - Antagonist" - entry += " (?)" - Lines += entry + if(is_special_character(C.mob)) + entry += " - Antagonist" + entry += " (?)" + Lines += entry else for(var/client/C in clients) if(C.holder && C.holder.fakekey) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index d2d469670ae..e5921b45734 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -421,6 +421,11 @@ var/global/floorIsLava = 0 List DNA (Blood)
List Fingerprints


+ Shuttles
+
+ Move Ferry
+ Move Mining Shuttle
+
"} if(check_rights(R_FUN,0)) @@ -448,11 +453,6 @@ var/global/floorIsLava = 0 Trigger a communication blackout
Trigger a hyper-energetic flux

- Shuttles
-
- Move Ferry
- Move Mining Shuttle
-
Fun Secrets

Turn all humans into monkeys
@@ -467,6 +467,7 @@ var/global/floorIsLava = 0 Break all lights
Fix all lights
The floor is lava! (DANGEROUS: extremely lame)
+
"} /* DEATH SQUADS diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b5b31aff2a1..aa8187b512b 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -1,17 +1,11 @@ //admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless var/list/admin_verbs_default = list( - /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ - /client/proc/game_panel, /*game panel, allows to change game-mode etc*/ - /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/ - /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/ /client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/ /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ /client/proc/cmd_admin_say, /*admin-only ooc chat*/ /client/proc/hide_verbs, /*hides all our adminverbs*/ /client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/ /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ - /client/proc/check_ai_laws, /*shows AI and borg laws*/ - /client/proc/check_antagonists, /*shows all antags*/ /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/ /client/proc/deadchat, /*toggles deadchat on/off*/ /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ @@ -25,6 +19,11 @@ var/list/admin_verbs_admin = list( /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/ // /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage + /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ + /client/proc/game_panel, /*game panel, allows to change game-mode etc*/ + /client/proc/check_ai_laws, /*shows AI and borg laws*/ + /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/ + /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/ /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ @@ -37,6 +36,7 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ + /client/proc/check_antagonists, /*shows all antags*/ /datum/admins/proc/access_news_network, /*allows access of newscasters*/ /client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/ /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/ diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1248e66b118..73928c730a8 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1733,20 +1733,6 @@ ticker.mode.finalize_traitor(A.mind) message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1) log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]") - if("moveminingshuttle") - if(mining_shuttle_moving) - return - feedback_inc("admin_secrets_fun_used",1) - feedback_add_details("admin_secrets_fun_used","ShM") - move_mining_shuttle() - message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1) - log_admin("[key_name(usr)] moved the mining shuttle") - if("moveferry") - feedback_inc("admin_secrets_fun_used",1) - feedback_add_details("admin_secrets_fun_used","ShF") - move_ferry() - message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1) - log_admin("[key_name(usr)] moved the centcom ferry") if("togglebombcap") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","BC") @@ -2056,6 +2042,20 @@ usr << browse(dat, "window=lawchanges;size=800x500") if("check_antagonist") check_antagonists() + if("moveminingshuttle") + if(mining_shuttle_moving) + return + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShM") + move_mining_shuttle() + message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1) + log_admin("[key_name(usr)] moved the mining shuttle") + if("moveferry") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShF") + move_ferry() + message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1) + log_admin("[key_name(usr)] moved the centcom ferry") if("kick_all_from_lobby") if(ticker && ticker.current_state == GAME_STATE_PLAYING) var/afkonly = text2num(href_list["afkonly"])