mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge remote-tracking branch 'upstream/master' into lungsss
# Conflicts: # code/modules/mob/living/carbon/alien/humanoid/humanoid.dm # code/modules/mob/living/carbon/carbon_defines.dm
This commit is contained in:
@@ -89,8 +89,12 @@
|
||||
|
||||
if("delete")
|
||||
for(var/d in objs)
|
||||
if(!datum_is_forbidden(d))
|
||||
qdel(d)
|
||||
if(istype(d, /datum))
|
||||
var/datum/D = d
|
||||
if(!D.can_vv_delete())
|
||||
to_chat(usr, "[D] rejected your deletion")
|
||||
continue
|
||||
qdel(d)
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
@@ -118,9 +122,6 @@
|
||||
if("set" in query_tree)
|
||||
var/list/set_list = query_tree["set"]
|
||||
for(var/d in objs)
|
||||
// Forbid explicitly modifying an admin datum's vars
|
||||
if(datum_is_forbidden(d))
|
||||
return
|
||||
for(var/list/sets in set_list)
|
||||
var/datum/temp = d
|
||||
var/i = 0
|
||||
@@ -128,11 +129,10 @@
|
||||
if(++i == sets.len)
|
||||
if(istype(temp, /turf) && (v == "x" || v == "y" || v == "z"))
|
||||
continue
|
||||
if(!datum_is_forbidden(temp.vars[v]))
|
||||
return
|
||||
temp.vars[v] = SDQL_expression(d, set_list[sets])
|
||||
if(!temp.vv_edit_var(v, SDQL_expression(d, set_list[sets])))
|
||||
to_chat(usr, "[temp] rejected your varedit.")
|
||||
break
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client)) && !datum_is_forbidden(temp.vars[v]))
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client)))
|
||||
temp = temp.vars[v]
|
||||
else
|
||||
break
|
||||
@@ -440,11 +440,6 @@
|
||||
for(var/arg in arguments)
|
||||
new_args[++new_args.len] = SDQL_expression(source, arg)
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if(istype(object, p))
|
||||
to_chat(usr, "<span class='warning'>It is forbidden to run this object's procs.</span>")
|
||||
return
|
||||
|
||||
if(object == world) // Global proc.
|
||||
procname = "/proc/[procname]"
|
||||
return call(procname)(arglist(new_args))
|
||||
|
||||
@@ -115,7 +115,17 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
to_chat(X, msg)
|
||||
if("Adminhelp")
|
||||
msg = "<span class='adminhelp'>[selected_type]: </span><span class='boldnotice'>[key_name(src, 1, 1, selected_type)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[mob.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(mob)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""] (<A HREF='?_src_=holder;take_question=[mob.UID()]'>TAKE</A>) :</span> <span class='adminhelp'>[msg]</span>"
|
||||
var/ticketNum // Holder for the ticket number
|
||||
var/prunedmsg ="[usr.client]: [msg]" // Message without links
|
||||
if(globAdminTicketHolder.checkForOpenTicket(usr.client)) // If user already has an open ticket
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.checkForOpenTicket(usr.client) // Make T equal to the ticket they have open
|
||||
ticketNum = T.ticketNum // ticketNum is the number of their ticket.
|
||||
T.addResponse(usr.client, msg)
|
||||
else
|
||||
ticketNum = globAdminTicketHolder.getTicketCounter() // ticketNum is the ticket ready to be assigned.
|
||||
msg = "<span class='adminhelp'>[selected_type]: </span><span class='boldnotice'>[key_name(src, 1, 1, selected_type)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[mob.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(mob)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;openadminticket=[ticketNum]'>TICKET</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""] :</span> <span class='adminhelp'>[msg]</span>"
|
||||
//Open a new adminticket and inform the user.
|
||||
globAdminTicketHolder.newTicket(src, prunedmsg, msg)
|
||||
for(var/client/X in modholders + adminholders)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
@@ -183,6 +183,23 @@
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, X.mob))
|
||||
to_chat(X, "<span class='boldnotice'>[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: [emoji_msg]</span>")
|
||||
|
||||
//Check if the mob being PM'd has any open admin tickets.
|
||||
var/tickets = list()
|
||||
tickets = globAdminTicketHolder.checkForTicket(C)
|
||||
if(tickets)
|
||||
for(var/datum/admin_ticket/i in tickets)
|
||||
i.addResponse(src, msg) // Add this response to their open tickets.
|
||||
return
|
||||
|
||||
tickets = globAdminTicketHolder.checkForTicket(src)
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, C.mob)) //Is the person being pm'd an admin? If so we check if the pm'er has open tickets
|
||||
tickets = globAdminTicketHolder.checkForTicket(src)
|
||||
if(tickets)
|
||||
for(var/datum/admin_ticket/i in tickets)
|
||||
i.addResponse(src, msg)
|
||||
return
|
||||
|
||||
|
||||
/client/proc/cmd_admin_irc_pm()
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>")
|
||||
|
||||
@@ -38,3 +38,49 @@
|
||||
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='alert'>[html_encode(custom_event_msg)]</span>")
|
||||
to_chat(src, "<br>")
|
||||
|
||||
//admin event info to be view by admins
|
||||
|
||||
/client/proc/cmd_admin_custom_event_info()
|
||||
set category = "Event"
|
||||
set name = "Change Custom Admin Event Info"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/input = input(usr, "Enter the description of the custom event. This is informations for admins only. Use it to notify other admins of event info but not players.", "Custom Event Info", custom_event_msg) as message|null
|
||||
if(!input || input == "")
|
||||
custom_event_admin_msg = null
|
||||
log_admin("[key_name(usr)] has cleared the custom admin event info text.")
|
||||
message_admins("[key_name_admin(usr)] has cleared the custom admin event text.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has changed the custom admin event info text.")
|
||||
message_admins("[key_name_admin(usr)] has changed the custom admin event info text.")
|
||||
|
||||
custom_event_admin_msg = input
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, "<h1 class='alert'>Custom Admin Event Info</h1>")
|
||||
to_chat(X, "<h2 class='alert'>A custom event is starting. OOC Admin Info:</h2>")
|
||||
to_chat(X, "<span class='alert'>[html_encode(custom_event_admin_msg)]</span>")
|
||||
to_chat(X,"<br>")
|
||||
|
||||
/client/proc/cmd_view_custom_event_info()
|
||||
set category = "Event"
|
||||
set name = "Custom Event Admin Info"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!custom_event_admin_msg || custom_event_admin_msg == "")
|
||||
to_chat(src, "There currently is no known custom admin event taking place.")
|
||||
return
|
||||
|
||||
to_chat(src, "<h1 class='alert'>Custom Event Info</h1>")
|
||||
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='alert'>[html_encode(custom_event_admin_msg)]</span>")
|
||||
to_chat(src, "<br>")
|
||||
|
||||
@@ -22,360 +22,251 @@
|
||||
src.massmodify_variables(A, var_name, method)
|
||||
feedback_add_details("admin_verb","MEV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/massmodify_variables(var/atom/O, var/var_name = "", var/method = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client")
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
to_chat(usr, "<span class='danger'>It is forbidden to edit this object's variables.</span>")
|
||||
return
|
||||
|
||||
var/list/names = list()
|
||||
for(var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
/client/proc/massmodify_variables(datum/O, var_name = "", method = 0)
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
if(!istype(O))
|
||||
return
|
||||
|
||||
var/variable = ""
|
||||
|
||||
if(!var_name)
|
||||
variable = input("Which var?","Var") as null|anything in names
|
||||
var/list/names = list()
|
||||
for(var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
variable = input("Which var?", "Var") as null|anything in names
|
||||
else
|
||||
variable = var_name
|
||||
|
||||
if(!variable) return
|
||||
if(!variable || !O.can_vv_get(variable))
|
||||
return
|
||||
var/default
|
||||
var/var_value = O.vars[variable]
|
||||
var/dir
|
||||
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(variable in VVckey_edit)
|
||||
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.")
|
||||
return
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(!check_rights(R_EVENT | R_DEBUG))
|
||||
return
|
||||
if(variable in VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
if(prompt != "Continue")
|
||||
return
|
||||
|
||||
if(isnull(var_value))
|
||||
to_chat(usr, "Unable to determine variable type.")
|
||||
|
||||
else if(isnum(var_value))
|
||||
to_chat(usr, "Variable appears to be <b>NUM</b>.")
|
||||
default = "num"
|
||||
dir = 1
|
||||
|
||||
else if(istext(var_value))
|
||||
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
|
||||
default = "text"
|
||||
|
||||
else if(isloc(var_value))
|
||||
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
|
||||
default = "reference"
|
||||
|
||||
else if(isicon(var_value))
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
var_value = "[bicon(var_value)]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
|
||||
default = "type"
|
||||
|
||||
else if(istype(var_value,/list))
|
||||
to_chat(usr, "Variable appears to be <b>LIST</b>.")
|
||||
default = "list"
|
||||
|
||||
else if(istype(var_value,/client))
|
||||
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
|
||||
default = "cancel"
|
||||
default = vv_get_class(var_value)
|
||||
|
||||
if(isnull(default))
|
||||
to_chat(src, "Unable to determine variable type.")
|
||||
else
|
||||
to_chat(usr, "Variable appears to be <b>FILE</b>.")
|
||||
default = "file"
|
||||
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
|
||||
|
||||
to_chat(usr, "Variable contains: [var_value]")
|
||||
if(dir)
|
||||
switch(var_value)
|
||||
if(1)
|
||||
dir = "NORTH"
|
||||
if(2)
|
||||
dir = "SOUTH"
|
||||
if(4)
|
||||
dir = "EAST"
|
||||
if(8)
|
||||
dir = "WEST"
|
||||
if(5)
|
||||
dir = "NORTHEAST"
|
||||
if(6)
|
||||
dir = "SOUTHEAST"
|
||||
if(9)
|
||||
dir = "NORTHWEST"
|
||||
if(10)
|
||||
dir = "SOUTHWEST"
|
||||
else
|
||||
dir = null
|
||||
if(dir)
|
||||
to_chat(usr, "If a direction, direction is: [dir]")
|
||||
to_chat(src, "Variable contains: [var_value]")
|
||||
|
||||
var/class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","icon","file","edit referenced object","restore to default")
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
if(dir < 0 && dir < 16)
|
||||
if(dir & 1)
|
||||
dir_text += "NORTH"
|
||||
if(dir & 2)
|
||||
dir_text += "SOUTH"
|
||||
if(dir & 4)
|
||||
dir_text += "EAST"
|
||||
if(dir & 8)
|
||||
dir_text += "WEST"
|
||||
|
||||
if(!class)
|
||||
if(dir_text)
|
||||
to_chat(src, "If a direction, direction is: [dir_text]")
|
||||
|
||||
var/value = vv_get_value(default_class = default)
|
||||
var/new_value = value["value"]
|
||||
var/class = value["class"]
|
||||
|
||||
if(!class || !new_value == null && class != VV_NULL)
|
||||
return
|
||||
|
||||
var/original_name
|
||||
if(class == VV_MESSAGE)
|
||||
class = VV_TEXT
|
||||
|
||||
if(!istype(O, /atom))
|
||||
original_name = "\ref[O] ([O])"
|
||||
else
|
||||
original_name = O:name
|
||||
if(value["type"])
|
||||
class = VV_NEW_TYPE
|
||||
|
||||
var/original_name = "[O]"
|
||||
|
||||
var/rejected = 0
|
||||
var/accepted = 0
|
||||
|
||||
switch(class)
|
||||
if(VV_RESTORE_DEFAULT)
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if(!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(D.vv_edit_var(variable, initial(D.vars[variable])) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
CHECK_TICK
|
||||
|
||||
if("restore to default")
|
||||
O.vars[variable] = initial(O.vars[variable])
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
M.on_varedit(variable)
|
||||
if(VV_TEXT)
|
||||
var/list/varsvars = vv_parse_text(O, new_value)
|
||||
var/pre_processing = new_value
|
||||
var/unique
|
||||
if(varsvars && varsvars.len)
|
||||
unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
|
||||
if(unique == "Unique")
|
||||
unique = TRUE
|
||||
else
|
||||
unique = FALSE
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[O.vars[V]]")
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
A.on_varedit(variable)
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if(!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(unique)
|
||||
new_value = pre_processing
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[D.vars[V]]")
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
A.on_varedit(variable)
|
||||
if(D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
CHECK_TICK
|
||||
|
||||
if(VV_NEW_TYPE)
|
||||
var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
|
||||
if(many == "Cancel")
|
||||
return
|
||||
if(many == "Many")
|
||||
many = TRUE
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
M.on_varedit(variable)
|
||||
many = FALSE
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
A.on_varedit(variable)
|
||||
var/type = value["type"]
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if(!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(many && !new_value)
|
||||
new_value = new type()
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
A.on_varedit(variable)
|
||||
if(D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
new_value = null
|
||||
CHECK_TICK
|
||||
|
||||
if("edit referenced object")
|
||||
return .(O.vars[variable])
|
||||
else
|
||||
to_chat(src, "Finding items...")
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
to_chat(src, "Changing [items.len] items...")
|
||||
for(var/thing in items)
|
||||
if(!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
CHECK_TICK
|
||||
|
||||
if("text")
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as message|null
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
var/count = rejected+accepted
|
||||
if(!count)
|
||||
to_chat(src, "No objects found")
|
||||
return
|
||||
if(!accepted)
|
||||
to_chat(src, "Every object rejected your edit")
|
||||
return
|
||||
if(rejected)
|
||||
to_chat(src, "[rejected] out of [count] objects rejected your edit")
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
log_to_dd("### 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)")
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
/proc/get_all_of_type(var/T, subtypes = TRUE)
|
||||
var/list/typecache = list()
|
||||
typecache[T] = 1
|
||||
if(subtypes)
|
||||
typecache = typecacheof(typecache)
|
||||
. = list()
|
||||
if(ispath(T, /mob))
|
||||
for(var/mob/thing in mob_list)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /obj/machinery/door))
|
||||
for(var/obj/machinery/door/thing in airlocks)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /obj/machinery))
|
||||
for(var/obj/machinery/thing in machines)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
if("num")
|
||||
var/new_value = input("Enter new number:","Num",\
|
||||
O.vars[variable]) as num|null
|
||||
if(new_value == null) return
|
||||
else if(ispath(T, /obj))
|
||||
for(var/obj/thing in world)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
if(variable=="light_range")
|
||||
O.set_light(new_value)
|
||||
else
|
||||
O.vars[variable] = new_value
|
||||
else if(ispath(T, /atom/movable))
|
||||
for(var/atom/movable/thing in world)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /turf))
|
||||
for(var/turf/thing in world)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /atom))
|
||||
for(var/atom/thing in world)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /client))
|
||||
for(var/client/thing in clients)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
else if(ispath(T, /datum))
|
||||
for(var/datum/thing)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
if("type")
|
||||
var/new_value
|
||||
new_value = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf)
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
if("file")
|
||||
var/new_value = input("Pick file:","File",O.vars[variable]) as null|file
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O.type, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
if("icon")
|
||||
var/new_value = input("Pick icon:","Icon",O.vars[variable]) as null|icon
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
else
|
||||
for(var/datum/thing in world)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@
|
||||
if(usr)
|
||||
if(usr.client)
|
||||
if(usr.client.holder)
|
||||
to_chat(M, "<b>old You hear a voice in your head... <i>[msg]</i></b>")
|
||||
to_chat(M, "<b>You hear a voice in your head... <i>[msg]</i></b>")
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
message_admins("<span class='boldnotice'>SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]</span>", 1)
|
||||
@@ -588,22 +588,30 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view())
|
||||
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in view())
|
||||
set category = "Admin"
|
||||
set name = "Delete"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
|
||||
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
|
||||
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
|
||||
admin_delete(A)
|
||||
|
||||
/client/proc/admin_delete(datum/D)
|
||||
if(istype(D) && !D.can_vv_delete())
|
||||
to_chat(src, "[D] rejected your deletion")
|
||||
return
|
||||
var/atom/A = D
|
||||
var/coords = istype(A) ? "at ([A.x], [A.y], [A.z])" : ""
|
||||
if(alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
||||
log_admin("[key_name(usr)] deleted [D][coords]")
|
||||
message_admins("[key_name_admin(usr)] deleted [D][coords]", 1)
|
||||
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
if(istype(O, /turf))
|
||||
var/turf/T = O
|
||||
if(isturf(D))
|
||||
var/turf/T = D
|
||||
T.ChangeTurf(/turf/space)
|
||||
return
|
||||
qdel(O)
|
||||
else
|
||||
qdel(D)
|
||||
|
||||
/client/proc/cmd_admin_list_open_jobs()
|
||||
set category = "Admin"
|
||||
|
||||
Reference in New Issue
Block a user