mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user