The One Where I Port Modals

This commit is contained in:
Chompstation Bot
2021-06-30 19:29:34 +00:00
parent 2457a62edd
commit b6e1989a01
468 changed files with 10519 additions and 1808 deletions
+4 -4
View File
@@ -52,7 +52,7 @@
qdel(query) //CHOMPEdit TGSQL
if(!validckey)
if(!banned_mob || (banned_mob && !IsGuestKey(banned_mob.key))) //VOREStation Edit Start.
var/confirm = alert(usr, "This ckey hasn't been seen, are you sure?", "Confirm Badmin" , "Yes", "No")
var/confirm = tgui_alert(usr, "This ckey hasn't been seen, are you sure?", "Confirm Badmin", list("Yes", "No"))
if(confirm == "No")
return //VOREStation Edit End
@@ -184,7 +184,7 @@
switch(param)
if("reason")
if(!value)
value = sanitize(input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
value = sanitize(input(usr, "Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
value = sql_sanitize_text(value)
if(!value)
to_chat(usr, "Cancelled")
@@ -196,7 +196,7 @@
qdel(update_query) //CHOMPEdit TGSQL
if("duration")
if(!value)
value = input("Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
value = input(usr, "Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
if(!isnum(value) || !value)
to_chat(usr, "Cancelled")
return
@@ -206,7 +206,7 @@
update_query.Execute()
qdel(update_query) //CHOMPEdit TGSQL
if("unban")
if(alert("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes")
if(tgui_alert(usr, "Unban [pckey]?", "Unban?", list("Yes", "No")) == "Yes")
DB_ban_unban_by_id(banid)
return
to_chat(usr, "<span class='filter_adminlog'>Cancelled</span>")
+1 -1
View File
@@ -70,7 +70,7 @@
src << browse(dat,"window=ToRban_show")
if("remove")
var/savefile/F = new(TORFILE)
var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir
var/choice = tgui_input_list(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban", F.dir)
if(choice)
F.dir.Remove(choice)
to_chat(src, "<span class='filter_adminlog'><b>Address removed</b></span>")
+23 -23
View File
@@ -665,7 +665,7 @@ var/global/floorIsLava = 0
set desc="Restarts the world"
if (!usr.client.holder)
return
var/confirm = alert("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")
@@ -688,7 +688,7 @@ var/global/floorIsLava = 0
set desc="Announce your desires to the world"
if(!check_rights(0)) return
var/message = input("Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
var/message = input(usr, "Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
if(message)
if(!check_rights(R_SERVER,0))
message = sanitize(message, 500, extra = 0)
@@ -706,14 +706,14 @@ var/datum/announcement/minor/admin_min_announcer = new
set desc = "Send an intercom message, like an arrivals announcement."
if(!check_rights(0)) return
var/channel = input("Channel for message:","Channel", null) as null|anything in radiochannels
var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(channel) //They picked a channel
var/sender = input("Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
var/sender = input(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
if(sender) //They put a sender
sender = sanitize(sender, 75, extra = 0)
var/message = input("Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
var/message = input(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
if(message) //They put a message
message = sanitize(message, 500, extra = 0)
@@ -729,7 +729,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set waitfor = FALSE //Why bother? We have some sleeps. You can leave tho!
if(!check_rights(0)) return
var/channel = input("Channel for message:","Channel", null) as null|anything in radiochannels
var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(!channel) //They picked a channel
return
@@ -1012,7 +1012,7 @@ var/datum/announcement/minor/admin_min_announcer = new
SSticker.delay_end = !SSticker.delay_end
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("<font color='blue'>[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].</font>", 1)
return //alert("Round end delayed", null, null, null, null, null)
return
round_progressing = !round_progressing
if (!round_progressing)
to_world("<b>The game start has been delayed.</b>")
@@ -1051,7 +1051,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("Reboot server?",,"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.")
@@ -1073,9 +1073,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("Admin jumping disabled")
tgui_alert_async(usr, "Admin jumping disabled")
else
alert("[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
@@ -1114,7 +1114,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!seedtype || !SSplants.seeds[seedtype])
return
var/amount = input("Amount of fruit to spawn", "Fruit Amount", 1) as null|num
var/amount = input(usr, "Amount of fruit to spawn", "Fruit Amount", 1) as null|num
if(!isnull(amount))
var/datum/seed/S = SSplants.seeds[seedtype]
S.harvest(usr,0,0,amount)
@@ -1127,12 +1127,12 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_SPAWN)) return
var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", custom_items)
if(!owner|| !custom_items[owner])
return
var/list/possible_items = custom_items[owner]
var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items)
if(!item_to_spawn)
return
@@ -1193,7 +1193,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(matches.len==1)
chosen = matches[1]
else
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
chosen = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
if(!chosen)
return
@@ -1228,7 +1228,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set name = "Show Game Mode"
if(!ticker || !ticker.mode)
alert("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/>"
@@ -1353,7 +1353,7 @@ var/datum/announcement/minor/admin_min_announcer = new
to_chat(usr, "Error: you are not an admin!")
return
var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Select mob.", human_mob_list)
if(!M) return
show_skill_window(usr, M)
@@ -1440,7 +1440,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
@@ -1474,7 +1474,7 @@ var/datum/announcement/minor/admin_min_announcer = new
to_chat(usr, "Mode has not started.")
return
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", all_antag_types)
if(!antag_type || !all_antag_types[antag_type])
to_chat(usr, "Aborting.")
return
@@ -1514,7 +1514,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?",,"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)
@@ -1527,7 +1527,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
crystals = input("Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
crystals = input(usr, "Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
if (!isnull(crystals))
H.mind.tcrystals = crystals
var/msg = "[key_name(usr)] has modified [H.ckey]'s telecrystals to [crystals]."
@@ -1543,7 +1543,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
crystals = input("Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
crystals = input(usr, "Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
if (!isnull(crystals))
H.mind.tcrystals += crystals
var/msg = "[key_name(usr)] has added [crystals] to [H.ckey]'s telecrystals."
@@ -1556,7 +1556,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Special Verbs"
set name = "Send Fax"
set desc = "Sends a fax to this machine"
var/department = input("Choose a fax", "Fax") as null|anything in alldepartments
var/department = tgui_input_list(usr, "Choose a fax", "Fax", alldepartments)
for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes)
if(sendto.department == department)
@@ -1588,7 +1588,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/shouldStamp = 1
if(!P.sender) // admin initiated
switch(alert("Would you like the fax stamped?",, "Yes", "No"))
switch(tgui_alert(usr, "Would you like the fax stamped?","Stamped?", list("Yes", "No")))
if("No")
shouldStamp = 0
+1 -1
View File
@@ -47,7 +47,7 @@
if(F)
var/ckey
if(check_rights(R_SERVER,0)) //high ranking admins can delete other admin's memos
ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir
ckey = tgui_input_list(src,"Whose memo shall we remove?","Remove Memo", F.dir)
else
ckey = src.ckey
if(ckey)
+1 -1
View File
@@ -59,7 +59,7 @@ var/datum/admin_secrets/admin_secrets = new()
/datum/admin_secret_item/proc/can_execute(var/mob/user)
if(can_view(user))
if(!warn_before_use || alert("Execute the command '[name]'?", name, "No","Yes") == "Yes")
if(!warn_before_use || tgui_alert(usr, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes")
return 1
return 0
+23 -21
View File
@@ -141,7 +141,7 @@
set category = "Fun"
set name = "OOC Text Color"
if(!holder) return
var/response = alert(src, "Please choose a distinct color that is easy to read and doesn't mix with all the other chat and radio frequency colors.", "Change own OOC color", "Pick new color", "Reset to default", "Cancel")
var/response = tgui_alert(src, "Please choose a distinct color that is easy to read and doesn't mix with all the other chat and radio frequency colors.", "Change own OOC color", list("Pick new color", "Reset to default", "Cancel"))
if(response == "Pick new color")
prefs.ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color
else if(response == "Reset to default")
@@ -179,7 +179,7 @@
if(istype(src.mob, /mob/new_player))
mob.name = capitalize(ckey)
else
var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
var/new_key = ckeyEx(input(usr, "Enter your desired display name.", "Fake Key", key) as text|null)
if(!new_key)
return
if(length(new_key) >= 26)
@@ -240,7 +240,7 @@
var/turf/epicenter = mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb", "Cancel")
var/choice = input("What size explosion would you like to produce?") in choices
var/choice = tgui_input_list(usr, "What size explosion would you like to produce?", "Explosion Choice", choices)
switch(choice)
if(null)
return 0
@@ -253,10 +253,10 @@
if("Big Bomb")
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
var/devastation_range = input("Devastation range (in tiles):") as num
var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
var/light_impact_range = input("Light impact range (in tiles):") as num
var/flash_range = input("Flash range (in tiles):") as num
var/devastation_range = input(usr, "Devastation range (in tiles):") as num
var/heavy_impact_range = input(usr, "Heavy impact range (in tiles):") as num
var/light_impact_range = input(usr, "Light impact range (in tiles):") as num
var/flash_range = input(usr, "Flash range (in tiles):") as num
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins("<font color='blue'>[ckey] creating an admin explosion at [epicenter.loc].</font>")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -269,14 +269,14 @@
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/severity = 1
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
var/greater = tgui_input_list(usr, "Is this a lesser, greater, or badmin disease?", "Give Disease", list("Lesser", "Greater", "Badmin"))
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
D.infectionchance = input(usr, "How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
@@ -304,10 +304,10 @@
var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier
var/new_modifier_type = input("What modifier should we add to [L]?", "Modifier Type") as null|anything in possible_modifiers
var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers)
if(!new_modifier_type)
return
var/duration = input("How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
var/duration = input(usr, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
if(duration == 0)
duration = null
else
@@ -321,7 +321,7 @@
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
var/message = sanitize(input("What do you want the message to be?", "Make Sound") as text|null)
var/message = sanitize(input(usr, "What do you want the message to be?", "Make Sound") as text|null)
if(!message)
return
O.audible_message(message)
@@ -374,7 +374,7 @@
set category = "Admin"
if(holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.",,"Yes","No") == "Yes")
if(tgui_alert(usr, "Confirm self-deadmin for the round? You can't re-admin yourself without someone promoting you.","Deadmin",list("Yes","No")) == "Yes")
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.", 1)
deadmin()
@@ -402,7 +402,7 @@
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in silicon_mob_list
var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Rename Silicon.", silicon_mob_list)
if(!S) return
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
@@ -417,7 +417,7 @@
if(!check_rights(R_ADMIN|R_EVENT)) return
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", silicon_mob_list)
if(!S) return
var/datum/tgui_module/law_manager/admin/L = new(S)
@@ -431,8 +431,10 @@
set category = "Admin"
if(!check_rights(R_ADMIN|R_EVENT)) return
var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","yellow","violet","orange","blue","red","delta")-get_security_level())
if(alert("Switch from code [get_security_level()] to code [sec_level]?","Change security level?","Yes","No") == "Yes")
var/sec_level = tgui_input_list(usr, "It's currently code [get_security_level()].", "Select Security Level", (list("green","yellow","violet","orange","blue","red","delta")-get_security_level()))
if(!sec_level)
return
if(tgui_alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?",list("Yes","No")) == "Yes")
set_security_level(sec_level)
log_admin("[key_name(usr)] changed the security level to code [sec_level].")
@@ -476,7 +478,7 @@
if (!jobs.len)
to_chat(usr, "There are no fully staffed jobs.")
return
var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
var/job = tgui_input_list(usr, "Please select job slot to free", "Free job slot", jobs)
if (job)
job_master.FreeRole(job)
message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]")
@@ -504,7 +506,7 @@
set desc = "Tells mob to man up and deal with it."
set popup_menu = FALSE //VOREStation Edit - Declutter.
if(alert("Are you sure you want to tell them to man up?","Confirmation","Deal with it","No")=="No") return
if(tgui_alert(usr, "Are you sure you want to tell them to man up?","Confirmation",list("Deal with it","No"))=="No") return
to_chat(T, "<span class='filter_system notice'><b><font size=3>Man up and deal with it.</font></b></span>")
to_chat(T, "<span class='filter_system notice'>Move along.</span>")
@@ -517,7 +519,7 @@
set name = "Man Up Global"
set desc = "Tells everyone to man up and deal with it."
if(alert("Are you sure you want to tell the whole server up?","Confirmation","Deal with it","No")=="No") return
if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No"))=="No") return
for (var/mob/T as mob in mob_list)
to_chat(T, "<br><center><span class='filter_system notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move along.</span></center><br>")
@@ -530,7 +532,7 @@
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
var/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
var/spell/S = tgui_input_list(usr, "Choose the spell to give to that guy", "ABRAKADABRA", spells)
if(!S) return
T.spell_list += new S
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+5 -5
View File
@@ -10,7 +10,7 @@
var/targetselected = 0
var/returnval = null
switch(alert("Proc owned by something?",,"Yes","No"))
switch(tgui_alert(usr, "Proc owned by something?","Call Proc",list("Yes","No")))
if("Yes")
targetselected = 1
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT))
@@ -21,7 +21,7 @@
target = null
targetselected = 0
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
var/procname = input(usr, "Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname)
return
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_DEBUG))
return
var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
var/procname = input(usr, "Proc name, eg: fake_blood","Proc:", null) as text|null
if(!procname)
return
if(!hascall(A,procname))
@@ -161,7 +161,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
to_chat(usr, .)
/client/proc/get_callproc_args()
var/argnum = input("Number of arguments","Number:",0) as num|null
var/argnum = input(usr, "Number of arguments","Number:",0) as num|null
if(isnull(argnum))
return null //Cancel
@@ -169,7 +169,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
//var/list/named_args = list() //Named arguments are removed, due to them making proccalling take too long.
while(argnum--)
/* //Named arguments are removed, due to them making proccalling take too long.
var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null
var/named_arg = input(usr,"Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null
if(isnull(named_arg))
return null //Cancel
*/
+1 -1
View File
@@ -10,7 +10,7 @@
var/list/keys = list()
for(var/mob/playerMob in player_list)
keys += playerMob.client
var/client/selection = input("Please, select a player!", "Set CKey", null, null) as null|anything in sortKey(keys)
var/client/selection = tgui_input_list(usr, "Please, select a player!", "Set CKey", sortKey(keys))
if(!selection || !istype(selection))
return
+3 -1
View File
@@ -14,7 +14,7 @@
var/quick_create_object_html = null
var/pathtext = null
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") as null|anything in list("/obj",
var/list/choices = list("/obj",
"/obj/structure",
"/obj/item",
"/obj/item/device",
@@ -28,6 +28,8 @@
"/obj/mecha",
"/obj/item/mecha_parts",
"/obj/item/mecha_parts/mecha_equipment")
pathtext = tgui_input_list(usr, "Select the path of the object you wish to create.", "Path", choices, "/obj")
if(!pathtext)
return
+1 -1
View File
@@ -26,7 +26,7 @@
turfstocapture.Add(T)
else
if(!hasasked)
var/answer = alert("Capture includes non existant turf, Continue capture?","Continue capture?", "No", "Yes")
var/answer = tgui_alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
hasasked = 1
if(answer == "No")
return
-66
View File
@@ -1,70 +1,4 @@
//This stuff was originally intended to be integrated into the ban-system I was working on
//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
//enjoy ~Carn
/*
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
/datum/admins/proc/notes_show(var/ckey)
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
/datum/admins/proc/notes_gethtml(var/ckey)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
if(ckey)
. = "<b>Notes for <a href='?src=\ref[src];notes=show'>[ckey]</a>:</b> <a href='?src=\ref[src];notes=add;ckey=[ckey]'>\[+\]</a> <a href='?src=\ref[src];notes=remove;ckey=[ckey]'>\[-\]</a><br>"
notesfile.cd = "/[ckey]"
var/index = 1
while( !notesfile.eof )
var/note
notesfile >> note
. += "[note] <a href='?src=\ref[src];notes=remove;ckey=[ckey];from=[index]'>\[-\]</a><br>"
index++
else
. = "<b>All Notes:</b> <a href='?src=\ref[src];notes=add'>\[+\]</a> <a href='?src=\ref[src];notes=remove'>\[-\]</a><br>"
notesfile.cd = "/"
for(var/dir in notesfile.dir)
. += "<a href='?src=\ref[src];notes=show;ckey=[dir]'>[dir]</a><br>"
return
//handles removing entries from the buffer, or removing the entire directory if no start_index is given
/proc/notes_remove(var/ckey, var/start_index, var/end_index)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return
if(!ckey)
notesfile.cd = "/"
ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
if(!ckey) return
if(start_index)
notesfile.cd = "/[ckey]"
var/list/noteslist = list()
if(!end_index) end_index = start_index
var/index = 0
while( !notesfile.eof )
index++
var/temp
notesfile >> temp
if( (start_index <= index) && (index <= end_index) )
continue
noteslist += temp
notesfile.eof = -2 //Move to the start of the buffer and then erase.
for( var/note in noteslist )
notesfile << note
else
notesfile.cd = "/"
if(alert(usr,"Are you sure you want to remove all their notes?","Confirmation","No","Yes - Remove all notes") == "Yes - Remove all notes")
notesfile.dir.Remove(ckey)
return
#undef NOTESFILE
*/
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
/proc/notes_add(var/key, var/note, var/mob/user)
if (!key || !note)
return
+1 -1
View File
@@ -411,4 +411,4 @@
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
alert("The game hasn't started yet!")
tgui_alert_async(usr, "The game hasn't started yet!")
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
var/choice = input(user, "How do you wish for Nar-Sie to interact with its surroundings?") as null|anything in list("CultStation13", "Nar-Singulo")
var/choice = tgui_alert(user, "How do you wish for Nar-Sie to interact with its surroundings?","NarChoice",list("CultStation13", "Nar-Singulo"))
if(choice == "CultStation13")
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", user)
narsie_behaviour = choice
@@ -9,20 +9,20 @@
. = ..()
if(!.)
return
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to jump?", "Shuttle Choice", SSshuttles.shuttles)
if (!shuttle_tag) return
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
var/origin_area = tgui_input_list(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!origin_area) return
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
var/destination_area = tgui_input_list(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!destination_area) return
var/long_jump = alert(user, "Is there a transition area for this jump?","", "Yes", "No")
var/long_jump = tgui_alert(user, "Is there a transition area for this jump?","Transition?", list("Yes","No"))
if (long_jump == "Yes")
var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
var/transition_area = tgui_input_list(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!transition_area) return
var/move_duration = input(user, "How many seconds will this jump take?") as num
@@ -14,7 +14,7 @@
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
valid_shuttles += shuttle_tag
var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to launch?", "Shuttle Choice", valid_shuttles)
if (!shuttle_tag)
return
@@ -23,4 +23,4 @@
S.launch(user)
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
else
alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
tgui_alert_async(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
@@ -14,7 +14,7 @@
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
valid_shuttles += shuttle_tag
var/shuttle_tag = input(user, "Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
var/shuttle_tag = tgui_input_list(user, "Which shuttle's launch do you want to force?", "Shuttle Choice", valid_shuttles)
if (!shuttle_tag)
return
@@ -23,4 +23,4 @@
S.force_launch(user)
log_and_message_admins("forced the [shuttle_tag] shuttle", user)
else
alert(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
tgui_alert_async(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
@@ -9,16 +9,16 @@
. = ..()
if(!.)
return
var/confirm = alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
var/confirm = tgui_alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", list("Ok", "Cancel"))
if (confirm == "Cancel")
return
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to jump?", "Shuttle Choice", SSshuttles.shuttles)
if (!shuttle_tag) return
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
var/destination_tag = input(user, "Which landmark do you want to jump to? (IF YOU GET THIS WRONG THINGS WILL BREAK)") as null|anything in SSshuttles.registered_shuttle_landmarks
var/destination_tag = tgui_input_list(user, "Which landmark do you want to jump to? (IF YOU GET THIS WRONG THINGS WILL BREAK)", "Landmark Choice", SSshuttles.registered_shuttle_landmarks)
if (!destination_tag) return
var/destination_location = SSshuttles.get_landmark(destination_tag)
if (!destination_location) return
@@ -10,5 +10,5 @@
. = ..()
if(!.)
return
if (ticker.mode) alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if (ticker.mode) tgui_alert_async(usr, "The game mode is [ticker.mode.name]")
else tgui_alert_async(usr, "For some reason there's a ticker, but not a game mode")
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
var/choice = input(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
var/choice = tgui_alert(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.","WARNING!",list("PRAISE SATAN", "Cancel"))
if(choice == "PRAISE SATAN")
new /obj/singularity/narsie/large(get_turf(user))
log_and_message_admins("has summoned Nar-Sie and brought about a new realm of suffering.", user)
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
var/choice = input(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
var/choice = tgui_alert(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.","WARNING!", list("NO TIME TO EXPLAIN", "Cancel"))
if(choice == "NO TIME TO EXPLAIN")
explosion(get_turf(user), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(user))
+90 -50
View File
@@ -129,7 +129,7 @@
var/datum/admins/D = admin_datums[adm_ckey]
if(task == "remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
if(tgui_alert(usr, "Are you sure you want to remove [adm_ckey]?","Message",list("Yes","Cancel")) == "Yes")
if(!D) return
admin_datums -= adm_ckey
D.disassociate()
@@ -141,9 +141,9 @@
else if(task == "rank")
var/new_rank
if(admin_ranks.len)
new_rank = input("Please select a rank", "New rank", null, null) as null|anything in (admin_ranks|"*New Rank*")
new_rank = tgui_input_list(usr, "Please select a rank", "New rank", (admin_ranks|"*New Rank*"))
else
new_rank = input("Please select a rank", "New rank", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*")
new_rank = tgui_input_list(usr, "Please select a rank", "New rank", list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*"))
var/rights = 0
if(D)
@@ -151,7 +151,7 @@
switch(new_rank)
if(null,"") return
if("*New Rank*")
new_rank = input("Please input a new rank", "New custom rank", null, null) as null|text
new_rank = input(usr, "Please input a new rank", "New custom rank", null, null) as null|text
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
@@ -187,7 +187,7 @@
var/list/permissionlist = list()
for(var/i=1, i<=R_MAXPERMISSION, i<<=1) //that <<= is shorthand for i = i << 1. Which is a left bitshift
permissionlist[rights2text(i)] = i
var/new_permission = input("Select a permission to turn on/off", "Permission toggle", null, null) as null|anything in permissionlist
var/new_permission = tgui_input_list(usr, "Select a permission to turn on/off", "Permission toggle", permissionlist)
if(!new_permission) return
D.rights ^= permissionlist[new_permission]
@@ -201,7 +201,7 @@
if(!check_rights(R_ADMIN|R_EVENT)) return
if( ticker.mode.name == "blob" )
alert("You can't call the shuttle during blob!")
tgui_alert_async(usr, "You can't call the shuttle during blob!")
return
switch(href_list["call_shuttle"])
@@ -232,7 +232,7 @@
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
var/new_time_left = input(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
emergency_shuttle.launch_time = world.time + new_time_left*10
@@ -240,13 +240,13 @@
message_admins("<font color='blue'>[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]</font>", 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
var/new_time_left = input(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
message_admins("<font color='blue'>[key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]</font>", 1)
else
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
tgui_alert_async(usr, "The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
href_list["secretsadmin"] = "check_antagonist"
@@ -268,7 +268,7 @@
return
var/delmob = 0
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("Yes") delmob = 1
@@ -304,11 +304,11 @@
var/banfolder = href_list["unbanf"]
Banlist.cd = "/base/[banfolder]"
var/key = Banlist["key"]
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes")
if(RemoveBan(banfolder))
unbanpanel()
else
alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
tgui_alert_async(usr, "This ban has already been lifted / does not exist.", "Error")
unbanpanel()
else if(href_list["warn"])
@@ -332,7 +332,7 @@
var/duration
switch(alert("Temporary Ban?",,"Yes","No"))
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No")))
if("Yes")
temp = 1
var/mins = 0
@@ -645,7 +645,7 @@
if(M != usr) //we can jobban ourselves
if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) //they can ban too. So we can't ban them
alert("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
if(!job_master)
@@ -723,7 +723,7 @@
//Banning comes first
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban", list("Yes","No","Cancel")))
if("Yes")
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
to_chat(usr, "<span class='filter_adminlog warning'> You cannot issue temporary job-bans!</span>")
@@ -795,7 +795,7 @@
for(var/job in joblist)
var/reason = jobban_isbanned(M, job)
if(!reason) continue //skip if it isn't jobbanned anyway
switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No"))
switch(tgui_alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm",list("Yes","No")))
if("Yes")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
@@ -819,7 +819,7 @@
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
var/reason = sanitize(input("Please enter reason.") as null|message)
var/reason = sanitize(input(usr, "Please enter reason.") as null|message)
if(!reason)
return
@@ -835,7 +835,7 @@
var/t = href_list["removejobban"]
if(t)
if((alert("Do you want to unjobban [t]?","Unjobban confirmation", "Yes", "No") == "Yes") && t) //No more misclicks! Unless you do it twice.
if((tgui_alert(usr, "Do you want to unjobban [t]?","Unjobban confirmation", list("Yes", "No")) == "Yes") && t) //No more misclicks! Unless you do it twice.
log_admin("[key_name(usr)] removed [t]")
message_admins("<font color='blue'>[key_name_admin(usr)] removed [t]</font>", 1)
jobban_remove(t)
@@ -859,7 +859,7 @@
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel")))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
@@ -895,7 +895,7 @@
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
if(!reason)
return
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel")))
if("Cancel") return
if("Yes")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
@@ -938,7 +938,7 @@
if(!check_rights(R_ADMIN|R_EVENT)) return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
return tgui_alert_async(usr, "The game has already started.")
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
for(var/mode in config.modes)
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
@@ -951,9 +951,9 @@
if(!check_rights(R_ADMIN|R_EVENT)) return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
return tgui_alert_async(usr, "The game has already started.")
if(master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
return tgui_alert_async(usr, "The game mode has to be secret!")
var/dat = {"<B>What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.</B><HR>"}
for(var/mode in config.modes)
dat += {"<A href='?src=\ref[src];f_secret2=[mode]'>[config.mode_names[mode]]</A><br>"}
@@ -965,7 +965,7 @@
if(!check_rights(R_ADMIN|R_SERVER|R_EVENT)) return
if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
return tgui_alert_async(usr, "The game has already started.")
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].")
message_admins("<font color='blue'>[key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].</font>", 1)
@@ -978,9 +978,9 @@
if(!check_rights(R_ADMIN|R_SERVER|R_EVENT)) return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
return tgui_alert_async(usr, "The game has already started.")
if(master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
return tgui_alert_async(usr, "The game mode has to be secret!")
secret_force_mode = href_list["f_secret2"]
log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].")
message_admins("<font color='blue'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</font>", 1)
@@ -1018,7 +1018,7 @@
if(!ismob(M))
to_chat(usr, "<span class='filter_adminlog'>this can only be used on instances of type /mob</span>")
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
var/speech = input(usr, "What will [key_name(M)] say?.", "Force speech", "") // Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
M.say(speech)
speech = sanitize(speech) // Nah, we don't trust them
@@ -1028,7 +1028,7 @@
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN)) return
if(alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No") != "Yes")
if(tgui_alert(usr, "Send to admin prison for the round?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["sendtoprison"])
@@ -1078,7 +1078,7 @@
to_chat(usr, "<span class='filter_adminlog warning'>[M] doesn't seem to have an active client.</span>")
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.")
@@ -1091,7 +1091,7 @@
else if(href_list["tdome1"])
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"])
@@ -1116,7 +1116,7 @@
else if(href_list["tdome2"])
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"])
@@ -1141,7 +1141,7 @@
else if(href_list["tdomeadmin"])
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"])
@@ -1163,7 +1163,7 @@
else if(href_list["tdomeobserve"])
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"])
@@ -1424,7 +1424,7 @@
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living</span>")
return
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
if(tgui_alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?", list("Yes", "No")) != "Yes")
return
bluespace_artillery(M,src)
@@ -1522,23 +1522,63 @@
P.adminbrowse()
else if(href_list["jumpto"])
if(!check_rights(R_ADMIN|R_EVENT|R_MOD)) return
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!config.allow_admin_jump)
tgui_alert_async(usr, "Admin jumping disabled")
return
var/mob/M = locate(href_list["jumpto"])
usr.client.jumptomob(M)
if(!M)
return
var/turf/T = get_turf(M)
if(isturf(T))
usr.on_mob_jump()
usr.forceMove(T)
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_and_message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]")
else
to_chat(usr, "<span class='filter_adminlog'>This mob is not located in the game world.</span>")
else if(href_list["getmob"])
if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!config.allow_admin_jump)
tgui_alert_async(usr, "Admin jumping disabled")
return
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
if(!M)
return
M.on_mob_jump()
M.forceMove(get_turf(usr))
var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them"
log_and_message_admins(msg)
admin_ticket_log(M, msg)
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(href_list["sendmob"])
if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!config.allow_admin_jump)
tgui_alert_async(usr, "Admin jumping disabled")
return
var/mob/M = locate(href_list["sendmob"])
usr.client.sendmob(M)
if(!M)
return
var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas())
if(!A)
return
M.on_mob_jump()
M.forceMove(pick(get_area_turfs(A)))
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
log_and_message_admins(msg)
admin_ticket_log(M, msg)
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(href_list["narrateto"])
if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return
@@ -1556,7 +1596,7 @@
if(!check_rights(R_ADMIN|R_MOD|R_EVENT)) return
if(!ticker || !ticker.mode)
alert("The game hasn't started yet!")
tgui_alert_async(usr, "The game hasn't started yet!")
return
var/mob/M = locate(href_list["traitor"])
@@ -1622,13 +1662,13 @@
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_async(usr, "Select fewer object types, (max 5)")
return
else if(length(removed_paths))
alert("Removed:\n" + jointext(removed_paths, "\n"))
tgui_alert_async(usr, "Removed:\n" + jointext(removed_paths, "\n"))
var/list/offset = splittext(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
@@ -1727,7 +1767,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")
news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1)
feedback_inc("newscaster_channels",1) //Adding channel to the global network
@@ -1739,7 +1779,7 @@
var/list/available_channels = list()
for(var/datum/feed_channel/F in news_network.network_channels)
available_channels += F.channel_name
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
src.admincaster_feed_channel.channel_name = sanitizeSafe(tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels ))
src.access_news_network()
else if(href_list["ac_set_new_title"])
@@ -1801,7 +1841,7 @@
if(src.admincaster_feed_message.author == "" || src.admincaster_feed_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
var/datum/feed_message/WANTED = new /datum/feed_message
@@ -1823,7 +1863,7 @@
src.access_news_network()
else if(href_list["ac_cancel_wanted"])
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")
news_network.wanted_issue = null
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
@@ -1947,7 +1987,7 @@
if(href_list["add_player_info"])
var/key = href_list["add_player_info"]
var/add = sanitize(input("Add Player Info") as null|text)
var/add = sanitize(input(usr, "Add Player Info") as null|text)
if(!add) return
notes_add(key,add,usr)
+2 -2
View File
@@ -576,7 +576,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?",,"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>")
@@ -599,7 +599,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
var/browse_to
switch(input("Display which ticket list?") as null|anything in list("Active Tickets", "Closed Tickets", "Resolved Tickets"))
switch(tgui_input_list(usr, "Display which ticket list?", "List Choice", list("Active Tickets", "Closed Tickets", "Resolved Tickets")))
if("Active Tickets")
browse_to = AHELP_ACTIVE
if("Closed Tickets")
+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.",,"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
+216 -202
View File
@@ -1,202 +1,216 @@
/mob/proc/on_mob_jump()
return
/mob/observer/dead/on_mob_jump()
following = null
/client/proc/Jump(var/area/A in return_sorted_areas())
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)
usr.on_mob_jump()
usr.forceMove(pick(get_area_turfs(A)))
log_admin("[key_name(usr)] jumped to [A]")
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("Admin jumping disabled")
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
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("Admin jumping disabled")
return
/client/proc/jumptomob(var/mob/M in mob_list)
set category = "Admin"
set name = "Jump to Mob"
set popup_menu = FALSE //VOREStation Edit - Declutter.
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
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)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.on_mob_jump()
A.forceMove(T)
else
to_chat(A, "<span class='filter_adminlog'>This mob is not located in the game world.</span>")
else
alert("Admin jumping disabled")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin"
set name = "Jump to Coordinate"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if (config.allow_admin_jump)
if(src.mob)
var/mob/A = src.mob
A.on_mob_jump()
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
return
A.forceMove(T)
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
else
alert("Admin jumping disabled")
/client/proc/jumptokey()
set category = "Admin"
set name = "Jump to Key"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
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)
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)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.on_mob_jump()
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("Admin jumping disabled")
/client/proc/Getmob(var/mob/M in mob_list)
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)
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)
admin_ticket_log(M, msg)
M.on_mob_jump()
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("Admin jumping disabled")
/client/proc/Getkey()
set category = "Admin"
set name = "Get Key"
set desc = "Key to teleport"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
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)
if(!selection)
return
var/mob/M = selection:mob
if(!M)
return
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)
if(M)
M.on_mob_jump()
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("Admin jumping disabled")
/client/proc/sendmob(var/mob/M in sortmobs())
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("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"
set name = "Move Atom to Coordinate"
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
if(isnull(tx))
tx = input("Select X coordinate", "Move Atom", null, null) as null|num
if(!tx) return
if(isnull(ty))
ty = input("Select Y coordinate", "Move Atom", null, null) as null|num
if(!ty) return
if(isnull(tz))
tz = input("Select Z coordinate", "Move Atom", null, null) as null|num
if(!tz) return
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
return
if(ismob(AM))
var/mob/M = AM
M.on_mob_jump()
AM.forceMove(T)
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("Admin jumping disabled")
/mob/proc/on_mob_jump()
return
/mob/observer/dead/on_mob_jump()
following = null
/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)))
log_admin("[key_name(usr)] jumped to [A]")
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
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
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
tgui_alert_async(usr, "Admin jumping disabled")
return
/client/proc/jumptomob()
set category = "Admin"
set name = "Jump to Mob"
set popup_menu = FALSE //VOREStation Edit - Declutter.
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:", "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)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.on_mob_jump()
A.forceMove(T)
else
to_chat(A, "<span class='filter_adminlog'>This mob is not located in the game world.</span>")
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin"
set name = "Jump to Coordinate"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if (config.allow_admin_jump)
if(src.mob)
var/mob/A = src.mob
A.on_mob_jump()
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
return
A.forceMove(T)
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptokey()
set category = "Admin"
set name = "Jump to Key"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
var/list/keys = list()
for(var/mob/M in player_list)
keys += M.client
var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys))
if(!selection)
return
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.on_mob_jump()
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
tgui_alert_async(usr, "Admin jumping disabled")
/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 [key_name(M)] to them")
var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them"
message_admins(msg)
admin_ticket_log(M, msg)
M.on_mob_jump()
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
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/Getkey()
set category = "Admin"
set name = "Get Key"
set desc = "Key to teleport"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
var/list/keys = list()
for(var/mob/M in player_list)
keys += M.client
var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys))
if(!selection)
return
var/mob/M = selection:mob
if(!M)
return
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)
if(M)
M.on_mob_jump()
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
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/sendmob()
set category = "Admin"
set name = "Send Mob"
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:", "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"
set name = "Move Atom to Coordinate"
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT))
return
if(config.allow_admin_jump)
if(isnull(tx))
tx = input(usr, "Select X coordinate", "Move Atom", null, null) as null|num
if(!tx) return
if(isnull(ty))
ty = input(usr, "Select Y coordinate", "Move Atom", null, null) as null|num
if(!ty) return
if(isnull(tz))
tz = input(usr, "Select Z coordinate", "Move Atom", null, null) as null|num
if(!tz) return
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
return
if(ismob(AM))
var/mob/M = AM
M.on_mob_jump()
AM.forceMove(T)
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
tgui_alert_async(usr, "Admin jumping disabled")
+1 -1
View File
@@ -31,7 +31,7 @@
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
else
targets["(No Mob) - [T]"] = T
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
var/target = tgui_input_list(src,"To whom shall we send a message?","Admin PM", sortList(targets))
if(!target) //Admin canceled
return
cmd_admin_pm(targets[target],null)
+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("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...")
+12 -12
View File
@@ -260,7 +260,7 @@
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
var/thetype = tgui_input_list(usr,"Select variable type:", "Type", list("text","number","mob-reference","obj-reference","turf-reference"))
if(!thetype) return 1
switch(thetype)
if("text")
@@ -268,14 +268,14 @@
if("number")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
if("mob-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", mob_list)
if("obj-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
if(BUILDMODE_ROOM)
var/choice = alert("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,18 +283,18 @@
wall_holder = get_path_from_partial_text(/turf/simulated/wall)
if(BUILDMODE_LIGHTS)
var/choice = alert("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
var/input = input(usr, "New light range.","Light Maker",3) as null|num
if(input)
new_light_range = input
if("Power")
var/input = input("New light power.","Light Maker",3) as null|num
var/input = input(usr, "New light power.","Light Maker",3) as null|num
if(input)
new_light_intensity = input
if("Color")
var/input = input("New light color.","Light Maker",3) as null|color
var/input = input(usr, "New light color.","Light Maker",3) as null|color
if(input)
new_light_color = input
return 1
@@ -625,7 +625,7 @@
return
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
var/desired_path = input("Enter full or partial typepath.","Typepath","[default_path]")
var/desired_path = input(usr, "Enter full or partial typepath.","Typepath","[default_path]")
var/list/types = typesof(/atom)
var/list/matches = list()
@@ -635,7 +635,7 @@
matches += path
if(matches.len==0)
alert("No results found. Sorry.")
tgui_alert_async(usr, "No results found. Sorry.")
return
var/result = null
@@ -643,7 +643,7 @@
if(matches.len==1)
result = matches[1]
else
result = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
result = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
if(!objholder)
result = default_path
return result
+13 -13
View File
@@ -5,7 +5,7 @@
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Admin", human_mob_list)
if(!H) return
log_and_message_admins("is altering the appearance of [H].")
@@ -19,14 +19,14 @@
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Self") as null|anything in human_mob_list
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", human_mob_list)
if(!H) return
if(!H.client)
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("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)
@@ -41,56 +41,56 @@
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list)
if(!istype(M, /mob/living/carbon/human))
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
return
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.",,"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
var/new_facial = input(usr, "Please select facial hair color.", "Character Generation") as color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
M.g_facial = hex2num(copytext(new_facial, 4, 6))
M.b_facial = hex2num(copytext(new_facial, 6, 8))
var/new_hair = input("Please select hair color.", "Character Generation") as color
var/new_hair = input(usr, "Please select hair color.", "Character Generation") as color
if(new_facial)
M.r_hair = hex2num(copytext(new_hair, 2, 4))
M.g_hair = hex2num(copytext(new_hair, 4, 6))
M.b_hair = hex2num(copytext(new_hair, 6, 8))
var/new_eyes = input("Please select eye color.", "Character Generation") as color
var/new_eyes = input(usr, "Please select eye color.", "Character Generation") as color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
M.update_eyes()
var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
var/new_skin = input(usr, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
if(new_skin)
M.r_skin = hex2num(copytext(new_skin, 2, 4))
M.g_skin = hex2num(copytext(new_skin, 4, 6))
M.b_skin = hex2num(copytext(new_skin, 6, 8))
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
var/new_tone = input(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
// hair
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
var/new_hstyle = tgui_input_list(usr, "Select a hair style", "Grooming", hair_styles_list)
if(new_hstyle)
M.h_style = new_hstyle
// facial hair
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
var/new_fstyle = tgui_input_list(usr, "Select a facial hair style", "Grooming", facial_hair_styles_list)
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)
+4 -4
View File
@@ -6,19 +6,19 @@
if(!check_rights(R_FUN))
return
if(alert("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("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
switch(parameter)
if(1)
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("mercenary","no override")
override = tgui_input_list(src,"mode = ?","Enter Parameter", list("mercenary","no override"))
if(0)
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","mercenary","AI malfunction","no override")
override = tgui_input_list(src,"mode = ?","Enter Parameter", list("blob","mercenary","AI malfunction","no override"))
ticker.station_explosion_cinematic(parameter,override)
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"")
+22 -22
View File
@@ -98,7 +98,7 @@
set name = "Make Robot"
if(!ticker)
alert("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("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("Wait until the game starts")
tgui_alert_async(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_async(usr, "That mob doesn't seem to exist, close the panel and try again.")
return
if(istype(M, /mob/new_player))
alert("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].")
@@ -138,11 +138,11 @@
for(var/mob/C in mob_list)
if(C.key)
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", available)
if(!choice)
return 0
if(!istype(choice, /mob/observer/dead))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank them 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 them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("No", "Yes"))
if(confirm != "Yes")
return 0
var/obj/item/device/paicard/card = new(T)
@@ -161,7 +161,7 @@
set name = "Make Alien"
if(!ticker)
alert("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("Invalid mob")
tgui_alert_async(usr, "Invalid mob")
//TODO: merge the vievars version into this or something maybe mayhaps
@@ -181,7 +181,7 @@
// to prevent REALLY stupid deletions
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", typesof(/obj) + typesof(/mob) - blocked)
if(hsbitem)
for(var/atom/O in world)
if(istype(O, hsbitem))
@@ -272,7 +272,7 @@
set name = "Grant Full Access"
if (!ticker)
alert("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("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("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.",,"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)
@@ -432,7 +432,7 @@
var/mob/living/carbon/human/H = target
var/decl/hierarchy/outfit/outfit = input("Select outfit.", "Select equipment.") as null|anything in outfits()
var/decl/hierarchy/outfit/outfit = tgui_input_list(usr, "Select outfit.", "Select equipment.", outfits())
if(!outfit)
return
@@ -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("Are you sure? This will start up the engine. Should only be used during debug!",,"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("Are you sure? This will start up the engine. Should only be used during debug!",,"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
@@ -580,7 +580,7 @@
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"))
switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
if("Players")
to_chat(usr, span("filter_debuglogs", jointext(player_list,",")))
if("Admins")
@@ -606,7 +606,7 @@
// DNA2 - Admin Hax
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
if(!ticker)
alert("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("Invalid mob")
tgui_alert_async(usr, "Invalid mob")
/datum/admins/proc/view_runtimes()
set category = "Debug"
@@ -637,9 +637,9 @@
if(!check_rights(R_DEBUG))
return
var/datum/planet/planet = input(usr, "Which planet do you want to modify the weather on?", "Change Weather") in SSplanets.planets
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)
if(istype(planet))
var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types
var/datum/weather/new_weather = tgui_input_list(usr, "What weather do you want to change to?", "Change Weather", planet.weather_holder.allowed_weather_types)
if(new_weather)
planet.weather_holder.change_weather(new_weather)
planet.weather_holder.rebuild_forecast()
@@ -655,7 +655,7 @@
if(!check_rights(R_DEBUG))
return
var/datum/planet/planet = input(usr, "Which planet do you want to modify time on?", "Change Time") in SSplanets.planets
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets)
if(istype(planet))
var/datum/time/current_time_datum = planet.current_time
var/new_hour = input(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh"))) as null|num
+2 -2
View File
@@ -8,7 +8,7 @@
if(!check_rights(R_ADMIN|R_EVENT|R_DEBUG|R_MOD)) //CHOMPStation Edit TFF 24/4/19: Allow Devs to use Quick-NIF verb. 11/9/20: Also allow mods :3
return
var/mob/living/carbon/human/H = input("Pick a mob with a player","Quick NIF") as null|anything in player_list
var/mob/living/carbon/human/H = tgui_input_list(usr, "Pick a mob with a player","Quick NIF", player_list)
if(!H)
return
@@ -39,7 +39,7 @@
var/list/show_NIFs = sortList(NIFs) // the list that will be shown to the user to pick from
input_NIF = input("Pick the NIF type","Quick NIF") in show_NIFs
input_NIF = tgui_input_list(usr, "Pick the NIF type","Quick NIF", show_NIFs)
var/chosen_NIF = NIFs[capitalize(input_NIF)]
if(chosen_NIF)
+2 -2
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
@@ -177,7 +177,7 @@
set desc = "This searches all the active jobban entries for the current round and outputs the results to standard output."
set category = "Debug"
var/job_filter = input("Contains what?","Job Filter") as text|null
var/job_filter = input(usr, "Contains what?","Job Filter") as text|null
if(!job_filter)
return
+4 -4
View File
@@ -4,8 +4,8 @@
if(!check_rights(R_FUN))
return
var/sum = input("How many times should we throw?") as num
var/side = input("Select the number of sides.") as num
var/sum = input(usr, "How many times should we throw?") as num
var/side = input(usr, "Select the number of sides.") as num
if(!side)
side = 6
if(!sum)
@@ -13,12 +13,12 @@
var/dice = num2text(sum) + "d" + num2text(side)
if(alert("Do you want to inform the world about your game?",,"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("Do you want to inform the world about the result?",,"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)
+2 -2
View File
@@ -8,12 +8,12 @@
if(!check_rights(R_DEBUG))
return
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
var/new_fps = round(input(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
if(new_fps <= 0)
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
@@ -27,7 +27,7 @@
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
return
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
var/client/target = tgui_input_list(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions", GLOB.clients)
if(!istype(target,/client))
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
return
+1 -1
View File
@@ -5,7 +5,7 @@
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) return
if(alert("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
@@ -5,12 +5,12 @@
var/datum/map_template/template
var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates
var/map = tgui_input_list(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
var/orientation = text2dir(tgui_input_list(usr, "Choose an orientation for this Map Template.", "Orientation", list("North", "South", "East", "West")))
if(!orientation)
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
@@ -44,12 +43,12 @@
var/datum/map_template/template
var/map = input(usr, "Choose a Map Template to place on a new Z-level.","Place Map Template") as null|anything in SSmapping.map_templates
var/map = tgui_input_list(usr, "Choose a Map Template to place on a new Z-level.","Place Map Template", SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
var/orientation = text2dir(tgui_input_list(usr, "Choose an orientation for this Map Template.", "Orientation", list("North", "South", "East", "West")))
if(!orientation)
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
+5 -5
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,19 +273,19 @@ var/list/debug_verbs = list (
set category = "ZAS"
set name = "Reboot ZAS"
if(alert("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()
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
var/level = input(usr, "Which z-level?","Level?") as text
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
var/type_text = input("Which type path?","Path?") as text
var/type_text = input(usr, "Which type path?","Path?") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
@@ -323,7 +323,7 @@ var/list/debug_verbs = list (
set category = "Mapping"
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
var/type_text = input(usr, "Which type path?","") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
+2 -2
View File
@@ -10,7 +10,7 @@ var/list/sounds_cache = list()
sounds_cache += S
if(alert("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]")
@@ -41,7 +41,7 @@ var/list/sounds_cache = list()
sounds += "--CANCEL--"
sounds += sounds_cache
var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
var/melody = tgui_input_list(usr, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
if(melody == "--CANCEL--") return
+50 -48
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("The AI can't be sent to prison you jerk!", null, null, null, null, null)
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
@@ -84,7 +84,7 @@
if (!holder)
return
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
var/msg = sanitize(input(usr, "Message:", text("Subtle PM to [M.key]")) as text)
if (!msg)
return
@@ -106,7 +106,7 @@
if (!holder)
return
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
@@ -125,12 +125,12 @@
return
if(!M)
M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
M = tgui_input_list(usr, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
if(!M)
return
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to your target:")) as text
if(msg && !(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
@@ -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')
@@ -270,12 +270,12 @@ Ccomp's first proc.
if(!holder)
return
var/target = input("Select a ckey to allow to rejoin", "Allow Respawn Selector") as null|anything in GLOB.respawn_timers
var/target = tgui_input_list(usr, "Select a ckey to allow to rejoin", "Allow Respawn Selector", GLOB.respawn_timers)
if(!target)
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
@@ -376,7 +376,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") as null|anything in GLOB.clients
var/client/picked_client = tgui_input_list(src, "Please specify which client's character to spawn.", "Client", GLOB.clients)
if(!picked_client)
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")
@@ -431,7 +431,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Well you're not reloading their job or they never had one.
if(!charjob)
var/pickjob = input(src,"Pick a job to assign them (or none).","Job Select","-No Job-") as null|anything in joblist + "-No Job-"
var/pickjob = tgui_input_list(src,"Pick a job to assign them (or none).","Job Select", joblist + "-No Job-", "-No Job-")
if(!pickjob)
return
if(pickjob != "-No Job-")
@@ -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")
@@ -581,7 +581,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!
@@ -596,7 +596,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_async(usr, "Cannot revive a ghost")
return
if(config.allow_admin_rev)
M.revive()
@@ -606,7 +606,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("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()
@@ -626,7 +626,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("Should this be announced to the general population?",,"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")
@@ -664,18 +664,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
var/devastation = input(usr, "Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
var/heavy = input(usr, "Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) return
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
var/light = input(usr, "Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
var/flash = input(usr, "Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
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)
@@ -692,13 +692,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
var/heavy = input(usr, "Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
var/med = input("Range of medium pulse.", text("Input")) as num|null
var/med = input(usr, "Range of medium pulse.", text("Input")) as num|null
if(med == null) return
var/light = input("Range of light pulse.", text("Input")) as num|null
var/light = input(usr, "Range of light pulse.", text("Input")) as num|null
if(light == null) return
var/long = input("Range of long pulse.", text("Input")) as num|null
var/long = input(usr, "Range of long pulse.", text("Input")) as num|null
if(long == null) return
if (heavy || med || light || long)
@@ -718,7 +718,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
@@ -740,7 +740,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
@@ -758,20 +758,20 @@ 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("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)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
var/selection = tgui_input_list(usr, "Please, select a player!", "Admin Jumping", keys)
if(!selection)
return
M = selection:mob
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level)))
alert("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("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)
@@ -866,7 +866,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/view = src.view
if(view == world.view)
view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
view = tgui_input_list(usr, "Select view range:", "FUCK YE", 7, list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
else
view = world.view
mob.set_viewsize(view)
@@ -885,18 +885,18 @@ 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
if(ticker.mode.auto_recall_shuttle)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", list("Confirm", "Cancel"))
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", list("Emergency", "Crew Transfer"))
if (choice == "Emergency")
emergency_shuttle.call_evac()
else
@@ -914,7 +914,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
@@ -968,7 +968,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
@@ -1013,7 +1013,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!M)
return
var/confirm = alert("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
@@ -1035,7 +1035,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","ACRYO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(ishuman(M))
var/obj/machinery/cryopod/CP = human_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in human_cryopods]
var/choice = tgui_input_list(usr,"Select a cryopod to use","Cryopod Choice", human_cryopods)
var/obj/machinery/cryopod/CP = human_cryopods[choice]
if(!CP)
return
M.ghostize()
@@ -1050,7 +1051,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
ai.clear_client()
return
else
var/obj/machinery/cryopod/robot/CP = robot_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in robot_cryopods]
var/choice = tgui_input_list(usr,"Select a cryopod to use","Cryopod Choice", robot_cryopods)
var/obj/machinery/cryopod/robot/CP = robot_cryopods[choice]
if(!CP)
return
M.ghostize()
+5 -5
View File
@@ -6,7 +6,7 @@
if(!holder)
return
var/client/picked_client = input(src, "Who are we spawning as a mob?", "Client", "Cancel") as null|anything in GLOB.clients
var/client/picked_client = tgui_input_list(src, "Who are we spawning as a mob?", "Client", GLOB.clients)
if(!picked_client)
return
var/list/types = typesof(/mob/living)
@@ -23,17 +23,17 @@
if(matches.len==1)
chosen = matches[1]
else
chosen = input("Select a mob type", "Select Mob", matches[1]) as null|anything in matches
chosen = tgui_input_list(usr, "Select a mob type", "Select Mob", matches)
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
@@ -81,7 +81,7 @@
if (!holder)
return
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
+1 -1
View File
@@ -10,7 +10,7 @@
var/list/smite_types = list(SMITE_BREAKLEGS,SMITE_BLUESPACEARTILLERY,SMITE_SPONTANEOUSCOMBUSTION,SMITE_LIGHTNINGBOLT)
var/smite_choice = input("Select the type of SMITE for [target]","SMITE Type Choice") as null|anything in smite_types
var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types)
if(!smite_choice)
return
+3 -3
View File
@@ -10,7 +10,7 @@
var/list/smite_types = list(SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_REDSPACE_ABDUCT,SMITE_AUTOSAVE,SMITE_AUTOSAVE_WIDE)
var/smite_choice = input("Select the type of SMITE for [target]","SMITE Type Choice") as null|anything in smite_types
var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types)
if(!smite_choice)
return
@@ -70,14 +70,14 @@
"Orange Eyes (Light)" = /mob/living/simple_mob/shadekin/orange/white,
"Orange Eyes (Brown)" = /mob/living/simple_mob/shadekin/orange/brown,
"Rivyr (Unique)" = /mob/living/simple_mob/shadekin/blue/rivyr)
var/kin_type = input("Select the type of shadekin for [target] nomf","Shadekin Type Choice") as null|anything in kin_types
var/kin_type = tgui_input_list(usr, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types)
if(!kin_type || !target)
return
kin_type = kin_types[kin_type]
var/myself = alert("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
+4 -4
View File
@@ -20,7 +20,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
var/datum/antagonist/deathsquad/team
var/choice = input(usr, "Select type of strike team:") as null|anything in list("Heavy Asset Protection", "Mercenaries")
var/choice = tgui_input_list(usr, "Select type of strike team:", list("Heavy Asset Protection", "Mercenaries"))
if(!choice)
return
@@ -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("Do you want to send in a strike team? Once enabled, this is irreversible.",,"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("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("Error, no mission set. Do you want to exit the setup process?",,"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
@@ -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(src, "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]")
feedback_add_details("admin_verb","ADEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -78,26 +78,26 @@
if (extra_classes)
classes += extra_classes
.["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes
.["class"] = tgui_input_list(src, "What kind of data?", "Variable Type", classes, default_class)
if (holder && holder.marked_datum && .["class"] == "[VV_MARKED_DATUM] ([holder.marked_datum.type])")
.["class"] = VV_MARKED_DATUM
switch(.["class"])
if (VV_TEXT)
.["value"] = input("Enter new text:", "Text", current_value) as null|text
.["value"] = input(usr, "Enter new text:", "Text", current_value) as null|text
if (.["value"] == null)
.["class"] = null
return
if (VV_MESSAGE)
.["value"] = input("Enter new text:", "Text", current_value) as null|message
.["value"] = input(usr, "Enter new text:", "Text", current_value) as null|message
if (.["value"] == null)
.["class"] = null
return
if (VV_NUM)
.["value"] = input("Enter new number:", "Num", current_value) as null|num
.["value"] = input(usr, "Enter new number:", "Num", current_value) as null|num
if (.["value"] == null)
.["class"] = null
return
@@ -124,7 +124,7 @@
var/type = current_value
var/error = ""
do
type = input("Enter type:[error]", "Type", type) as null|text
type = input(usr, "Enter type:[error]", "Type", type) as null|text
if (!type)
break
type = text2path(type)
@@ -143,7 +143,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -156,7 +156,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -169,7 +169,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -178,21 +178,21 @@
if (VV_CLIENT)
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
.["value"] = tgui_input_list(usr, "Select reference:", "Reference", GLOB.clients, current_value)
if (.["value"] == null)
.["class"] = null
return
if (VV_FILE)
.["value"] = input("Pick file:", "File") as null|file
.["value"] = input(usr, "Pick file:", "File") as null|file
if (.["value"] == null)
.["class"] = null
return
if (VV_ICON)
.["value"] = input("Pick icon:", "Icon") as null|icon
.["value"] = input(usr, "Pick icon:", "Icon") as null|icon
if (.["value"] == null)
.["class"] = null
return
@@ -229,7 +229,7 @@
var/type = current_value
var/error = ""
do
type = input("Enter type:[error]", "Type", type) as null|text
type = input(usr, "Enter type:[error]", "Type", type) as null|text
if (!type)
break
type = text2path(type)
@@ -28,7 +28,7 @@
names = sortList(names)
variable = input("Which var?", "Var") as null|anything in names
variable = tgui_input_list(usr, "Which var?", "Var", names)
else
variable = var_name
@@ -49,7 +49,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(src, "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
@@ -115,7 +115,7 @@
var/pre_processing = new_value
var/unique
if (varsvars && 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
@@ -142,7 +142,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(src, "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 && 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")
@@ -98,7 +98,7 @@ GLOBAL_PROTECT(VVpixelmovement)
L += var_value
if(IS_VALID_ASSOC_KEY(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 VV","Yes","No"))
if("Yes")
L[var_value] = mod_list_add_ass(O) //hehe
if (O)
@@ -117,7 +117,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(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
if(confirm != "Continue")
return
@@ -133,7 +133,7 @@ GLOBAL_PROTECT(VVpixelmovement)
value = "null"
names["#[i] [key] = [value]"] = i
if (!index)
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)"
var/variable = tgui_input_list(usr, "Which var?","Var", names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)")
if(variable == null)
return
@@ -181,7 +181,7 @@ GLOBAL_PROTECT(VVpixelmovement)
return
var/assoc = 0
if(IS_VALID_ASSOC_KEY(L[index]))
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(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel")
if (prompt == "Cancel")
return
if (prompt == "Assigned Value")
@@ -309,14 +309,14 @@ GLOBAL_PROTECT(VVpixelmovement)
names = sortList(names)
variable = input("Which var?","Var") as null|anything in names
variable = tgui_input_list(usr, "Which var?","Var", names)
if(!variable)
return
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(src, "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
+16 -16
View File
@@ -177,14 +177,14 @@
to_chat(usr, "This can only be used on instances of type /obj")
return
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
var/action_type = tgui_alert(usr, "Strict type ([O.type]) or type and all subtypes?","Type Selection",list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [O.type]?","Delete All?",list("Yes","No")) != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
if(tgui_alert(usr, "Second confirmation required. Delete?","REALLY?",list("Yes","No")) != "Yes")
return
var/O_type = O.type
@@ -235,7 +235,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -249,7 +249,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -263,7 +263,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -277,7 +277,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(tgui_alert(usr, "Confirm mob type change?","Confirm",list("Transform","Cancel")) != "Transform") return
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -291,7 +291,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in GLOB.all_species
var/new_species = tgui_input_list(usr, "Please choose a new species.","Species", GLOB.all_species)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
@@ -310,7 +310,7 @@
to_chat(usr, "This can only be done to instances of type /mob")
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in GLOB.all_languages
var/new_language = tgui_input_list(usr, "Please choose a language to add.","Language", GLOB.all_languages)
if(!new_language)
return
@@ -336,7 +336,7 @@
to_chat(usr, "This mob knows no languages.")
return
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
var/datum/language/rem_language = tgui_input_list(usr, "Please choose a language to remove.","Language", H.languages)
if(!rem_language)
return
@@ -372,7 +372,7 @@
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
var/verb = tgui_input_list(usr, "Select a verb!", "Verbs", possibleverbs)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -389,7 +389,7 @@
if(!istype(H))
to_chat(usr, "This can only be done to instances of type /mob")
return
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
var/verb = tgui_input_list(usr, "Please choose a verb to remove.","Verbs", H.verbs)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -406,7 +406,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
var/new_organ = tgui_input_list(usr, "Please choose an organ to add.","Organ", subtypesof(/obj/item/organ))
if(!new_organ) return
if(!M)
@@ -428,7 +428,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
var/obj/item/organ/rem_organ = tgui_input_list(usr, "Please choose an organ to remove.","Organ", M.internal_organs)
if(!M)
to_chat(usr, "Mob doesn't exist anymore")
@@ -475,7 +475,7 @@
var/Text = href_list["adjustDamage"]
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
var/amount = input(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
to_chat(usr, "Mob doesn't exist anymore")
@@ -508,7 +508,7 @@
var/client/C = value["value"]
if (!C)
return
var/prompt = alert("Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", "Yes", "No")
var/prompt = tgui_alert(usr, "Do you want to grant [C] access to view this VV window? (they will not be able to edit or change anysrc nor open nested vv windows unless they themselves are an admin)", "Confirm", list("Yes", "No"))
if (prompt != "Yes")
return
if(!thing)
@@ -10,7 +10,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", "Yes", "No")
if (prompt != "Yes")
return
target.Cut(target_index, target_index+1)