mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Convert almost all alert() to tgui_alert()
This commit is contained in:
@@ -665,7 +665,7 @@ var/global/floorIsLava = 0
|
||||
set desc="Restarts the world"
|
||||
if (!usr.client.holder)
|
||||
return
|
||||
var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel")
|
||||
var/confirm = alert(usr, "Restart the game world?", "Restart", "Yes", "Cancel") // Not tgui_alert for safety
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
@@ -1049,7 +1049,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set desc="Reboots the server post haste"
|
||||
set name="Immediate Reboot"
|
||||
if(!usr.client.holder) return
|
||||
if( alert(usr, "Reboot server?","Reboot!","Yes","No") == "No")
|
||||
if(alert(usr, "Reboot server?","Reboot!","Yes","No") == "No") // Not tgui_alert for safety
|
||||
return
|
||||
to_world("<font color='red'><b>Rebooting world!</b></font> <font color='blue'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</font>")
|
||||
log_admin("[key_name(usr)] initiated an immediate reboot.")
|
||||
@@ -1071,9 +1071,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
|
||||
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
|
||||
else
|
||||
alert(usr, "Admin jumping disabled")
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
else
|
||||
alert(usr, "[M.name] is not prisoned.")
|
||||
tgui_alert_async(usr, "[M.name] is not prisoned.")
|
||||
feedback_add_details("admin_verb","UP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
|
||||
@@ -1226,7 +1226,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name = "Show Game Mode"
|
||||
|
||||
if(!ticker || !ticker.mode)
|
||||
alert(usr, "Not before roundstart!", "Alert")
|
||||
tgui_alert_async(usr, "Not before roundstart!", "Alert")
|
||||
return
|
||||
|
||||
var/out = "<font size=3><b>Current mode: [ticker.mode.name] (<a href='?src=\ref[ticker.mode];debug_antag=self'>[ticker.mode.config_tag]</a>)</b></font><br/>"
|
||||
@@ -1438,7 +1438,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
if (tomob.ckey)
|
||||
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 1
|
||||
if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response
|
||||
@@ -1512,7 +1512,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
msg = "has paralyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
else
|
||||
if(alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob","Yes","No") == "Yes")
|
||||
if(tgui_alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob",list("Yes","No")) == "Yes")
|
||||
H.SetParalysis(0)
|
||||
msg = "has unparalyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
@@ -1586,7 +1586,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
var/shouldStamp = 1
|
||||
if(!P.sender) // admin initiated
|
||||
switch(alert(usr, "Would you like the fax stamped?","Stamped?", "Yes", "No"))
|
||||
switch(tgui_alert(usr, "Would you like the fax stamped?","Stamped?", list("Yes", "No")))
|
||||
if("No")
|
||||
shouldStamp = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user