Convert almost all alert() to tgui_alert()

This commit is contained in:
Aronai Sieyes
2021-06-25 17:03:35 -04:00
parent 70bff20384
commit 0da0c54388
191 changed files with 509 additions and 521 deletions
+1 -1
View File
@@ -544,7 +544,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
feedback_add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(current_ticket)
if(alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?","Yes","No") != "No")
if(tgui_alert(usr, "You already have a ticket open. Is this for the same issue?","Duplicate?",list("Yes","No")) != "No")
if(current_ticket)
current_ticket.MessageNoRecipient(msg)
to_chat(usr, "<span class='adminnotice'>PM to-<b>Admins</b>: [msg]</span>")
+1 -1
View File
@@ -25,7 +25,7 @@
to_chat(usr, "<span class='danger'>Error: You cannot request spice (muted from adminhelps).</span>")
return
if(alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!","Yes","No") != "No")
if(tgui_alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!",list("Yes","No")) != "No")
message_admins("[ADMIN_FULLMONTY(usr)] has requested the round be spiced up a little.")
to_chat(usr, "<span class='notice'>You have requested some more spice in your round.</span>")
else
+41 -28
View File
@@ -4,14 +4,17 @@
/mob/observer/dead/on_mob_jump()
following = null
/client/proc/Jump(var/area/A in return_sorted_areas())
/client/proc/Jump()
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
var/area/A = tgui_input_list(usr, "Pick an area:", "Jump to Area", return_sorted_areas())
if(!A)
return
usr.on_mob_jump()
usr.forceMove(pick(get_area_turfs(A)))
@@ -19,7 +22,7 @@
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
@@ -33,10 +36,10 @@
usr.forceMove(T)
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
return
/client/proc/jumptomob(var/mob/M in mob_list)
/client/proc/jumptomob()
set category = "Admin"
set name = "Jump to Mob"
set popup_menu = FALSE //VOREStation Edit - Declutter.
@@ -45,6 +48,9 @@
return
if(config.allow_admin_jump)
var/mob/M = tgui_input_list(usr, "Pick a mob:", "Jump to Mob", mob_list)
if(!M)
return
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
@@ -57,7 +63,7 @@
else
to_chat(A, "<span class='filter_adminlog'>This mob is not located in the game world.</span>")
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin"
@@ -79,7 +85,7 @@
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptokey()
set category = "Admin"
@@ -92,9 +98,8 @@
var/list/keys = list()
for(var/mob/M in player_list)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys))
if(!selection)
to_chat(src, "<span class='filter_adminlog'>No keys found.</span>")
return
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
@@ -103,15 +108,18 @@
usr.forceMove(get_turf(M))
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/Getmob(var/mob/M in mob_list)
/client/proc/Getmob()
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
var/mob/M = tgui_input_list(usr, "Pick a mob:", "Get Mob", mob_list)
if(!M)
return
log_admin("[key_name(usr)] jumped to [key_name(M)]")
var/msg = "[key_name_admin(usr)] jumped to [key_name_admin(M)]"
message_admins(msg)
@@ -120,7 +128,7 @@
M.forceMove(get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/Getkey()
set category = "Admin"
@@ -134,7 +142,7 @@
var/list/keys = list()
for(var/mob/M in player_list)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys))
if(!selection)
return
var/mob/M = selection:mob
@@ -150,26 +158,31 @@
M.forceMove(get_turf(usr))
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/sendmob(var/mob/M in sortmobs())
/client/proc/sendmob()
set category = "Admin"
set name = "Send Mob"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
if(config.allow_admin_jump)
M.on_mob_jump()
M.forceMove(pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
message_admins(msg)
admin_ticket_log(M, msg)
else
alert(usr, "Admin jumping disabled")
if(config.allow_admin_jump)
var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas())
if(!A)
return
var/mob/M = tgui_input_list(usr, "Pick a mob:", "Send Mob", mob_list)
if(!M)
return
M.on_mob_jump()
M.forceMove(pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
message_admins(msg)
admin_ticket_log(M, msg)
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/cmd_admin_move_atom(var/atom/movable/AM, tx as num, ty as num, tz as num)
set category = "Admin"
@@ -199,4 +212,4 @@
feedback_add_details("admin_verb", "MA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped [AM] to coordinates [tx], [ty], [tz]")
else
alert(usr, "Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
+1 -1
View File
@@ -7,7 +7,7 @@
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
if(tgui_alert(usr, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) == "No")
return
to_chat(usr, "Checking for disconnected pipes...")
+3 -3
View File
@@ -275,7 +275,7 @@
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
if(BUILDMODE_ROOM)
var/choice = alert(usr, "Would you like to change the floor or wall holders?","Room Builder", "Floor", "Wall")
var/choice = tgui_alert(usr, "Would you like to change the floor or wall holders?","Room Builder", list("Floor", "Wall"))
switch(choice)
if("Floor")
floor_holder = get_path_from_partial_text(/turf/simulated/floor/plating)
@@ -283,7 +283,7 @@
wall_holder = get_path_from_partial_text(/turf/simulated/wall)
if(BUILDMODE_LIGHTS)
var/choice = alert(usr, "Change the new light range, power, or color?", "Light Maker", "Range", "Power", "Color")
var/choice = tgui_alert(usr, "Change the new light range, power, or color?", "Light Maker", list("Range", "Power", "Color"))
switch(choice)
if("Range")
var/input = input("New light range.","Light Maker",3) as null|num
@@ -635,7 +635,7 @@
matches += path
if(matches.len==0)
alert(usr, "No results found. Sorry.")
tgui_alert_async(usr, "No results found. Sorry.")
return
var/result = null
@@ -26,7 +26,7 @@
to_chat(usr, "<span class='filter_arning'> Only mobs with clients can alter their own appearance.</span>")
return
var/datum/gender/T = gender_datums[H.get_visible_gender()]
switch(alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
if("Yes")
log_and_message_admins("has allowed [H] to change [T.his] appearance, without whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H, check_species_whitelist = 0)
@@ -46,7 +46,7 @@
if(!istype(M, /mob/living/carbon/human))
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
return
switch(alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!","Yes","No"))
switch(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")))
if("No")
return
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
@@ -90,7 +90,7 @@
if(new_fstyle)
M.f_style = new_fstyle
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female", "Neuter")
var/new_gender = tgui_alert(usr, "Please select gender.", "Character Generation", list("Male", "Female", "Neuter"))
if (new_gender)
M.set_gender(new_gender)
+2 -2
View File
@@ -6,11 +6,11 @@
if(!check_rights(R_FUN))
return
if(alert(usr, "Are you sure you want to run [cinematic]?","Confirmation","Yes","No")=="No") return
if(tgui_alert(usr, "Are you sure you want to run [cinematic]?","Confirmation",list("Yes","No"))=="No") return
if(!ticker) return
switch(cinematic)
if("explosion")
if(alert(usr, "The game will be over. Are you really sure?", "Confirmation" ,"Continue", "Cancel") == "Cancel")
if(tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel")) == "Cancel")
return
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
var/override
+14 -14
View File
@@ -98,7 +98,7 @@
set name = "Make Robot"
if(!ticker)
alert(usr, "Wait until the game starts")
tgui_alert_async(usr, "Wait until the game starts")
return
if(istype(M, /mob/living/carbon/human))
log_admin("[key_name(src)] has robotized [M.key].")
@@ -106,22 +106,22 @@
M:Robotize()
else
alert(usr, "Invalid mob")
tgui_alert_async(usr, "Invalid mob")
/client/proc/cmd_admin_animalize(var/mob/M in mob_list)
set category = "Fun"
set name = "Make Simple Animal"
if(!ticker)
alert(usr, "Wait until the game starts")
tgui_alert_async(usr, "Wait until the game starts")
return
if(!M)
alert(usr, "That mob doesn't seem to exist, close the panel and try again.")
tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.")
return
if(istype(M, /mob/new_player))
alert(usr, "The mob must not be a new_player.")
tgui_alert_async(usr, "The mob must not be a new_player.")
return
log_admin("[key_name(src)] has animalized [M.key].")
@@ -161,7 +161,7 @@
set name = "Make Alien"
if(!ticker)
alert(usr, "Wait until the game starts")
tgui_alert_async(usr, "Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
@@ -171,7 +171,7 @@
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>", 1)
else
alert(usr, "Invalid mob")
tgui_alert_async(usr, "Invalid mob")
//TODO: merge the vievars version into this or something maybe mayhaps
@@ -272,7 +272,7 @@
set name = "Grant Full Access"
if (!ticker)
alert(usr, "Wait until the game starts")
tgui_alert_async(usr, "Wait until the game starts")
return
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
@@ -293,7 +293,7 @@
H.equip_to_slot_or_del(id, slot_wear_id)
H.update_inv_wear_id()
else
alert(usr, "Invalid mob")
tgui_alert_async(usr, "Invalid mob")
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("<font color='blue'>[key_name_admin(usr)] has granted [M.key] full access.</font>", 1)
@@ -305,7 +305,7 @@
if(!check_rights(R_DEBUG|R_ADMIN|R_EVENT)) return
if(M.ckey)
if(alert(usr, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation","Yes","No") != "Yes")
if(tgui_alert(usr, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation",list("Yes","No")) != "Yes")
return
else
var/mob/observer/dead/ghost = new/mob/observer/dead(M,1)
@@ -453,7 +453,7 @@
set name = "Start Singularity"
set desc = "Sets up the singularity and all machines to get power flowing through the station"
if(alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity","Yes","No") != "Yes")
if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes")
return
for(var/obj/machinery/power/emitter/E in machines)
@@ -499,7 +499,7 @@
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/response = alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter","Setup Completely","Setup except coolant","No")
var/response = tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No"))
if(response == "No")
return
@@ -606,7 +606,7 @@
// DNA2 - Admin Hax
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
if(!ticker)
alert(usr, "Wait until the game starts")
tgui_alert_async(usr, "Wait until the game starts")
return
if(istype(M, /mob/living/carbon))
M.dna.SetSEState(block,!M.dna.GetSEState(block))
@@ -617,7 +617,7 @@
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
else
alert(usr, "Invalid mob")
tgui_alert_async(usr, "Invalid mob")
/datum/admins/proc/view_runtimes()
set category = "Debug"
+1 -1
View File
@@ -3,7 +3,7 @@
set name = "Show Air Report"
if(!master_controller || !air_master)
alert(usr,"Master_controller or air_master not found.","Air Report")
tgui_alert_async(usr,"Master_controller or air_master not found.","Air Report")
return
var/active_groups = air_master.active_zones
+2 -2
View File
@@ -13,12 +13,12 @@
var/dice = num2text(sum) + "d" + num2text(side)
if(alert(usr, "Do you want to inform the world about your game?","Show world?","Yes", "No") == "Yes")
if(tgui_alert(usr, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes")
to_world("<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
var/result = roll(dice)
if(alert(usr, "Do you want to inform the world about the result?","Show world?","Yes", "No") == "Yes")
if(tgui_alert(usr, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes")
to_world("<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
+1 -1
View File
@@ -13,7 +13,7 @@
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>")
return
if(new_fps > config.fps * 1.5)
if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]", "Warning!", "Confirm", "ABORT-ABORT-ABORT") != "Confirm")
if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]", "Warning!", list("Confirm", "ABORT-ABORT-ABORT")) != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
+1 -1
View File
@@ -5,7 +5,7 @@
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) return
if(alert(usr, "WARNING: Executing this command will perform a full reset of atmosphere. All pipelines will lose any gas that may be in them, and all zones will be reset to contain air mix as on roundstart. The supermatter engine will also be stopped (to prevent overheat due to removal of coolant). Do not use unless the station is suffering serious atmospheric issues due to grief or bug.", "Full Atmosphere Reboot", "No", "Yes") == "No")
if(tgui_alert(usr, "WARNING: Executing this command will perform a full reset of atmosphere. All pipelines will lose any gas that may be in them, and all zones will be reset to contain air mix as on roundstart. The supermatter engine will also be stopped (to prevent overheat due to removal of coolant). Do not use unless the station is suffering serious atmospheric issues due to grief or bug.", "Full Atmosphere Reboot", list("No", "Yes")) == "No")
return
feedback_add_details("admin_verb","FA")
+1 -1
View File
@@ -6,7 +6,7 @@
if(!check_rights(R_FUN))
return
var/result = alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , "No", "Yes (Cosmetic)", "Yes (Real)")
var/result = tgui_alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , list("No", "Yes (Cosmetic)", "Yes (Real)"))
if(result == "No")
return
@@ -26,9 +26,8 @@
for(var/S in template.get_affected_turfs(T,centered = TRUE, orientation=orientation))
preview += image('icons/misc/debug_group.dmi',S ,"red")
usr.client.images += preview
if(alert(usr,"Confirm location.", "Template Confirm","No","Yes") == "Yes")
if(template.annihilate && alert(usr,"This template is set to annihilate everything in the red square. \
\nEVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm","No","Yes") == "No")
if(tgui_alert(usr,"Confirm location.", "Template Confirm",list("No","Yes")) == "Yes")
if(template.annihilate && tgui_alert(usr,"This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) == "No")
usr.client.images -= preview
return
@@ -57,11 +56,11 @@
orientation = dir2angle(orientation)
if((!(orientation%180) && template.width > world.maxx || template.height > world.maxy) || (orientation%180 && template.width > world.maxy || template.height > world.maxx))
if(alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!","Cancel","Yes") == "Cancel")
if(tgui_alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) == "Cancel")
to_chat(usr,"Template placement aborted.")
return
if(alert(usr,"Confirm map load.", "Template Confirm","No","Yes") == "Yes")
if(tgui_alert(usr,"Confirm map load.", "Template Confirm",list("No","Yes")) == "Yes")
if(template.load_new_z(orientation=orientation))
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].</span>")
else
+2 -2
View File
@@ -69,7 +69,7 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
set name = "Camera Report"
if(!master_controller)
alert(usr,"Master_controller not found.","Sec Camera Report")
tgui_alert_async(usr,"Master_controller not found.","Sec Camera Report")
return 0
var/list/obj/machinery/camera/CL = list()
@@ -273,7 +273,7 @@ var/list/debug_verbs = list (
set category = "ZAS"
set name = "Reboot ZAS"
if(alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS","Reboot ZAS","Nevermind") == "Reboot ZAS")
if(tgui_alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS",list("Reboot ZAS","Nevermind")) == "Reboot ZAS")
SSair.RebootZAS()
/client/proc/count_objects_on_z_level()
+1 -1
View File
@@ -10,7 +10,7 @@ var/list/sounds_cache = list()
sounds_cache += S
if(alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
if(tgui_alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) == "Cancel")
return
log_admin("[key_name(src)] played sound [S]")
+27 -27
View File
@@ -4,7 +4,7 @@
if(!holder)
return
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
var/confirm = tgui_alert(src, "Make [M] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -23,7 +23,7 @@
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert(usr, "The AI can't be sent to prison you jerk!")
tgui_alert_async(usr, "The AI can't be sent to prison you jerk!")
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M)
@@ -49,7 +49,7 @@
if(!holder)
return
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All"))
if(age == "All")
age = 9999999
@@ -220,12 +220,12 @@
if(!holder)
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") return
log_admin("[key_name(src)] has added a random AI law.")
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No"))
if(show_log == "Yes")
command_announcement.Announce("Ion storm detected near \the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
@@ -275,7 +275,7 @@ Ccomp's first proc.
return
if(GLOB.respawn_timers[target] == -1) // Their respawn timer is set to -1, which is 'not allowed to respawn'
var/response = alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?","No","Yes")
var/response = tgui_alert(src, "Are you sure you wish to allow this individual to respawn? They would normally not be able to.","Allow impossible respawn?",list("No","Yes"))
if(response == "No")
return
@@ -387,11 +387,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
//I frontload all the questions so we don't have a half-done process while you're reading.
var/location = alert(src, "Please specify where to spawn them.", "Location", "Right Here", "Arrivals", "Cancel")
var/location = tgui_alert(src, "Please specify where to spawn them.", "Location", list("Right Here", "Arrivals", "Cancel"))
if(location == "Cancel" || !location)
return
var/announce = alert(src,"Announce as if they had just arrived?", "Announce", "Yes", "No", "Cancel")
var/announce = tgui_alert(src,"Announce as if they had just arrived?", "Announce", list("Yes", "No", "Cancel"))
if(announce == "Cancel")
return
else if(announce == "Yes") //Too bad buttons can't just have 1/0 values and different display strings
@@ -399,7 +399,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
announce = 0
var/inhabit = alert(src,"Put the person into the spawned mob?", "Inhabit", "Yes", "No", "Cancel")
var/inhabit = tgui_alert(src,"Put the person into the spawned mob?", "Inhabit", list("Yes", "No", "Cancel"))
if(inhabit == "Cancel")
return
else if(inhabit == "Yes")
@@ -415,13 +415,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Found their record, they were spawned previously
if(record_found)
var/samejob = alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned","Yes","Assistant","No")
var/samejob = tgui_alert(src,"Found [picked_client.prefs.real_name] in data core. They were [record_found.fields["real_rank"]] this round. Assign same job? They will not be re-added to the manifest/records, either way.","Previously spawned",list("Yes","Assistant","No"))
if(samejob == "Yes")
charjob = record_found.fields["real_rank"]
else if(samejob == USELESS_JOB) //VOREStation Edit - Visitor not Assistant
charjob = USELESS_JOB //VOREStation Edit - Visitor not Assistant
else
records = alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records","Yes","No","Cancel")
records = tgui_alert(src,"No data core entry detected. Would you like add them to the manifest, and sec/med/HR records?","Records",list("Yes","No","Cancel"))
if(records == "Cancel")
return
if(records == "Yes")
@@ -440,7 +440,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//If you've picked a job by now, you can equip them.
var/equipment
if(charjob)
equipment = alert(src,"Spawn them with equipment?", "Equipment", "Yes", "No", "Cancel")
equipment = tgui_alert(src,"Spawn them with equipment?", "Equipment", list("Yes", "No", "Cancel"))
if(equipment == "Cancel")
return
else if(equipment == "Yes")
@@ -464,7 +464,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(location)
if("Right Here") //Spawn them on your turf
spawnloc = get_turf(src.mob)
sparks = alert(src,"Sparks like they teleported in?", "Showy", "Yes", "No", "Cancel")
sparks = tgui_alert(src,"Sparks like they teleported in?", "Showy", list("Yes", "No", "Cancel"))
if(sparks == "Cancel")
return
if(sparks == "No")
@@ -575,7 +575,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No"))
if(show_log == "Yes")
command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -590,7 +590,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!mob)
return
if(!istype(M))
alert(usr, "Cannot revive a ghost")
tgui_alert_async(usr, "Cannot revive a ghost")
return
if(config.allow_admin_rev)
M.revive()
@@ -600,7 +600,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins(msg)
admin_ticket_log(M, msg)
else
alert(usr, "Admin revive disabled")
tgui_alert_async(usr, "Admin revive disabled")
feedback_add_details("admin_verb","REJU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_create_centcom_report()
@@ -620,7 +620,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//New message handling
post_comm_message(customname, replacetext(input, "\n", "<br/>"))
switch(alert(usr, "Should this be announced to the general population?","Show world?","Yes","No"))
switch(tgui_alert(usr, "Should this be announced to the general population?","Show world?",list("Yes","No")))
if("Yes")
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
if("No")
@@ -669,7 +669,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20))
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flash)
@@ -712,7 +712,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN|R_FUN)) return //VOREStation Edit
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") return
//Due to the delay here its easy for something to have happened to the mob
if(!M) return
@@ -734,7 +734,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere
return
@@ -752,7 +752,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(src, "Only administrators may use this command.")
return
var/mob/M = null
switch(alert(usr, "How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
switch(tgui_alert(usr, "How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
if("Key List")
var/list/keys = list()
for(var/mob/M in player_list)
@@ -762,10 +762,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
M = selection:mob
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level)))
alert(usr, "You cannot perform this action. You must be of a higher administrative rank!")
tgui_alert_async(usr, "You cannot perform this action. You must be of a higher administrative rank!")
return
switch(alert(usr, "Temporary Ban?","Temporary Ban","Yes","No"))
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No")))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
if(!mins)
@@ -879,7 +879,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN)) return //VOREStation Edit
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") return
var/choice
@@ -908,7 +908,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN)) return //VOREStation Edit
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return
if(!ticker || !emergency_shuttle.can_recall())
return
@@ -962,7 +962,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
var/notifyplayers = tgui_alert(src, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
if(notifyplayers == "Cancel")
return
@@ -1007,7 +1007,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!M)
return
var/confirm = alert(usr, "Are you sure you want to cryo [M]?","Confirmation","No","Yes")
var/confirm = tgui_alert(usr, "Are you sure you want to cryo [M]?","Confirmation",list("No","Yes"))
if(confirm == "No")
return
+2 -2
View File
@@ -27,13 +27,13 @@
if(!chosen)
return
var/char_name = alert(src, "Spawn mob with their character name?", "Mob name", "Yes", "No", "Cancel")
var/char_name = tgui_alert(src, "Spawn mob with their character name?", "Mob name", list("Yes", "No", "Cancel"))
var/name = 0
if(char_name == "Cancel")
return
if(char_name == "Yes")
name = 1
var/vorgans = alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", "Yes", "No", "Cancel")
var/vorgans = tgui_alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", list("Yes", "No", "Cancel"))
var/organs
if(vorgans == "Cancel")
return
+1 -1
View File
@@ -77,7 +77,7 @@
kin_type = kin_types[kin_type]
var/myself = alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?","Control","Cancel","Delete")
var/myself = tgui_alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete"))
if(myself == "Cancel" || !target)
return
+3 -3
View File
@@ -36,16 +36,16 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
to_chat(usr, "<font color='red'>Someone is already sending a team.</font>")
return
if(alert(usr, "Do you want to send in a strike team? Once enabled, this is irreversible.","Strike Team","Yes","No")!="Yes")
if(tgui_alert(usr, "Do you want to send in a strike team? Once enabled, this is irreversible.","Strike Team",list("Yes","No"))!="Yes")
return
alert(usr, "This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
tgui_alert(usr, "This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") // Should remain tgui_alert() (blocking)
choice = null
while(!choice)
choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
if(!choice)
if(alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team","Yes","No")=="Yes")
if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))=="Yes")
return
consider_ert_load() //VOREStation Add