mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Pull Request #548 - vareditting ckey, key, icon, icon_state, overlays, underlays have permission alternatives
Fixed indentation reauthored and rebased ~Carn Fixed the things carn pointed out. Thanks. ~Intigracy ckey editing and icon editing changes, added alternate requirements besides +DEBUG. ~Intigracy Modified code/modules/admin/verbs/modifyvariables.dm Signed-off-by: carnie <elly1989@rocketmail.com>
This commit is contained in:
@@ -130,7 +130,9 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
if(!istype(L,/list)) src << "Not a List."
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
|
||||
var/list/locked = list("vars", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo")
|
||||
var/list/ckey_edit = list("key", "ckey")
|
||||
var/list/icon_edit = list("icon", "icon_state", "overlays", "underlays")
|
||||
var/list/names = sortList(L)
|
||||
|
||||
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
|
||||
@@ -148,6 +150,10 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
if(variable in locked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in ckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(variable in icon_edit)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
if(isnull(variable))
|
||||
usr << "Unable to determine variable type."
|
||||
@@ -268,7 +274,9 @@ var/list/forbidden_varedit_object_types = list(
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state", "mutantrace")
|
||||
var/list/locked = list("vars", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "mutantrace")
|
||||
var/list/ckey_edit = list("key", "ckey")
|
||||
var/list/icon_edit = list("icon", "icon_state", "overlays", "underlays")
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
@@ -290,6 +298,10 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
if(param_var_name == "holder" || (param_var_name in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(param_var_name in ckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(param_var_name in icon_edit)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
variable = param_var_name
|
||||
|
||||
@@ -347,7 +359,11 @@ var/list/forbidden_varedit_object_types = list(
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in ckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG)) return
|
||||
if(variable in icon_edit)
|
||||
if(!check_rights(R_FUN|R_DEBUG)) return
|
||||
|
||||
if(!autodetect_class)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user