mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
[MIRROR] TGUI list conversions + bug fixes [MDB IGNORE] (#10355)
* TGUI list conversions + bug fixes * Fixing conflicts * Maintaining a few modular files while we're at it... Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
Jeremiah
GoldenAlpharex
parent
ab65ec07d4
commit
092e534e75
@@ -62,7 +62,9 @@
|
||||
names += "---Elements---"
|
||||
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---")
|
||||
if(isnull(result))
|
||||
return
|
||||
if(!usr || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
to_chat(usr, "That thing doesn't exist anymore!", confidential = TRUE)
|
||||
@@ -100,7 +102,9 @@
|
||||
// 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 += 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---")
|
||||
if(isnull(path))
|
||||
return
|
||||
if(!usr || path == "---Components---" || path == "---Elements---")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
to_chat(usr, "That thing doesn't exist anymore!")
|
||||
|
||||
Reference in New Issue
Block a user