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
+21 -21
View File
@@ -104,7 +104,7 @@
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")
//Buttons for helpful stuff. This is where people land in the tgui
if("clear_virus")
var/choice = tgui_input_list(holder, "Are you sure you want to cure all disease?", "", list("Yes", "Cancel"))
var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
if(choice == "Yes")
message_admins("[key_name_admin(holder)] has cured all diseases.")
for(var/thing in SSdisease.active_diseases)
@@ -130,11 +130,11 @@
holder.holder.output_ai_laws()//huh, inconvenient var naming, huh?
if("showgm")
if(!SSticker.HasRoundStarted())
tgui_alert(holder, "The game hasn't started yet!")
alert("The game hasn't started yet!")
else if (SSticker.mode)
tgui_alert(holder, "The game mode is [SSticker.mode.name]")
alert("The game mode is [SSticker.mode.name]")
else
tgui_alert(holder, "For some reason there's a SSticker, but not a game mode")
alert("For some reason there's a SSticker, but not a game mode")
if("manifest")
var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
@@ -163,7 +163,7 @@
if("ctfbutton")
toggle_all_ctf(holder)
if("tdomereset")
var/delete_mobs = tgui_alert(holder, "Clear all mobs?","Confirm",list("Yes","No","Cancel"))
var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
if(delete_mobs == "Cancel")
return
@@ -181,7 +181,7 @@
var/area/template = GLOB.areas_by_type[/area/tdome/arena_source]
template.copy_contents_to(thunderdome)
if("set_name")
var/new_name = tgui_input_text(holder, "Please input a new name for the station.", "What?", "")
var/new_name = input(holder, "Please input a new name for the station.", "What?", "") as text|null
if(!new_name)
return
set_station_name(new_name)
@@ -195,7 +195,7 @@
message_admins("<span class='adminnotice'>[key_name_admin(holder)] reset the station name.</span>")
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
if("night_shift_set")
var/val = tgui_alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", list("On", "Off", "Automatic"))
var/val = alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic")
switch(val)
if("Automatic")
if(CONFIG_GET(flag/enable_night_shifts))
@@ -239,14 +239,14 @@
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak"))
switch(tgui_alert(holder, "Do you want this to be a random disease or do you have something in mind?",,list("Make Your Own","Random","Choose")))
switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
if("Make Your Own")
AdminCreateVirus(holder)
if("Random")
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
E = DC.runEvent()
if("Choose")
var/virus = tgui_input_list(holder, "Choose the virus to spread", "BIOHAZARD", sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc))
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
DO.virus_type = virus
@@ -254,7 +254,7 @@
if("allspecies")
if(!is_funmin)
return
var/result = tgui_input_list(holder, "Please choose a new species","Species", GLOB.species_list)
var/result = input(holder, "Please choose a new species","Species") as null|anything in GLOB.species_list
if(result)
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Species Change", "[result]"))
log_admin("[key_name(holder)] turned all humans into [result]", 1)
@@ -297,7 +297,7 @@
if("onlyone")
if(!is_funmin)
return
var/response = tgui_alert(holder, "Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)"))
var/response = alert("Delay by 40 seconds?", "There can, in fact, only be one", "Instant!", "40 seconds (crush the hope of a normal shift)")
if(response == "Instant!")
holder.only_one()
else
@@ -308,7 +308,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns"))
var/survivor_probability = 0
switch(tgui_alert(holder, "Do you want this to create survivors antagonists?",,list("No Antags","Some Antags","All Antags!")))
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -320,7 +320,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic"))
var/survivor_probability = 0
switch(tgui_alert(holder, "Do you want this to create magician antagonists?",,list("No Antags","Some Antags","All Antags!")))
switch(alert("Do you want this to create magician antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -331,12 +331,12 @@
if(!is_funmin)
return
if(!SSevents.wizardmode)
if(tgui_alert(holder, "Do you want to toggle summon events on?",,list("Yes","No")) == "Yes")
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate"))
else
switch(tgui_alert(holder, "What would you like to do?","Intensify Summon Events",list("Turn Off Summon Events","Nothing")))
switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
if("Intensify Summon Events")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Intensify"))
@@ -452,7 +452,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Bomb Cap"))
var/newBombCap = tgui_input_num(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE)
var/newBombCap = input(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
if (!CONFIG_SET(number/bombcap, newBombCap))
return
@@ -471,7 +471,7 @@
if(!is_funmin)
return
if(!SSticker.HasRoundStarted())
tgui_alert(holder, "The game hasn't started yet!")
alert("The game hasn't started yet!")
return
var/objective = stripped_input(holder, "Enter an objective")
if(!objective)
@@ -497,7 +497,7 @@
if(!is_funmin)
return
if(!SSticker.HasRoundStarted())
tgui_alert(holder, "The game hasn't started yet!")
alert("The game hasn't started yet!")
return
message_admins("[key_name_admin(holder)] activated AK-47s for Everyone!")
holder.ak47s()
@@ -516,11 +516,11 @@
if("anime")
if(!is_funmin)
return
var/animetype = tgui_alert(holder, "Would you like to have the clothes be changed?",,list("Yes","No","Cancel"))
var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel")
var/droptype
if(animetype =="Yes")
droptype = tgui_alert(holder, "Make the uniforms Nodrop?",,list("Yes","No","Cancel"))
droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel")
if(animetype == "Cancel" || droptype == "Cancel")
return
@@ -584,7 +584,7 @@
if(E)
E.processing = FALSE
if(E.announceWhen>0)
switch(tgui_alert(holder, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel")))
switch(alert(holder, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel"))
if("Cancel")
E.kill()
return