Converts over the missing TGUI input lists (#23859)

* Converts over the missing TGUI input lists

* last fixes

* num revert
This commit is contained in:
GDN
2024-02-14 21:17:29 +00:00
committed by GitHub
parent 8f9035d1ed
commit 82b863cefd
54 changed files with 167 additions and 168 deletions
+2 -2
View File
@@ -306,8 +306,8 @@
..()
update_icon()
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user)
var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color"))
switch(choice)
if("Toggle Cap")
to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>")
+4 -3
View File
@@ -234,10 +234,11 @@
var/list/show_flag = list("EXIT" = null) + sortList(flag)
var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag
if(user && (src in user.contents))
var/input_flag = tgui_input_list(user, "Choose a flag to disguise this as.", "Choose a flag.", show_flag)
if(!input_flag)
return
if(user && (src in user.GetAllContents()))
var/obj/item/flag/chosen_flag = flag[input_flag]
if(chosen_flag && !used)
+6 -6
View File
@@ -389,7 +389,7 @@
if("Show")
return ..()
if("Edit")
switch(input(user,"What would you like to edit on \the [src]?") in list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information"))
switch(input(user, "What would you like to edit on \the [src]?", "Agent ID", list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information")))
if("Name")
var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name), TRUE)
if(!Adjacent(user))
@@ -413,7 +413,7 @@
RebuildHTML()
if("Appearance")
var/list/appearances = list(
var/static/list/appearances = list(
"data",
"id",
"gold",
@@ -464,7 +464,7 @@
"ERT_janitorial",
"ERT_paranormal",
)
var/choice = input(user, "Select the appearance for this card.", "Agent Card Appearance") in appearances
var/choice = tgui_input_list(user, "Select the appearance for this card.", "Agent Card Appearance", appearances)
if(!Adjacent(user))
return
if(!choice)
@@ -508,7 +508,7 @@
RebuildHTML()
if("Occupation")
var/list/departments = list(
var/static/list/departments = list(
"Assistant" = null,
"Engineering" = GLOB.engineering_positions,
"Medical" = GLOB.medical_positions,
@@ -520,13 +520,13 @@
"Custom" = null,
)
var/department = input(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments
var/department = tgui_input_list(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments)
var/new_job = "Assistant"
if(department == "Custom")
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Assistant", MAX_MESSAGE_LEN))
else if(department != "Assistant" && !isnull(departments[department]))
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments[department]
new_job = tgui_input_list(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.", "Agent Card Occupation", departments[department])
if(!Adjacent(user))
return