"what if adminbus stops leaking confidential adminchat" and also updates admin things. you can now do obj/structure/singulo:50
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
var/var_value = O.vars[variable]
|
||||
|
||||
if(variable in GLOB.VVckey_edit)
|
||||
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.")
|
||||
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.", confidential = TRUE)
|
||||
return
|
||||
if(variable in GLOB.VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
@@ -56,11 +56,11 @@
|
||||
default = vv_get_class(variable, var_value)
|
||||
|
||||
if(isnull(default))
|
||||
to_chat(src, "Unable to determine variable type.")
|
||||
to_chat(src, "Unable to determine variable type.", confidential = TRUE)
|
||||
else
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.", confidential = TRUE)
|
||||
|
||||
to_chat(src, "Variable contains: [var_value]")
|
||||
to_chat(src, "Variable contains: [var_value]", confidential = TRUE)
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
@@ -75,7 +75,7 @@
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
to_chat(src, "If a direction, direction is: [dir_text]")
|
||||
to_chat(src, "If a direction, direction is: [dir_text]", confidential = TRUE)
|
||||
|
||||
var/value = vv_get_value(default_class = default)
|
||||
var/new_value = value["value"]
|
||||
@@ -97,9 +97,9 @@
|
||||
|
||||
switch(class)
|
||||
if(VV_RESTORE_DEFAULT)
|
||||
to_chat(src, "Finding items...")
|
||||
to_chat(src, "Finding items...", confidential = TRUE)
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
to_chat(src, "Changing [items.len] items...", confidential = TRUE)
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -123,9 +123,9 @@
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[O.vars[V]]")
|
||||
|
||||
to_chat(src, "Finding items...")
|
||||
to_chat(src, "Finding items...", confidential = TRUE)
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
to_chat(src, "Changing [items.len] items...", confidential = TRUE)
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -151,9 +151,9 @@
|
||||
many = FALSE
|
||||
|
||||
var/type = value["type"]
|
||||
to_chat(src, "Finding items...")
|
||||
to_chat(src, "Finding items...", confidential = TRUE)
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
to_chat(src, "Changing [items.len] items...", confidential = TRUE)
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -169,9 +169,9 @@
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
to_chat(src, "Finding items...")
|
||||
to_chat(src, "Finding items...", confidential = TRUE)
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
to_chat(src, "Changing [items.len] items...", confidential = TRUE)
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
@@ -185,20 +185,20 @@
|
||||
|
||||
var/count = rejected+accepted
|
||||
if (!count)
|
||||
to_chat(src, "No objects found")
|
||||
to_chat(src, "No objects found", confidential = TRUE)
|
||||
return
|
||||
if (!accepted)
|
||||
to_chat(src, "Every object rejected your edit")
|
||||
to_chat(src, "Every object rejected your edit", confidential = TRUE)
|
||||
return
|
||||
if (rejected)
|
||||
to_chat(src, "[rejected] out of [count] objects rejected your edit")
|
||||
to_chat(src, "[rejected] out of [count] objects rejected your edit", confidential = TRUE)
|
||||
|
||||
log_world("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])")
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
|
||||
//not using global lists as vv is a debug function and debug functions should rely on as less things as possible.
|
||||
/proc/get_all_of_type(var/T, subtypes = TRUE)
|
||||
/proc/get_all_of_type(T, subtypes = TRUE)
|
||||
var/list/typecache = list()
|
||||
typecache[T] = 1
|
||||
if (subtypes)
|
||||
@@ -253,7 +253,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /client))
|
||||
for(var/client/thing in world)
|
||||
for(var/client/thing in GLOB.clients)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user