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
+10 -10
View File
@@ -271,7 +271,7 @@
to_chat(usr, "<span class='warning'>Wireless control is disabled!</span>")
return
var/reason = tgui_input_text(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call")
var/reason = input(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call") as null|text
if(incapacitated())
return
@@ -573,7 +573,7 @@
for(var/i in C.network)
cameralist[i] = i
var/old_network = network
network = tgui_input_list(U, "Which network would you like to view?", "", cameralist)
network = input(U, "Which network would you like to view?") as null|anything in cameralist
if(!U.eyeobj)
U.view_core()
@@ -605,7 +605,7 @@
if(incapacitated())
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Thinking", "Friend Computer", "Dorfy", "Blue Glow", "Red Glow")
var/n_emote = tgui_input_list(src, "Please, select a status!", "AI Status", ai_emotions)
var/n_emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
if(!n_emote)
return
emote_display = n_emote
@@ -632,7 +632,7 @@
if(incapacitated())
return
var/input
switch(tgui_alert(src, "Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,list("Crew Member","Unique","Animal")))
switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal"))
if("Crew Member")
var/list/personnel_list = list()
@@ -640,13 +640,13 @@
personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image.
if(personnel_list.len)
input = tgui_input_list(src, "Select a crew member:", "", personnel_list)
input = input("Select a crew member:") as null|anything in personnel_list
var/icon/character_icon = personnel_list[input]
if(character_icon)
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
holo_icon = getHologramIcon(icon(character_icon))
else
tgui_alert(src, "No suitable records found. Aborting.")
alert("No suitable records found. Aborting.")
if("Animal")
var/list/icon_list = list(
@@ -665,7 +665,7 @@
"spider" = 'icons/mob/animal.dmi'
)
input = tgui_input_list(src, "Please select a hologram:", "", icon_list)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
switch(input)
@@ -689,7 +689,7 @@
"custom"
)
input = tgui_input_list(src, "Please select a hologram:", "", icon_list)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
switch(input)
@@ -949,7 +949,7 @@
to_chat(src, "No usable AI shell beacons detected.")
if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid
target = tgui_input_list(src, "Which body to control?", "", possible)
target = input(src, "Which body to control?") as null|anything in possible
if (!target || target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src)))
return
@@ -1018,7 +1018,7 @@
if(incapacitated())
return
switch(tgui_alert(src, "Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,list("Yes.","No.")))
switch(alert("Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,"Yes.","No."))
if("Yes.")
src.ghostize(FALSE, penalize = TRUE)
var/announce_rank = "Artificial Intelligence,"
+2 -2
View File
@@ -97,11 +97,11 @@
to_chat(src, "<span class='notice'>Please wait [DisplayTimeText(announcing_vox - world.time)].</span>")
return
var/message = tgui_input_text(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement)
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text
last_announcement = message
var/voxType = tgui_input_list(src, "Male or female VOX?", "VOX-gender", list("male", "female"))
var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female")
if(!message || announcing_vox > world.time)
return
@@ -77,19 +77,19 @@
if(CONFIG_GET(flag/pai_custom_holoforms))
choices += "Custom"
var/old_chassis = chassis
var/choicetype = tgui_input_list(src, "What type of chassis do you want to use?", "", choices)
var/choicetype = input(src, "What type of chassis do you want to use?") as null|anything in choices
if(!choicetype)
return FALSE
switch(choicetype)
if("Custom")
chassis = "custom"
if("Preset - Basic")
var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", possible_chassis)
var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis
if(!choice)
return FALSE
chassis = choice
if("Preset - Dynamic")
var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", dynamic_chassis_icons)
var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in dynamic_chassis_icons
if(!choice)
return FALSE
chassis = "dynamic"
@@ -51,7 +51,7 @@
if (isnull(version) || version != 1)
fdel(path)
if (!silent)
tgui_alert(user, "Your savefile was incompatible with this version and was deleted.")
alert(user, "Your savefile was incompatible with this version and was deleted.")
return 0
F["name"] >> src.name
@@ -147,7 +147,7 @@
radio.attack_self(src)
if("image")
var/newImage = tgui_input_list(usr, "Select your new display image.", "Display Image", list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses"))
var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses")
var/pID = 1
switch(newImage)
@@ -222,7 +222,7 @@
pda.silent = !pda.silent
else if(href_list["target"])
if(silent)
return tgui_alert(src, "Communications circuits remain uninitialized.")
return alert("Communications circuits remain uninitialized.")
var/target = locate(href_list["target"])
pda.create_message(src, target)
@@ -395,7 +395,7 @@
return dat
/mob/living/silicon/pai/proc/CheckDNA(mob/living/carbon/M, mob/living/silicon/pai/P)
var/answer = tgui_input_list(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No"))
var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
if(answer == "Yes")
M.visible_message("<span class='notice'>[M] presses [M.p_their()] thumb against [P].</span>",\
"<span class='notice'>You press your thumb against [P].</span>",\
@@ -150,7 +150,7 @@
if(BORG_SEC_AVAILABLE)
modulelist["Security"] = /obj/item/robot_module/security
var/input_module = tgui_input_list(src, "Please, select a module!", "Robot", sortList(modulelist))
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist)
if(!input_module || module.type != /obj/item/robot_module)
return
@@ -516,7 +516,7 @@
if(stat == DEAD)
return //won't work if dead
if(locked)
switch(tgui_alert(src, "You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", list("Yes", "No")))
switch(alert("You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", "Yes", "No"))
if("Yes")
locked = FALSE
update_icons()
@@ -1298,7 +1298,7 @@
set desc = "Select your resting pose."
sitting = 0
bellyup = 0
var/choice = tgui_alert(src, "Select resting pose", "", list("Resting", "Sitting", "Belly up"))
var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up")
switch(choice)
if("Resting")
update_icons()
+1 -1
View File
@@ -338,7 +338,7 @@
return
//Ask the user to pick a channel from what it has available.
var/Autochan = tgui_input_list(src, "Select a channel:", "", list("Default","None") + radio.channels)
var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
if(!Autochan)
return