mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-26 17:41:05 +00:00
Replace alert usage with tgui_alert (#58419)
Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
This commit is contained in:
@@ -461,7 +461,7 @@
|
||||
options += "Server Restart (Kill and restart DD)";
|
||||
|
||||
if(SSticker.admin_delay_notice)
|
||||
if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", list("Yes", "No")) != "Yes")
|
||||
return FALSE
|
||||
|
||||
var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
|
||||
@@ -471,7 +471,7 @@
|
||||
switch(result)
|
||||
if("Regular Restart")
|
||||
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
|
||||
if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
|
||||
if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
|
||||
return FALSE
|
||||
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
|
||||
if("Regular Restart (with delay)")
|
||||
@@ -479,7 +479,7 @@
|
||||
if(!delay)
|
||||
return FALSE
|
||||
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
|
||||
if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
|
||||
if(tgui_alert(usr,"Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
|
||||
return FALSE
|
||||
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
|
||||
if("Hard Restart (No Delay, No Feeback Reason)")
|
||||
@@ -499,7 +499,7 @@
|
||||
|
||||
if (!usr.client.holder)
|
||||
return
|
||||
var/confirm = alert("End the round and restart the game world?", "End Round", "Yes", "Cancel")
|
||||
var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -572,7 +572,7 @@
|
||||
if(!SSticker.start_immediately)
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
|
||||
if(alert("Are you sure you want to start the round?","Start Now","Start Now","Cancel") != "Start Now")
|
||||
if(tgui_alert(usr, "Are you sure you want to start the round?","Start Now",list("Start Now","Cancel")) != "Start Now")
|
||||
return FALSE
|
||||
SSticker.start_immediately = TRUE
|
||||
log_admin("[usr.key] has started the game.")
|
||||
@@ -643,7 +643,7 @@
|
||||
|
||||
var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
return alert("Too late... The game has already started!")
|
||||
return tgui_alert(usr, "Too late... The game has already started!")
|
||||
if(newtime)
|
||||
newtime = newtime*10
|
||||
SSticker.SetTimeLeft(newtime)
|
||||
@@ -665,7 +665,7 @@
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
|
||||
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
|
||||
else
|
||||
alert("[M.name] is not prisoned.")
|
||||
tgui_alert(usr,"[M.name] is not prisoned.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
|
||||
@@ -832,7 +832,7 @@
|
||||
var/count = 0
|
||||
|
||||
if(!SSjob.initialized)
|
||||
alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
|
||||
tgui_alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
|
||||
return
|
||||
|
||||
dat += "<table>"
|
||||
@@ -931,7 +931,7 @@
|
||||
question = "This mob already has a user ([tomob.key]) in control of it! "
|
||||
question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?"
|
||||
|
||||
var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
|
||||
var/ask = tgui_alert(usr, question, "Place ghost in control of mob?", list("Yes", "No"))
|
||||
if (ask != "Yes")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
if(range_flash == null)
|
||||
return
|
||||
if(range_devastation > GLOB.MAX_EX_DEVESTATION_RANGE || range_heavy > GLOB.MAX_EX_HEAVY_RANGE || range_light > GLOB.MAX_EX_LIGHT_RANGE || range_flash > GLOB.MAX_EX_FLASH_RANGE)
|
||||
if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
|
||||
if(tgui_alert(usr, "Bomb is bigger than the maxcap. Continue?",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
epicenter = mob.loc //We need to reupdate as they may have moved again
|
||||
explosion(epicenter, devastation_range = range_devastation, heavy_impact_range = range_heavy, light_impact_range = range_light, flash_range = range_flash, adminlog = TRUE, ignorecap = TRUE)
|
||||
@@ -626,7 +626,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
if(!spell_desc)
|
||||
return
|
||||
|
||||
var/robeless = (alert(usr, "Would you like to force this spell to be robeless?", "Robeless Casting?", "Force Robeless", "Use Spell Setting") == "Force Robeless")
|
||||
var/robeless = (tgui_alert(usr, "Would you like to force this spell to be robeless?", "Robeless Casting?", list("Force Robeless", "Use Spell Setting")) == "Force Robeless")
|
||||
|
||||
if(QDELETED(spell_recipient))
|
||||
to_chat(usr, "<span class='warning'>The intended spell recipient no longer exists.</span>")
|
||||
|
||||
@@ -91,10 +91,10 @@ GLOBAL_VAR(antag_prototypes)
|
||||
|
||||
/datum/mind/proc/traitor_panel()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Not before round-start!", "Alert")
|
||||
tgui_alert(usr, "Not before round-start!", "Alert")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
alert("This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
|
||||
tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
|
||||
return
|
||||
|
||||
var/out = "<B>[name]</B>[(current && (current.real_name!=name))?" (as [current.real_name])":""]<br>"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/targetselected = FALSE
|
||||
var/returnval
|
||||
|
||||
switch(alert("Proc owned by something?",,"Yes","No"))
|
||||
switch(tgui_alert(usr,"Proc owned by something?",,list("Yes","No")))
|
||||
if("Yes")
|
||||
targetselected = TRUE
|
||||
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT, VV_MARKED_DATUM, VV_TEXT_LOCATE, VV_PROCCALL_RETVAL))
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
/datum/admins/proc/check_antagonists()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr, "The game hasn't started yet!")
|
||||
return
|
||||
var/list/dat = list("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Round Status</title></head><body><h1><B>Round Status</B></h1>")
|
||||
if(SSticker.mode.replacementmode)
|
||||
|
||||
@@ -117,11 +117,11 @@
|
||||
if(!choice)
|
||||
return
|
||||
if(!ispath(choice))
|
||||
alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no")
|
||||
tgui_alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, list("oh no"))
|
||||
return
|
||||
if(initial(choice.icon_state) == null) //hacky check copied from experimentor code
|
||||
var/msg = "Warning: This item's icon_state is null, indicating it is very probably not actually a usable item."
|
||||
if(alert(owner, msg, OUTFIT_EDITOR_NAME, "Use it anyway", "Cancel") != "Use it anyway")
|
||||
if(tgui_alert(owner, msg, OUTFIT_EDITOR_NAME, list("Use it anyway", "Cancel")) != "Use it anyway")
|
||||
return
|
||||
|
||||
if(drip.vars.Find(slot))
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
to_chat(usr, "<span class='danger'>Unable to connect to database, changes are temporary only.</span>", confidential = TRUE)
|
||||
use_db = FALSE
|
||||
else
|
||||
use_db = alert("Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", "Permanent", "Temporary", "Cancel")
|
||||
use_db = tgui_alert(usr,"Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", list("Permanent", "Temporary", "Cancel"))
|
||||
if(use_db == "Cancel")
|
||||
return
|
||||
if(use_db == "Permanent")
|
||||
@@ -249,7 +249,7 @@
|
||||
qdel(query_add_admin_log)
|
||||
|
||||
/datum/admins/proc/remove_admin(admin_ckey, admin_key, use_db, datum/admins/D)
|
||||
if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it")
|
||||
if(tgui_alert(usr,"Are you sure you want to remove [admin_ckey]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
|
||||
GLOB.admin_datums -= admin_ckey
|
||||
GLOB.deadmins -= admin_ckey
|
||||
if(D)
|
||||
@@ -494,7 +494,7 @@
|
||||
to_chat(usr, "<span class='danger'>Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.</span>", confidential = TRUE)
|
||||
return
|
||||
qdel(query_admins_with_rank)
|
||||
if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it")
|
||||
if(tgui_alert(usr,"Are you sure you want to remove [admin_rank]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
|
||||
var/m1 = "[key_name_admin(usr)] removed rank [admin_rank] permanently"
|
||||
var/m2 = "[key_name(usr)] removed rank [admin_rank] permanently"
|
||||
var/datum/db_query/query_add_rank = SSdbcore.NewQuery(
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
var/permanent
|
||||
|
||||
/datum/smite/bad_luck/configure(client/user)
|
||||
silent = alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", "Notify", "Silent") == "Silent"
|
||||
permanent = alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", "Permanent", "Temporary") == "Permanent"
|
||||
silent = tgui_alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", list("Notify", "Silent")) == "Silent"
|
||||
permanent = tgui_alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", list("Permanent", "Temporary")) == "Permanent"
|
||||
|
||||
/datum/smite/bad_luck/effect(client/user, mob/living/target)
|
||||
. = ..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/force_looping = FALSE
|
||||
|
||||
/datum/smite/rod/configure(client/user)
|
||||
var/loop_input = alert("Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", "Yes", "No")
|
||||
var/loop_input = tgui_alert(usr,"Would you like this rod to force-loop across space z-levels?", "Loopy McLoopface", list("Yes", "No"))
|
||||
|
||||
force_looping = (loop_input == "Yes")
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!ispath(delivery))
|
||||
delivery = pick_closest_path(attempted_target_path)
|
||||
if(!delivery)
|
||||
alert(user, "ERROR: Incorrect / improper path given.")
|
||||
tgui_alert(user, "ERROR: Incorrect / improper path given.")
|
||||
return FALSE
|
||||
target_path = delivery
|
||||
|
||||
|
||||
@@ -473,11 +473,11 @@
|
||||
player_cid = query_create_ban_get_player.item[3]
|
||||
else
|
||||
if(use_last_connection)
|
||||
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to create a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
|
||||
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to create a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
|
||||
qdel(query_create_ban_get_player)
|
||||
return
|
||||
else
|
||||
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to create a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
|
||||
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to create a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
|
||||
qdel(query_create_ban_get_player)
|
||||
return
|
||||
qdel(query_create_ban_get_player)
|
||||
@@ -733,7 +733,7 @@
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
|
||||
return
|
||||
var/target = ban_target_string(player_key, player_ip, player_cid)
|
||||
if(alert(usr, "Please confirm unban of [target] from [role].", "Unban confirmation", "Yes", "No") == "No")
|
||||
if(tgui_alert(usr, "Please confirm unban of [target] from [role].", "Unban confirmation", list("Yes", "No")) == "No")
|
||||
return
|
||||
var/kn = key_name(usr)
|
||||
var/kna = key_name_admin(usr)
|
||||
@@ -793,11 +793,11 @@
|
||||
player_cid = query_edit_ban_get_player.item[4]
|
||||
else
|
||||
if(use_last_connection)
|
||||
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
|
||||
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to edit a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
|
||||
qdel(query_edit_ban_get_player)
|
||||
return
|
||||
else
|
||||
if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
|
||||
if(tgui_alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to edit a ban for them?", "Unknown key", list("Yes", "No", "Cancel")) != "Yes")
|
||||
qdel(query_edit_ban_get_player)
|
||||
return
|
||||
qdel(query_edit_ban_get_player)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
qdel(query_find_ckey)
|
||||
return
|
||||
if(!query_find_ckey.NextRow())
|
||||
if(alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes")
|
||||
if(tgui_alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes")
|
||||
qdel(query_find_ckey)
|
||||
return
|
||||
qdel(query_find_ckey)
|
||||
@@ -45,7 +45,7 @@
|
||||
if (ssqlname)
|
||||
server = ssqlname
|
||||
if(isnull(secret))
|
||||
switch(alert("Hide note from being viewed by players?", "Secret note?","Yes","No","Cancel"))
|
||||
switch(tgui_alert(usr,"Hide note from being viewed by players?", "Secret note?",list("Yes","No","Cancel")))
|
||||
if("Yes")
|
||||
secret = 1
|
||||
if("No")
|
||||
@@ -53,7 +53,7 @@
|
||||
else
|
||||
return
|
||||
if(isnull(expiry))
|
||||
if(alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", "Yes", "No", "Cancel") == "Yes")
|
||||
if(tgui_alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", list("Yes", "No", "Cancel")) == "Yes")
|
||||
var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime()) as null|text
|
||||
if(!expire_time)
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if (!ban)
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>", confidential = TRUE)
|
||||
return
|
||||
if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to remove the sticky ban on [ckey]?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
if (!get_stickyban_from_ckey(ckey))
|
||||
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>", confidential = TRUE)
|
||||
@@ -98,7 +98,7 @@
|
||||
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
|
||||
//we have to do this again incase something changes
|
||||
@@ -180,7 +180,7 @@
|
||||
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (alert("Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
|
||||
//we have to do this again incase something changes
|
||||
@@ -230,7 +230,7 @@
|
||||
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not exempt from [ckey]'s sticky ban!</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (alert("Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
|
||||
//we have to do this again incase something changes
|
||||
@@ -272,7 +272,7 @@
|
||||
|
||||
var/ckey = data["ckey"]
|
||||
|
||||
if (alert("Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
@@ -298,7 +298,7 @@
|
||||
return
|
||||
var/ckey = data["ckey"]
|
||||
|
||||
if (alert("Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
@@ -323,7 +323,7 @@
|
||||
if (!data["ckey"])
|
||||
return
|
||||
var/ckey = data["ckey"]
|
||||
if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure","Yes","No") == "No")
|
||||
if (tgui_alert(usr,"Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure",list("Yes","No")) == "No")
|
||||
return
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/admins/proc/check_teams()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(usr, "teams", "Team Listing", 500, 500)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var/datum/round_event/event = E.runEvent()
|
||||
if(event.announceWhen>0)
|
||||
event.processing = FALSE
|
||||
var/prompt = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel")
|
||||
var/prompt = tgui_alert(usr, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel"))
|
||||
switch(prompt)
|
||||
if("Yes")
|
||||
event.announceChance = 100
|
||||
@@ -225,7 +225,7 @@
|
||||
if(isnull(SSticker.admin_delay_notice))
|
||||
return
|
||||
else
|
||||
if(alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Really cancel current round end delay? The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Undelay round end", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
SSticker.admin_delay_notice = null
|
||||
SSticker.delay_end = !SSticker.delay_end
|
||||
@@ -241,8 +241,8 @@
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
|
||||
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if(tgui_alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
|
||||
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
|
||||
return
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
var/delmob = TRUE
|
||||
if(!isobserver(M))
|
||||
switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
|
||||
switch(tgui_alert(usr,"Delete old mob?","Message",list("Yes","No","Cancel")))
|
||||
if("Cancel")
|
||||
return
|
||||
if("No")
|
||||
@@ -337,7 +337,7 @@
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
to_chat(usr, "<span class='danger'>Error: They have more rights than you do.</span>", confidential = TRUE)
|
||||
return
|
||||
if(alert(usr, "Kick [key_name(M)]?", "Confirm", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Kick [key_name(M)]?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='danger'>Error: [M] no longer exists!</span>", confidential = TRUE)
|
||||
@@ -391,7 +391,7 @@
|
||||
else if(href_list["deletemessage"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/safety = alert("Delete message/note?",,"Yes","No");
|
||||
var/safety = tgui_alert(usr,"Delete message/note?",,list("Yes","No"));
|
||||
if (safety == "Yes")
|
||||
var/message_id = href_list["deletemessage"]
|
||||
delete_message(message_id)
|
||||
@@ -399,7 +399,7 @@
|
||||
else if(href_list["deletemessageempty"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/safety = alert("Delete message/note?",,"Yes","No");
|
||||
var/safety = tgui_alert(usr,"Delete message/note?",,list("Yes","No"));
|
||||
if (safety == "Yes")
|
||||
var/message_id = href_list["deletemessageempty"]
|
||||
delete_message(message_id, browse = TRUE)
|
||||
@@ -514,9 +514,9 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(SSticker?.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
return tgui_alert(usr, "The game has already started.")
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode.", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode.")
|
||||
var/roundstart_rules = list()
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
|
||||
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
|
||||
@@ -550,9 +550,9 @@
|
||||
return
|
||||
|
||||
if(SSticker?.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
return tgui_alert(usr, "The game has already started.")
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode!")
|
||||
|
||||
dynamic_mode_options(usr)
|
||||
else if(href_list["f_dynamic_force_extended"])
|
||||
@@ -560,7 +560,7 @@
|
||||
return
|
||||
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode!")
|
||||
|
||||
GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
|
||||
log_admin("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].")
|
||||
@@ -572,7 +572,7 @@
|
||||
return
|
||||
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode!")
|
||||
|
||||
GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
|
||||
log_admin("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].")
|
||||
@@ -583,7 +583,7 @@
|
||||
return
|
||||
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode!")
|
||||
|
||||
GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
|
||||
log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
|
||||
@@ -595,14 +595,14 @@
|
||||
return
|
||||
|
||||
if(SSticker?.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
return tgui_alert(usr, "The game has already started.")
|
||||
|
||||
if(!SSticker.is_mode("dynamic"))
|
||||
return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
|
||||
return tgui_alert(usr, "The game mode has to be dynamic mode!")
|
||||
|
||||
var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num
|
||||
if (new_value > 100)
|
||||
return alert(usr, "The value must be be under 100.", null, null, null, null)
|
||||
return tgui_alert(usr, "The value must be be under 100.")
|
||||
GLOB.dynamic_forced_threat_level = new_value
|
||||
|
||||
log_admin("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
|
||||
@@ -677,7 +677,7 @@
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Send [key_name(M)] to Prison?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
M.forceMove(pick(GLOB.prisonwarp))
|
||||
@@ -700,7 +700,7 @@
|
||||
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Send [key_name(M)] back to Lobby?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
||||
@@ -714,7 +714,7 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["tdome1"])
|
||||
@@ -740,7 +740,7 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["tdome2"])
|
||||
@@ -766,7 +766,7 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["tdomeadmin"])
|
||||
@@ -789,7 +789,7 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["tdomeobserve"])
|
||||
@@ -838,7 +838,7 @@
|
||||
return
|
||||
|
||||
var/move = TRUE
|
||||
switch(alert(usr,"Move new AI to AI spawn location?","Move AI?", "Yes", "No","Cancel"))
|
||||
switch(tgui_alert(usr,"Move new AI to AI spawn location?","Move AI?", list("Yes", "No","Cancel")))
|
||||
if("Cancel")
|
||||
return
|
||||
if("No")
|
||||
@@ -1174,7 +1174,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
var/mob/M = locate(href_list["getmob"])
|
||||
usr.client.Getmob(M)
|
||||
@@ -1235,7 +1235,7 @@
|
||||
return
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["traitor"])
|
||||
@@ -1254,7 +1254,7 @@
|
||||
return
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
|
||||
var/target = locate(href_list["skill"])
|
||||
@@ -1336,10 +1336,10 @@
|
||||
paths += path
|
||||
|
||||
if(!paths)
|
||||
alert("The path list you sent is empty.")
|
||||
tgui_alert(usr,"The path list you sent is empty.")
|
||||
return
|
||||
if(length(paths) > 5)
|
||||
alert("Select fewer object types, (max 5).")
|
||||
tgui_alert(usr,"Select fewer object types, (max 5).")
|
||||
return
|
||||
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
@@ -1467,7 +1467,7 @@
|
||||
if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check )
|
||||
src.admincaster_screen=7
|
||||
else
|
||||
var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
|
||||
var/choice = tgui_alert(usr,"Please confirm Feed channel creation.","Network Channel Handler",list("Confirm","Cancel"))
|
||||
if(choice=="Confirm")
|
||||
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
|
||||
SSblackbox.record_feedback("tally", "newscaster_channels", 1, src.admincaster_feed_channel.channel_name)
|
||||
@@ -1562,7 +1562,7 @@
|
||||
if(src.admincaster_wanted_message.criminal == "" || src.admincaster_wanted_message.body == "")
|
||||
src.admincaster_screen = 16
|
||||
else
|
||||
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
|
||||
var/choice = tgui_alert(usr,"Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel"))
|
||||
if(choice=="Confirm")
|
||||
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
|
||||
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
|
||||
@@ -1576,7 +1576,7 @@
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
|
||||
var/choice = tgui_alert(usr,"Please confirm Wanted Issue removal.","Network Security Handler",list("Confirm","Cancel"))
|
||||
if(choice=="Confirm")
|
||||
GLOB.news_network.deleteWanted()
|
||||
src.admincaster_screen=17
|
||||
@@ -1690,7 +1690,7 @@
|
||||
return
|
||||
if(SSticker.IsRoundInProgress())
|
||||
var/afkonly = text2num(href_list["afkonly"])
|
||||
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
|
||||
if(tgui_alert(usr,"Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message",list("Yes","Cancel")) != "Yes")
|
||||
to_chat(usr, "Kick clients from lobby aborted", confidential = TRUE)
|
||||
return
|
||||
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].</span>", afkonly)
|
||||
@@ -1716,7 +1716,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/list/type_choices = typesof(/datum/station_goal)
|
||||
var/picked = input("Choose goal type") in type_choices|null
|
||||
var/picked = tgui_input_list(usr, "Choose goal type",, type_choices)
|
||||
if(!picked)
|
||||
return
|
||||
var/datum/station_goal/G = new picked()
|
||||
@@ -1841,7 +1841,7 @@
|
||||
var/answer = href_list["slowquery"]
|
||||
if(answer == "yes")
|
||||
log_query_debug("[usr.key] | Reported a server hang")
|
||||
if(alert(usr, "Had you just press any admin buttons?", "Query server hang report", "Yes", "No") == "Yes")
|
||||
if(tgui_alert(usr, "Had you just press any admin buttons?", "Query server hang report", list("Yes", "No")) == "Yes")
|
||||
var/response = input(usr,"What were you just doing?","Query server hang report") as null|text
|
||||
if(response)
|
||||
log_query_debug("[usr.key] | [response]")
|
||||
@@ -1856,7 +1856,7 @@
|
||||
else if(href_list["rebootworld"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to reboot the server?", "Confirm Reboot", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr,"Are you sure you want to reboot the server?", "Confirm Reboot", list("Yes", "No"))
|
||||
if(confirm == "No")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
set name = "Setup Anonymous Names"
|
||||
|
||||
if(SSticker.anonymousnames)
|
||||
var/response = alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", "Disable Anon Names", "Keep it Enabled")
|
||||
var/response = tgui_alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", list("Disable Anon Names", "Keep it Enabled"))
|
||||
if(response != "Disable Anon Names")
|
||||
return
|
||||
QDEL_NULL(SSticker.anonymousnames)
|
||||
@@ -38,7 +38,7 @@
|
||||
result = input_list[result]
|
||||
var/alert_players = "No"
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME) //before anonnames is done, for asking a sleep
|
||||
alert_players = alert(usr, "Alert crew? These are IC Themed FROM centcom.", "2016 admins didn't miss roundstart", "Yes", "No")
|
||||
alert_players = tgui_alert(usr, "Alert crew? These are IC Themed FROM centcom.", "2016 admins didn't miss roundstart", list("Yes", "No"))
|
||||
SSticker.anonymousnames = new result()
|
||||
if(alert_players == "Yes")
|
||||
priority_announce(SSticker.anonymousnames.announcement_alert, "Identity Loss", SSstation.announcer.get_rand_alert_sound())
|
||||
|
||||
@@ -42,7 +42,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Make Robot"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has robotized [M.key].")
|
||||
@@ -50,21 +50,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
INVOKE_ASYNC(H, /mob/living/carbon/human.proc/Robotize)
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
|
||||
set category = "Admin.Fun"
|
||||
set name = "Make Blob"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has blobized [M.key].")
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.become_overmind()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
|
||||
|
||||
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
|
||||
@@ -72,15 +72,15 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
alert("That mob doesn't seem to exist, close the panel and try again.")
|
||||
tgui_alert(usr,"That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(isnewplayer(M))
|
||||
alert("The mob must not be a new_player.")
|
||||
tgui_alert(usr,"The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] has animalized [M.key].")
|
||||
@@ -96,11 +96,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in sortNames(available)
|
||||
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sortNames(available))
|
||||
if(!choice)
|
||||
return
|
||||
if(!isobserver(choice))
|
||||
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
var/obj/item/paicard/card = new(T)
|
||||
@@ -125,7 +125,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Make Alien"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
|
||||
@@ -133,14 +133,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien.</span>")
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
|
||||
set category = "Admin.Fun"
|
||||
set name = "Make slime"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
|
||||
@@ -148,7 +148,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime.</span>")
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
@@ -189,7 +189,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Grant Full Access"
|
||||
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("Wait until the game starts")
|
||||
tgui_alert(usr,"Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -223,7 +223,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
H.equip_to_slot(id,ITEM_SLOT_ID)
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //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("<span class='adminnotice'>[key_name_admin(usr)] has granted [M.key] full access.</span>")
|
||||
@@ -234,7 +234,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set desc = "Direct intervention"
|
||||
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(!M || QDELETED(M))
|
||||
to_chat(usr, "<span class='warning'>The target mob no longer exists.</span>")
|
||||
@@ -257,12 +257,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!M)
|
||||
return
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
|
||||
var/mob/oldmob = newkey.mob
|
||||
var/delmob = FALSE
|
||||
if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
|
||||
if((isobserver(oldmob) || tgui_alert(usr,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
|
||||
delmob = TRUE
|
||||
if(!M || QDELETED(M))
|
||||
to_chat(usr, "<span class='warning'>The target mob no longer exists, aborting.</span>")
|
||||
@@ -552,7 +552,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Debug Mob Lists"
|
||||
set desc = "For when you just gotta know"
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
|
||||
switch(tgui_input_list(usr, "Which list?",, list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(GLOB.player_list,","), confidential = TRUE)
|
||||
if("Admins")
|
||||
@@ -684,7 +684,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return
|
||||
var/datum/map_template/ruin/template = data[1]
|
||||
if (exists[template])
|
||||
var/response = alert("There is already a [template] in existence.", "Spawn Ruin", "Jump", "Place Another", "Cancel")
|
||||
var/response = tgui_alert(usr,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
|
||||
if (response == "Jump")
|
||||
usr.forceMove(get_turf(exists[template]))
|
||||
return
|
||||
@@ -708,7 +708,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set desc = "Deallocates all reserved space, restoring it to round start conditions."
|
||||
if(!holder)
|
||||
return
|
||||
var/answer = alert("WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", "YES", "NO")
|
||||
var/answer = tgui_alert(usr,"WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO"))
|
||||
if(answer != "YES")
|
||||
return
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] cleared dynamic transit space.</span>")
|
||||
@@ -797,7 +797,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set desc = "Force config reload to world default"
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
if(alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", "No", "Yes") == "Yes")
|
||||
if(tgui_alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", list("No", "Yes")) == "Yes")
|
||||
config.admin_reload()
|
||||
|
||||
/// A debug verb to check the sources of currently running timers
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Are you sure you want to reload all admins?", "Confirm", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
|
||||
if(confirm !="Yes")
|
||||
return
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
set name = "Toggle CDN"
|
||||
set category = "Server"
|
||||
var/static/admin_disabled_cdn_transport = null
|
||||
if (alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes")
|
||||
if (tgui_alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
var/current_transport = CONFIG_GET(string/asset_transport)
|
||||
if (!current_transport || current_transport == "simple")
|
||||
@@ -96,7 +96,7 @@
|
||||
log_admin("[key_name(usr)] re-enabled the CDN asset transport")
|
||||
else
|
||||
to_chat(usr, "<span class='adminnotice'>The CDN is not enabled!</span>")
|
||||
if (alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", "Try disabling filename mutations", "Nevermind") == "Try disabling filename mutations")
|
||||
if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
|
||||
SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames
|
||||
message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
|
||||
log_admin("[key_name(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>", confidential = TRUE)
|
||||
return
|
||||
if(new_fps > cfg_fps * 1.5)
|
||||
if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
|
||||
if(tgui_alert(usr, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
|
||||
return
|
||||
|
||||
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
switch(alert("View (in game), Open (in your system's text editor), or Download?", path, "View", "Open", "Download"))
|
||||
switch(tgui_alert(usr,"View (in game), Open (in your system's text editor), or Download?", path, list("View", "Open", "Download")))
|
||||
if ("View")
|
||||
src << browse("<pre style='word-wrap: break-word;'>[html_encode(file2text(file(path)))]</pre>", list2params(list("window" = "viewfile.[path]")))
|
||||
if ("Open")
|
||||
|
||||
@@ -72,7 +72,7 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
|
||||
*/
|
||||
/client/proc/only_one(was_delayed = FALSE)
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
|
||||
if(was_delayed) //sends more accurate logs
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
var/list/preview = list()
|
||||
var/center
|
||||
var/centeralert = alert(src,"Center Template.","Template Centering","Yes","No")
|
||||
var/centeralert = tgui_alert(usr,"Center Template.","Template Centering",list("Yes","No"))
|
||||
switch(centeralert)
|
||||
if("Yes")
|
||||
center = TRUE
|
||||
@@ -28,7 +28,7 @@
|
||||
item.plane = ABOVE_LIGHTING_PLANE
|
||||
preview += item
|
||||
images += preview
|
||||
if(alert(src,"Confirm location.","Template Confirm","Yes","No") == "Yes")
|
||||
if(tgui_alert(usr,"Confirm location.","Template Confirm",list("Yes","No")) == "Yes")
|
||||
if(template.load(T, centered = center))
|
||||
var/affected = template.get_affected_turfs(T, centered = center)
|
||||
for(var/AT in affected)
|
||||
@@ -53,7 +53,7 @@
|
||||
to_chat(src, "<span class='warning'>Filename must end in '.dmm': [map]</span>", confidential = TRUE)
|
||||
return
|
||||
var/datum/map_template/M
|
||||
switch(alert(src, "What kind of map is this?", "Map type", "Normal", "Shuttle", "Cancel"))
|
||||
switch(tgui_alert(usr, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
|
||||
if("Normal")
|
||||
M = new /datum/map_template(map, "[map]", TRUE)
|
||||
if("Shuttle")
|
||||
@@ -71,11 +71,11 @@
|
||||
report_link = " - <a href='?src=[REF(report)];[HrefToken(TRUE)];show=1'>validation report</a>"
|
||||
to_chat(src, "<span class='warning'>Map template '[map]' <a href='?src=[REF(report)];[HrefToken()];show=1'>failed validation</a>.</span>", confidential = TRUE)
|
||||
if(report.loadable)
|
||||
var/response = alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", "Cancel", "Upload Anyways")
|
||||
var/response = tgui_alert(usr, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
|
||||
if(response != "Upload Anyways")
|
||||
return
|
||||
else
|
||||
alert(src, "The map failed validation and cannot be loaded.", "Map Errors", "Oh Darn")
|
||||
tgui_alert(usr, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn"))
|
||||
return
|
||||
|
||||
SSmapping.map_templates[M.name] = M
|
||||
|
||||
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
|
||||
set name = "Camera Report"
|
||||
|
||||
if(!Master)
|
||||
alert(usr,"Master_controller not found.","Sec Camera Report")
|
||||
tgui_alert(usr,"Master_controller not found.","Sec Camera Report")
|
||||
return FALSE
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/client/proc/forcerandomrotate()
|
||||
set category = "Server"
|
||||
set name = "Trigger Random Map Rotation"
|
||||
var/rotate = alert("Force a random map rotation to trigger?", "Rotate map?", "Yes", "Cancel")
|
||||
var/rotate = tgui_alert(usr,"Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
|
||||
if (rotate != "Yes")
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
|
||||
@@ -32,7 +32,7 @@
|
||||
mapname += "\]"
|
||||
|
||||
maprotatechoices[mapname] = VM
|
||||
var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in sortList(maprotatechoices)|"Custom"
|
||||
var/chosenmap = tgui_input_list(usr, "Choose a map to change to", "Change Map", sortList(maprotatechoices)|"Custom")
|
||||
if (!chosenmap)
|
||||
return
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
qdel(M)
|
||||
|
||||
var/shuttles = alert("Do you want to modify the shuttles?", "Map Shuttles", "Yes", "No")
|
||||
var/shuttles = tgui_alert(usr,"Do you want to modify the shuttles?", "Map Shuttles", list("Yes", "No"))
|
||||
if(shuttles == "Yes")
|
||||
for(var/s in VM.shuttles)
|
||||
var/shuttle = input(s, "Map Shuttles") as null|text
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
CONFIG_SET(number/panic_bunker_living, time_rec)
|
||||
CONFIG_SET(string/panic_bunker_message, message)
|
||||
|
||||
var/interview_sys = alert(src, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", "Enable", "Disable")
|
||||
var/interview_sys = tgui_alert(usr, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", list("Enable", "Disable"))
|
||||
interview = interview_sys == "Enable"
|
||||
CONFIG_SET(flag/panic_bunker_interview, interview)
|
||||
CONFIG_SET(flag/panic_bunker, new_pb)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
admin_sound.status = SOUND_STREAM
|
||||
admin_sound.volume = vol
|
||||
|
||||
var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel")
|
||||
var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
|
||||
switch(res)
|
||||
if("Yes")
|
||||
to_chat(world, "<span class='boldannounce'>An admin played: [S]</span>", confidential = TRUE)
|
||||
@@ -113,7 +113,7 @@
|
||||
music_extra_data["link"] = data["webpage_url"]
|
||||
music_extra_data["title"] = data["title"]
|
||||
|
||||
var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
|
||||
var/res = tgui_alert(usr, "Show the title of and link to this song to the players?\n[title]",, list("No", "Yes", "Cancel"))
|
||||
switch(res)
|
||||
if("Yes")
|
||||
to_chat(world, "<span class='boldannounce'>An admin played: [webpage_url]</span>", confidential = TRUE)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Make [M] drop everything?", "Message", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -358,7 +358,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||
//Check if they were an alien
|
||||
if(G_found.mind.assigned_role == ROLE_ALIEN)
|
||||
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||
if(tgui_alert(usr,"This character appears to have been an alien. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
|
||||
var/turf/T
|
||||
if(GLOB.xeno_spawn.len)
|
||||
T = pick(GLOB.xeno_spawn)
|
||||
@@ -393,7 +393,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
//check if they were a monkey
|
||||
else if(findtext(G_found.real_name,"monkey"))
|
||||
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||
if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
|
||||
var/mob/living/carbon/human/species/monkey/new_monkey = new
|
||||
SSjob.SendToLateJoin(new_monkey)
|
||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
@@ -487,10 +487,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!issilicon(new_character))//If they are not a cyborg/AI.
|
||||
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
|
||||
//Power to the user!
|
||||
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
|
||||
if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes")
|
||||
GLOB.data_core.manifest_inject(new_character)
|
||||
|
||||
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
||||
if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
|
||||
AnnounceArrival(new_character, new_character.mind.assigned_role)
|
||||
|
||||
var/msg = "<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>"
|
||||
@@ -516,7 +516,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]")
|
||||
|
||||
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
|
||||
var/show_log = tgui_alert(usr, "Show ion message?", "Message", list("Yes", "No"))
|
||||
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
|
||||
|
||||
var/datum/round_event/ion_storm/add_law_only/ion = new()
|
||||
@@ -535,7 +535,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!mob)
|
||||
return
|
||||
if(!istype(M))
|
||||
alert("Cannot revive a ghost")
|
||||
tgui_alert(usr,"Cannot revive a ghost")
|
||||
return
|
||||
M.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
|
||||
@@ -588,7 +588,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
||||
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
||||
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
||||
if (tgui_alert(usr, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
|
||||
return
|
||||
|
||||
explosion(O, devastation, heavy, light, flames, flash)
|
||||
@@ -631,7 +631,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
|
||||
var/confirm = tgui_alert(usr, "Drop a brain?", "Confirm", list("Yes", "No","Cancel"))
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
//Due to the delay here its easy for something to have happened to the mob
|
||||
@@ -658,7 +658,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Gibself"
|
||||
set category = "Admin.Fun"
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
|
||||
if(confirm == "Yes")
|
||||
log_admin("[key_name(usr)] used gibself.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
|
||||
@@ -702,7 +702,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "Yes (No Recall)", "No")
|
||||
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "Yes (No Recall)", "No"))
|
||||
switch(confirm)
|
||||
if(null, "No")
|
||||
return
|
||||
@@ -721,7 +721,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Cancel Shuttle"
|
||||
if(!check_rights(0))
|
||||
return
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
if(SSshuttle.adminEmergencyNoRecall)
|
||||
@@ -748,7 +748,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "<span class='warning'>Error, shuttle is already disabled.</span>")
|
||||
return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] disabled the shuttle.</span>")
|
||||
@@ -771,7 +771,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "<span class='warning'>Error, shuttle not disabled.</span>")
|
||||
return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
||||
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] enabled the emergency shuttle.</span>")
|
||||
@@ -803,7 +803,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(usr, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
|
||||
if(notifyplayers == "Cancel")
|
||||
return
|
||||
|
||||
@@ -936,7 +936,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -955,7 +955,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -974,7 +974,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
|
||||
var/confirm = tgui_alert(usr, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
if (SSdbcore.IsConnected())
|
||||
if (!check_rights(R_DEBUG,0))
|
||||
alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
|
||||
tgui_alert(usr,"The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
|
||||
return
|
||||
|
||||
var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
|
||||
var/reconnect = tgui_alert(usr,"The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel"))
|
||||
if (reconnect != "Force Reconnect")
|
||||
return
|
||||
|
||||
|
||||
@@ -94,7 +94,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 = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
|
||||
var/choice = tgui_alert(usr, "Are you sure you want to cure all disease?",, list("Yes", "Cancel"))
|
||||
if(choice == "Yes")
|
||||
message_admins("[key_name_admin(holder)] has cured all diseases.")
|
||||
for(var/thing in SSdisease.active_diseases)
|
||||
@@ -120,11 +120,11 @@
|
||||
holder.holder.output_ai_laws()//huh, inconvenient var naming, huh?
|
||||
if("showgm")
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
else if (SSticker.mode)
|
||||
alert("The game mode is [SSticker.mode.name]")
|
||||
tgui_alert(usr,"The game mode is [SSticker.mode.name]")
|
||||
else
|
||||
alert("For some reason there's a SSticker, but not a game mode")
|
||||
tgui_alert(usr,"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>"
|
||||
@@ -153,7 +153,7 @@
|
||||
if("ctfbutton")
|
||||
toggle_id_ctf(holder, "centcom")
|
||||
if("tdomereset")
|
||||
var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
|
||||
var/delete_mobs = tgui_alert(usr,"Clear all mobs?","Confirm",list("Yes","No","Cancel"))
|
||||
if(delete_mobs == "Cancel")
|
||||
return
|
||||
|
||||
@@ -185,7 +185,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 = 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")
|
||||
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"))
|
||||
switch(val)
|
||||
if("Automatic")
|
||||
if(CONFIG_GET(flag/enable_night_shifts))
|
||||
@@ -224,7 +224,7 @@
|
||||
if(!is_funmin)
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak"))
|
||||
switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
|
||||
switch(tgui_alert(usr,"Do you want this to be a random disease or do you have something in mind?",,list("Make Your Own","Random","Choose")))
|
||||
if("Make Your Own")
|
||||
AdminCreateVirus(holder)
|
||||
if("Random")
|
||||
@@ -282,7 +282,7 @@
|
||||
if("onlyone")
|
||||
if(!is_funmin)
|
||||
return
|
||||
var/response = alert("Delay by 40 seconds?", "There can, in fact, only be one", "Instant!", "40 seconds (crush the hope of a normal shift)")
|
||||
var/response = tgui_alert(usr,"Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)"))
|
||||
if(response == "Instant!")
|
||||
holder.only_one()
|
||||
else
|
||||
@@ -293,7 +293,7 @@
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns"))
|
||||
var/survivor_probability = 0
|
||||
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
|
||||
switch(tgui_alert(usr,"Do you want this to create survivors antagonists?",,list("No Antags","Some Antags","All Antags!")))
|
||||
if("Some Antags")
|
||||
survivor_probability = 25
|
||||
if("All Antags!")
|
||||
@@ -305,7 +305,7 @@
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic"))
|
||||
var/survivor_probability = 0
|
||||
switch(alert("Do you want this to create magician antagonists?",,"No Antags","Some Antags","All Antags!"))
|
||||
switch(tgui_alert(usr,"Do you want this to create magician antagonists?",,list("No Antags","Some Antags","All Antags!")))
|
||||
if("Some Antags")
|
||||
survivor_probability = 25
|
||||
if("All Antags!")
|
||||
@@ -316,12 +316,12 @@
|
||||
if(!is_funmin)
|
||||
return
|
||||
if(!SSevents.wizardmode)
|
||||
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
|
||||
if(tgui_alert(usr,"Do you want to toggle summon events on?",,list("Yes","No")) == "Yes")
|
||||
summonevents()
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate"))
|
||||
|
||||
else
|
||||
switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
|
||||
switch(tgui_alert(usr,"What would you like to do?",,list("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"))
|
||||
@@ -457,7 +457,7 @@
|
||||
if(!is_funmin)
|
||||
return
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
tgui_alert(usr,"The game hasn't started yet!")
|
||||
return
|
||||
var/objective = stripped_input(holder, "Enter an objective")
|
||||
if(!objective)
|
||||
@@ -492,11 +492,11 @@
|
||||
if("anime")
|
||||
if(!is_funmin)
|
||||
return
|
||||
var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel")
|
||||
var/animetype = tgui_alert(usr,"Would you like to have the clothes be changed?",,list("Yes","No","Cancel"))
|
||||
|
||||
var/droptype
|
||||
if(animetype =="Yes")
|
||||
droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel")
|
||||
droptype = tgui_alert(usr,"Make the uniforms Nodrop?",,list("Yes","No","Cancel"))
|
||||
|
||||
if(animetype == "Cancel" || droptype == "Cancel")
|
||||
return
|
||||
@@ -586,7 +586,7 @@
|
||||
if(E)
|
||||
E.processing = FALSE
|
||||
if(E.announceWhen>0)
|
||||
switch(alert(holder, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel"))
|
||||
switch(tgui_alert(holder, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel")))
|
||||
if("Yes")
|
||||
E.announceChance = 100
|
||||
if("Cancel")
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
user = CLIENT_FROM_VAR(_user)
|
||||
|
||||
if(!ishuman(target) && !isobserver(target))
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
return
|
||||
target_mob = target
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
/client/proc/admin_apply_outfit(mob/target, dresscode)
|
||||
if(!ishuman(target) && !isobserver(target))
|
||||
alert("Invalid mob")
|
||||
tgui_alert(usr,"Invalid mob")
|
||||
return
|
||||
|
||||
if(!dresscode)
|
||||
@@ -209,7 +209,7 @@
|
||||
else
|
||||
human_target = target
|
||||
if(human_target.l_store || human_target.r_store || human_target.s_store) //saves a lot of time for admins and coders alike
|
||||
if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
|
||||
if(tgui_alert(usr,"Drop Items in Pockets? No will delete them.", "Robust quick dress shop", list("Yes", "No")) == "No")
|
||||
delete_pocket = TRUE
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
setTimer(ignitionTime)
|
||||
|
||||
if("Delete Shuttle")
|
||||
if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
|
||||
if(tgui_alert(user, "Really delete [name || id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
return
|
||||
jumpToNullSpace()
|
||||
|
||||
if("Into The Sunset (delete & greentext 'escape')")
|
||||
if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
|
||||
if(tgui_alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
|
||||
return
|
||||
intoTheSunset()
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return // use the existing verbs for this
|
||||
|
||||
/obj/docking_port/mobile/arrivals/admin_fly_shuttle(mob/user)
|
||||
switch(alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", "Fly", "Retarget", "Cancel"))
|
||||
switch(tgui_alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", list("Fly", "Retarget", "Cancel")))
|
||||
if("Cancel")
|
||||
return
|
||||
if("Fly")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
else
|
||||
jmp_coords = coords = "in nullspace"
|
||||
|
||||
if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if (tgui_alert(usr, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
log_admin("[key_name(usr)] deleted [D] [coords]")
|
||||
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -264,10 +264,10 @@
|
||||
break
|
||||
D = locate(ref)
|
||||
if(!D)
|
||||
alert("Invalid ref!")
|
||||
tgui_alert(usr,"Invalid ref!")
|
||||
continue
|
||||
if(!D.can_vv_mark())
|
||||
alert("Datum can not be marked!")
|
||||
tgui_alert(usr,"Datum can not be marked!")
|
||||
continue
|
||||
while(!D)
|
||||
.["type"] = D.type
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL items)
|
||||
|
||||
if(tgui_alert(src, "Are you sure you'd like to mass-modify every instance of the [var_name] variable? This can break everything if you do not know what you are doing.", "Slow down, chief!", list("Yes", "No")) != "Yes")
|
||||
if(tgui_alert(usr, "Are you sure you'd like to mass-modify every instance of the [var_name] variable? This can break everything if you do not know what you are doing.", "Slow down, chief!", list("Yes", "No"), 60 SECONDS) != "Yes")
|
||||
return
|
||||
|
||||
if(!check_rights(R_VAREDIT))
|
||||
@@ -52,7 +52,7 @@
|
||||
if(variable in GLOB.VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
var/prompt = tgui_alert(usr, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", list("ABORT ", "Continue", " ABORT"))
|
||||
if (prompt != "Continue")
|
||||
return
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var/pre_processing = new_value
|
||||
var/unique
|
||||
if (varsvars?.len)
|
||||
unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
|
||||
unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same"))
|
||||
if(unique == "Unique")
|
||||
unique = TRUE
|
||||
else
|
||||
@@ -145,7 +145,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
if (VV_NEW_TYPE)
|
||||
var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
|
||||
var/many = tgui_alert(usr, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", list("One", "Many", "Cancel"))
|
||||
if (many == "Cancel")
|
||||
return
|
||||
if (many == "Many")
|
||||
|
||||
@@ -9,7 +9,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
|
||||
/client/proc/vv_parse_text(O, new_var)
|
||||
if(O && findtext(new_var,"\["))
|
||||
var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
|
||||
var/process_vars = tgui_alert(usr,"\[] detected in string, process as variables?","Process Variables?",list("Yes","No"))
|
||||
if(process_vars == "Yes")
|
||||
. = string2listofvars(new_var, O)
|
||||
|
||||
@@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
if (!subtypes || !subtypes.len)
|
||||
return FALSE
|
||||
if (subtypes?.len)
|
||||
switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel"))
|
||||
switch(tgui_alert(usr,"Strict object type detection?", "Type detection", list("Strictly this type","This type and subtypes", "Cancel")))
|
||||
if("Strictly this type")
|
||||
return FALSE
|
||||
if("This type and subtypes")
|
||||
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
|
||||
L += var_value
|
||||
|
||||
switch(alert("Would you like to associate a value with the list entry?",,"Yes","No"))
|
||||
switch(tgui_alert(usr,"Would you like to associate a value with the list entry?",,list("Yes","No")))
|
||||
if("Yes")
|
||||
L[var_value] = mod_list_add_ass(O) //hehe
|
||||
if (O)
|
||||
@@ -116,7 +116,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
return
|
||||
|
||||
if(L.len > 1000)
|
||||
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
|
||||
var/confirm = tgui_alert(usr, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", list("Continue", "Abort"))
|
||||
if(confirm != "Continue")
|
||||
return
|
||||
|
||||
@@ -178,7 +178,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
if (index == null)
|
||||
return
|
||||
var/assoc = 0
|
||||
var/prompt = alert(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel")
|
||||
var/prompt = tgui_alert(usr, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel"))
|
||||
if (prompt == "Cancel")
|
||||
return
|
||||
if (prompt == "Assigned Value")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
SSgarbage.next_fire = world.time + world.tick_lag
|
||||
return
|
||||
|
||||
if(!skip_alert && alert("Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") != "Yes")
|
||||
if(!skip_alert && tgui_alert(usr,"Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", list("Yes", "No")) != "Yes")
|
||||
running_find_references = null
|
||||
return
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// If the new name is something that would be restricted by IC chat filters,
|
||||
// give the admin a warning but allow them to do it anyway if they want.
|
||||
if(CHAT_FILTER_CHECK(new_name) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") == "Cancel")
|
||||
if(CHAT_FILTER_CHECK(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel")
|
||||
return
|
||||
|
||||
if( !new_name || !M )
|
||||
@@ -69,7 +69,7 @@
|
||||
to_chat(usr, "This can only be done to monkeys", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
|
||||
if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
|
||||
return
|
||||
if(!Mo)
|
||||
to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
mod_list(target, null, "list", "contents", target_index, autodetect_class = FALSE)
|
||||
if(href_list[VV_HK_LIST_REMOVE])
|
||||
var/variable = target[target_index]
|
||||
var/prompt = alert("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No")
|
||||
var/prompt = tgui_alert(usr,"Do you want to remove item number [target_index] from list?", "Confirm", list("Yes", "No"))
|
||||
if (prompt != "Yes")
|
||||
return
|
||||
target.Cut(target_index, target_index+1)
|
||||
|
||||
Reference in New Issue
Block a user