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
@@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
IO |= text[1]
if(!IO.len)
to_chat(user, "<span class='alert'>No machinery detected.</span>")
var/S = tgui_input_list(user, "Select the device set: ", "Selection", sortList(IO))
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
if(src)
src.input_tag = "[S]_in"
src.output_tag = "[S]_out"
@@ -269,7 +269,7 @@
T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, 0)
var/camera = tgui_input_list(usr, "Choose which camera you want to view", "Cameras", T)
var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T
var/obj/machinery/camera/final = T[camera]
playsound(src, "terminal_type", 25, 0)
if(final)
+1 -1
View File
@@ -447,7 +447,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if (authenticated == 2)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/newJob = reject_bad_text(tgui_input_text(usr, "Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
if(newJob)
t1 = newJob
@@ -116,7 +116,7 @@
return
current_pad.display_name = new_name
if("remove")
if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
launchpads -= current_pad
selected_id = null
. = TRUE
@@ -155,7 +155,7 @@
return
current_pad.display_name = new_name
if("remove")
if(usr && tgui_alert(usr, "Are you sure?", "Unlink Orbital Pad", list("I'm Sure", "Abort")) != "Abort")
if(usr && alert(usr, "Are you sure?", "Unlink Orbital Pad", "I'm Sure", "Abort") != "Abort")
mechpads -= current_pad
LAZYREMOVE(current_pad.consoles, src)
selected_id = null
+1 -1
View File
@@ -289,7 +289,7 @@
active1.fields["gender"] = "Male"
if("age")
if(active1)
var/t1 = tgui_input_num(usr, "Please input age:", "Med. records", active1.fields["age"])
var/t1 = input("Please input age:", "Med. records", active1.fields["age"], null) as num
if(!canUseMedicalRecordsConsole(usr, t1, a1))
return
active1.fields["age"] = t1
@@ -99,7 +99,7 @@
if("reset")
contained_id.points = 0
if("setgoal")
var/num = round(tgui_input_num(usr, "Choose prisoner's goal:", "Input an Integer", contained_id.goal))
var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
if(num >= 0)
num = min(num,1000) //Cap the quota to the equivilent of 10 minutes.
contained_id.goal = num
+3 -3
View File
@@ -577,13 +577,13 @@ What a mess.*/
active1.fields["gender"] = "Male"
if("age")
if(istype(active1, /datum/data/record))
var/t1 = tgui_input_num(usr, "Please input age:", "Secure. records", active1.fields["age"])
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
if(!canUseSecurityRecordsConsole(usr, "age", a1))
return
active1.fields["age"] = t1
if("species")
if(istype(active1, /datum/data/record))
var/t1 = stripped_input("Please input species name", "Secure. records", active1.fields["species"], null)
var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
if(!canUseSecurityRecordsConsole(usr, t1, a1))
return
active1.fields["species"] = t1
@@ -687,7 +687,7 @@ What a mess.*/
temp += "<li><a href='?src=[REF(src)];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
temp += "</ul>"
else
tgui_alert(usr, "You do not have the required rank to do this!")
alert(usr, "You do not have the required rank to do this!")
//TEMPORARY MENU FUNCTIONS
else//To properly clear as per clear screen.
temp=null
+2 -2
View File
@@ -139,7 +139,7 @@
if(is_eligible(M))
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M
var/desc = tgui_input_list(user, "Please select a location to lock in.", "Locking Computer", L)
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around
return
target = L[desc]
@@ -167,7 +167,7 @@
if(!L.len)
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
return
var/desc = tgui_input_list(user, "Please select a station to lock in.", "Locking Computer", L)
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around
return
var/obj/machinery/teleport/station/target_station = L[desc]