The One Where I Port Modals

This commit is contained in:
Chompstation Bot
2021-06-30 19:29:34 +00:00
parent 2457a62edd
commit b6e1989a01
468 changed files with 10519 additions and 1808 deletions
+6 -6
View File
@@ -158,12 +158,12 @@
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
var/spawn_path = input("Select a mob type.", "Drop Pod Selection", null) as null|anything in typesof(/mob/living)-/mob/living
var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", typesof(/mob/living)-/mob/living)
if(!spawn_path)
return
if(alert("Do you wish the mob to have a player?",,"No","Yes") == "No")
var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No")
var/spawn_count = input(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
for(var/i=0;i<spawn_count;i++)
@@ -181,7 +181,7 @@
return
// Get a player and a mob type.
selected_player = input("Select a player.", "Drop Pod Selection", null) as null|anything in candidates
selected_player = tgui_input_list(usr, "Select a player.", "Drop Pod Selection", candidates)
if(!selected_player)
return
@@ -191,12 +191,12 @@
// Equip them, if they are human and it is desirable.
if(istype(spawned_mob, /mob/living/carbon/human))
var/antag_type = input("Select an equipment template to use or cancel for nude.", null) as null|anything in all_antag_types
var/antag_type = tgui_input_list(usr, "Select an equipment template to use or cancel for nude.", all_antag_types)
if(antag_type)
var/datum/antagonist/A = all_antag_types[antag_type]
A.equip(spawned_mob)
if(alert("Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.",,"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)
+14 -14
View File
@@ -41,52 +41,52 @@
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = alert("Do you wish to supply a custom loot list?",,"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("Do you wish to add mobs?",,"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)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/mob/living))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add structures or machines?",,"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)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj) - typesof(/obj/item))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add any non-weapon items?",,"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)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item) - typesof(/obj/item/weapon))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add weapons?",,"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)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item/weapon))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)",,"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)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/atom/movable))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
else
choice = alert("Do you wish to specify a loot type?",,"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()
chosen_loot_type = tgui_input_list(usr, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types())
choice = alert("Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.",,"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])")
+15 -15
View File
@@ -5,7 +5,7 @@
if(!holder) return
var/choice = input("Choose a map to display.") as null|anything in random_maps
var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", random_maps)
if(!choice)
return
var/datum/random_map/M = random_maps[choice]
@@ -19,7 +19,7 @@
if(!holder) return
var/choice = input("Choose a map to delete.") as null|anything in random_maps
var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", random_maps)
if(!choice)
return
var/datum/random_map/M = random_maps[choice]
@@ -36,15 +36,15 @@
if(!holder) return
var/map_datum = input("Choose a map to create.") as null|anything in typesof(/datum/random_map)-/datum/random_map
var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", typesof(/datum/random_map)-/datum/random_map)
if(!map_datum)
return
var/datum/random_map/M
if(alert("Do you wish to customise the map?",,"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
if(tgui_alert(usr, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes")
var/seed = input(usr, "Seed? (blank for none)") as text|null
var/lx = input(usr, "X-size? (blank for default)") as num|null
var/ly = input(usr, "Y-size? (blank for default)") as num|null
M = new map_datum(seed,null,null,null,lx,ly,1)
else
M = new map_datum(null,null,null,null,null,null,1)
@@ -60,14 +60,14 @@
if(!holder) return
var/choice = input("Choose a map to apply.") as null|anything in random_maps
var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", random_maps)
if(!choice)
return
var/datum/random_map/M = random_maps[choice]
if(istype(M))
var/tx = input("X? (default to current turf)") as num|null
var/ty = input("Y? (default to current turf)") as num|null
var/tz = input("Z? (default to current turf)") as num|null
var/tx = input(usr, "X? (default to current turf)") as num|null
var/ty = input(usr, "Y? (default to current turf)") as num|null
var/tz = input(usr, "Z? (default to current turf)") as num|null
if(isnull(tx) || isnull(ty) || isnull(tz))
var/turf/T = get_turf(usr)
tx = !isnull(tx) ? tx : T.x
@@ -85,21 +85,21 @@
if(!holder) return
var/choice = input("Choose a map as base.") as null|anything in random_maps
var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", random_maps)
if(!choice)
return
var/datum/random_map/base_map = random_maps[choice]
choice = null
choice = input("Choose a map to overlay.") as null|anything in random_maps
choice = tgui_input_list(usr, "Choose a map to overlay.", "Map Choice", random_maps)
if(!choice)
return
var/datum/random_map/overlay_map = random_maps[choice]
if(istype(base_map) && istype(overlay_map))
var/tx = input("X? (default to 1)") as num|null
var/ty = input("Y? (default to 1)") as num|null
var/tx = input(usr, "X? (default to 1)") as num|null
var/ty = input(usr, "Y? (default to 1)") as num|null
if(!tx) tx = 1
if(!ty) ty = 1
message_admins("[key_name_admin(usr)] has applied [overlay_map.name] to [base_map.name] at x[tx],y[ty].")