[MIRROR] cleanup _HELPERS/_lists.dm and all the necessary files [MDB IGNORE] (#8783)

* cleanup _HELPERS/_lists.dm and all the necessary files

* Epbic

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-10-13 22:07:35 +02:00
committed by GitHub
parent b4e52bf7e8
commit fa519bdde3
231 changed files with 626 additions and 2896 deletions
@@ -54,11 +54,11 @@
if(!check_rights(NONE))
return
var/list/names = list()
var/list/componentsubtypes = sortList(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
var/list/componentsubtypes = sort_list(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = tgui_input_list(usr, "Choose a component/element to add", "Add Component", names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
@@ -93,10 +93,10 @@
var/list/names = list()
names += "---Components---"
if(length(components))
names += sortList(components, /proc/cmp_typepaths_asc)
names += sort_list(components, /proc/cmp_typepaths_asc)
names += "---Elements---"
// We have to list every element here because there is no way to know what element is on this object without doing some sort of hack.
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/path = tgui_input_list(usr, "Choose a component/element to remove. All elements listed here may not be on the datum.", "Remove element", names)
if(!usr || !path || path == "---Components---" || path == "---Elements---")
return