Adds sorting to most input() lists (#47117)

* Adds sorting to most input() lists.

* Sorted some global lists, added more input sorting

* Should now use correct sort everywhere.

* compiles

* Last fixes.
This commit is contained in:
skoglol
2019-10-22 13:28:42 +02:00
committed by Rob Bailey
parent 52be6b096a
commit 938e66f62c
108 changed files with 183 additions and 178 deletions
@@ -51,11 +51,11 @@
if(!check_rights(NONE))
return
var/list/names = list()
var/list/componentsubtypes = subtypesof(/datum/component)
var/list/componentsubtypes = sortList(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
names += subtypesof(/datum/element)
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return