mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
TG: - It is now forbidden by code for admins to edit an object of type /obj/admins,
which gives them their admin power. - It is also forbidden by code for admins to edit the variables of feedback datum types and the blackbox for consistent data gathering. Revision: r3135 Author: baloh.matevz
This commit is contained in:
@@ -1,8 +1,15 @@
|
|||||||
|
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)
|
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
|
||||||
set category = "Debug"
|
set category = "Debug"
|
||||||
set name = "Edit Variables"
|
set name = "Edit Variables"
|
||||||
set desc="(target) Edit a target item's variables"
|
set desc="(target) Edit a target item's variables"
|
||||||
src.modify_variables(O)
|
src.modify_variables(O)
|
||||||
|
//feedback_add_details("admin_verb","EDITV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/cmd_modify_ticker_variables()
|
/client/proc/cmd_modify_ticker_variables()
|
||||||
set category = "Debug"
|
set category = "Debug"
|
||||||
@@ -12,6 +19,7 @@
|
|||||||
src << "Game hasn't started yet."
|
src << "Game hasn't started yet."
|
||||||
else
|
else
|
||||||
src.modify_variables(ticker)
|
src.modify_variables(ticker)
|
||||||
|
// feedback_add_details("admin_verb","ETV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/mod_list_add_ass() //haha
|
/client/proc/mod_list_add_ass() //haha
|
||||||
|
|
||||||
@@ -328,6 +336,11 @@
|
|||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
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/class
|
var/class
|
||||||
var/variable
|
var/variable
|
||||||
var/var_value
|
var/var_value
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.3 KiB |
Reference in New Issue
Block a user