mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
View Variables Update (2) (#17946)
* Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * Nicer ahelp bot text formatting * clean up all inputs * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * ummm * . * fix that * . * Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * clean up all inputs * Nicer ahelp bot text formatting * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * Added missing props * useContext fix * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -232,3 +232,55 @@
|
||||
if(contaminated && clean_types & CLEAN_RAD) // Phoron and stuff, washing machine needed
|
||||
contaminated = FALSE
|
||||
cut_overlay(contamination_overlay)
|
||||
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
VV_DROPDOWN_OPTION("", "---")
|
||||
VV_DROPDOWN_OPTION(VV_HK_MASS_DEL_TYPE, "Delete all of type")
|
||||
//VV_DROPDOWN_OPTION(VV_HK_OSAY, "Object Say")
|
||||
|
||||
/obj/vv_do_topic(list/href_list)
|
||||
. = ..()
|
||||
|
||||
if(!.)
|
||||
return
|
||||
|
||||
//if(href_list[VV_HK_OSAY])
|
||||
// return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/object_say, src)
|
||||
|
||||
if(href_list[VV_HK_MASS_DEL_TYPE])
|
||||
if(!check_rights(R_DEBUG|R_SERVER))
|
||||
return
|
||||
var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel"))
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(tgui_alert(usr, "Second confirmation required. Delete?",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
var/O_type = type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
qdel(Obj)
|
||||
CHECK_TICK
|
||||
if(!i)
|
||||
to_chat(usr, "No objects of this type exist")
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins(span_notice("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) "))
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
qdel(Obj)
|
||||
CHECK_TICK
|
||||
if(!i)
|
||||
to_chat(usr, "No objects of this type exist")
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins(span_notice("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) "))
|
||||
|
||||
Reference in New Issue
Block a user