Convert almost all alert() to tgui_alert()

This commit is contained in:
Aronai Sieyes
2021-06-25 16:20:22 -04:00
parent 70bff20384
commit 0da0c54388
191 changed files with 509 additions and 521 deletions
+2 -2
View File
@@ -162,7 +162,7 @@
if(!spawn_path)
return
if(alert(usr, "Do you wish the mob to have a player?","Assign Player?","No","Yes") == "No")
if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No")
var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
@@ -196,7 +196,7 @@
var/datum/antagonist/A = all_antag_types[antag_type]
A.equip(spawned_mob)
if(alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!","No","Yes") == "No")
if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) == "No")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
+8 -8
View File
@@ -41,25 +41,25 @@
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = alert(usr, "Do you wish to supply a custom loot list?","Supply Drop","No","Yes")
var/choice = tgui_alert(usr, "Do you wish to supply a custom loot list?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
chosen_loot_types = list()
choice = alert(usr, "Do you wish to add mobs?","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to add mobs?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/mob/living)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert(usr, "Do you wish to add structures or machines?","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert(usr, "Do you wish to add any non-weapon items?","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item) - typesof(/obj/item/weapon)
@@ -67,14 +67,14 @@
break
chosen_loot_types |= adding_loot_type
choice = alert(usr, "Do you wish to add weapons?","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to add weapons?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item/weapon)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/atom/movable)
@@ -82,11 +82,11 @@
break
chosen_loot_types |= adding_loot_type
else
choice = alert(usr, "Do you wish to specify a loot type?","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Do you wish to specify a loot type?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
chosen_loot_type = input("Select a loot type.", "Loot Selection", null) as null|anything in supply_drop_random_loot_types()
choice = alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop","No","Yes")
choice = tgui_alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes"))
if(choice == "No")
return
log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])")
+1 -1
View File
@@ -41,7 +41,7 @@
return
var/datum/random_map/M
if(alert(usr, "Do you wish to customise the map?","Customize","Yes","No") == "Yes")
if(tgui_alert(usr, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes")
var/seed = input("Seed? (blank for none)") as text|null
var/lx = input("X-size? (blank for default)") as num|null
var/ly = input("Y-size? (blank for default)") as num|null