From 1ce3d7440f058801bea84b1ffc7e73f5eba48b5d Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sat, 18 Feb 2012 15:55:52 +0000 Subject: [PATCH] - Admins can no longer MASS - varedit objects of type /obj/admin and /datum/feedback_variable and /obj/machinery/blackbox_recorder. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3143 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/admin/verbs/massmodvar.dm | 5 +++++ code/modules/admin/verbs/modifyvariables.dm | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index 33589208732..72eb84dcda6 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -27,6 +27,11 @@ src << "Only administrators may use this command." return + for(var/p in forbidden_varedit_object_types) + if( istype(O,p) ) + usr << "\red It is forbidden to edit this object's variables." + return + var/list/names = list() for (var/V in O.vars) names += V diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index d4dbaa1f341..a14154bcccd 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -1,3 +1,9 @@ +var/list/forbidden_varedit_object_types = list( + /obj/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea. + /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering + /datum/feedback_variable //Prevents people messing with feedback gathering + ) + /client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world) set category = "Debug" set name = "Edit Variables" @@ -267,13 +273,7 @@ src << "Only administrators may use this command." return - var/list/forbidden_object_types = list( - /obj/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea. - /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering - /datum/feedback_variable //Prevents people messing with feedback gathering - ) - - for(var/p in forbidden_object_types) + for(var/p in forbidden_varedit_object_types) if( istype(O,p) ) usr << "\red It is forbidden to edit this object's variables." return