mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-30 21:56:47 +01:00
del all
This commit is contained in:
@@ -173,22 +173,29 @@
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
/client/proc/cmd_debug_del_all()
|
||||
/client/proc/cmd_debug_del_all(object as text)
|
||||
set category = "Debug"
|
||||
set name = "Del-All"
|
||||
|
||||
// to prevent REALLY stupid deletions
|
||||
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
|
||||
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
|
||||
var/list/matches = get_fancy_list_of_atom_types()
|
||||
if (!isnull(object) && object!="")
|
||||
matches = filter_fancy_list(matches, object)
|
||||
|
||||
if(matches.len==0)
|
||||
return
|
||||
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in matches
|
||||
if(hsbitem)
|
||||
hsbitem = matches[hsbitem]
|
||||
var/counter = 0
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, hsbitem))
|
||||
counter++
|
||||
qdel(O)
|
||||
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
|
||||
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
CHECK_TICK
|
||||
log_admin("[key_name(src)] has deleted all ([counter]) instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(src)] has deleted all ([counter]) instances of [hsbitem].")
|
||||
// SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_debug_make_powernets()
|
||||
set category = "Debug"
|
||||
|
||||
Reference in New Issue
Block a user