Revert "TGUI alerts, lists, inputs"

This commit is contained in:
Letter N
2021-10-28 12:17:29 +08:00
committed by GitHub
parent 853ff1d8ad
commit bcdf96f274
362 changed files with 1149 additions and 1570 deletions
+4 -4
View File
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "\n[V]: <span class='reallybig'>[output]</span>"
to_chat(M, dat)
var/choice = tgui_input_list(M, "Choose the a reskin for [src]","Reskin Object", GLOB.pda_reskins)
var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins
var/new_icon = GLOB.pda_reskins[choice]
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -619,7 +619,7 @@ GLOBAL_LIST_EMPTY(PDAs)
playsound(src, 'sound/machines/terminal_select.ogg', 15, 1)
if("Drone Phone")
var/alert_s = tgui_input_list(U,"Alert severity level","Ping Drones", list("Low","Medium","High","Critical"))
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
var/area/A = get_area(U)
if(A && alert_s && !QDELETED(U))
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
@@ -1147,7 +1147,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = tgui_input_list(user, "Please select a PDA", "", sortList(plist))
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
if (!c)
return
@@ -1155,7 +1155,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/selected = plist[c]
if(aicamera.stored.len)
var/add_photo = tgui_input_list(user,"Do you want to attach a photo?","Photo","No", list("Yes","No"))
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
if(add_photo=="Yes")
var/datum/picture/Pic = aicamera.selectpicture(user)
aiPDA.picture = Pic
+2 -2
View File
@@ -656,10 +656,10 @@ Code:
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", message1), 40)
message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(tgui_input_text(usr, "Line 2", "Enter Message Text", message2), 40)
message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
+1 -1
View File
@@ -84,7 +84,7 @@
if(flush)
flush = FALSE
else
var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No"))
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
@@ -36,7 +36,7 @@
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
var/new_duration = tgui_input_num(user, "Set the duration (5-300):", "Desynchronizer", duration / 10)
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
new_duration = clamp(new_duration, 50, max_duration)
@@ -8,7 +8,7 @@
. = ..()
if(.)
return
var/new_id = tgui_input_text(user, "Set this kit's electrochromatic ID", "Set ID", id)
var/new_id = input(user, "Set this kit's electrochromatic ID", "Set ID", id) as text|null
if(isnull(new_id))
return
id = new_id
+1 -1
View File
@@ -87,7 +87,7 @@
pai.master_dna = M.dna.unique_enzymes
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
if(href_list["wipe"])
var/confirm = tgui_input_list(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
if(confirm == "Yes")
if(pai)
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
@@ -23,7 +23,7 @@
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
/obj/item/pipe_painter/attack_self(mob/user)
paint_color = tgui_input_list(user, "Which colour do you want to use?","Pipe painter", GLOB.pipe_paint_colors)
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
/obj/item/pipe_painter/examine(mob/user)
. = ..()
@@ -18,7 +18,7 @@
else
if(zero_amount())
return
chosen_circuit = tgui_input_list(user, "What type of circuit would you like to remove?", "Choose a Circuit Type", list("airlock","firelock","fire alarm","air alarm","APC"))
chosen_circuit = input("What type of circuit would you like to remove?", "Choose a Circuit Type", chosen_circuit) as null|anything in list("airlock","firelock","fire alarm","air alarm","APC")
if(zero_amount() || !chosen_circuit || !in_range(src,user))
return
switch(chosen_circuit)
@@ -150,7 +150,7 @@
if(tune == "input")
var/min = format_frequency(freerange ? MIN_FREE_FREQ : MIN_FREQ)
var/max = format_frequency(freerange ? MAX_FREE_FREQ : MAX_FREQ)
tune = tgui_input_num(usr, "Tune frequency ([min]-[max]):", name, format_frequency(frequency))
tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num
if(!isnull(tune) && !..())
if (tune < MIN_FREE_FREQ && tune <= MAX_FREE_FREQ / 10)
// allow typing 144.7 to get 1447
+1 -1
View File
@@ -946,7 +946,7 @@ GENETICS SCANNER
for(var/A in buffer)
options += get_display_name(A)
var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sortList(options))
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list