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

View File

@@ -101,7 +101,7 @@
if(enabled)
tgui_interact(user)
else if(check_rights(R_ADMIN|R_EVENT, 0, user))
var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
var/response = tgui_alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", list("Yes", "No"))
if(response == "Yes")
turn_on(user)
@@ -180,7 +180,7 @@
for(var/obj/item/weapon/computer_hardware/H in all_components)
component_names.Add(H.name)
var/choice = input(usr, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in component_names
var/choice = tgui_input_list(usr, "Which component do you want to uninstall?", "Computer maintenance", component_names)
if(!choice)
return

View File

@@ -34,7 +34,7 @@
pixel_y = 0
to_chat(user, "You unsecure \the [src].")
else
var/choice = input(user, "Where do you want to place \the [src]?", "Offset selection") in list("North", "South", "West", "East", "This tile", "Cancel")
var/choice = tgui_input_list(user, "Where do you want to place \the [src]?", "Offset selection", list("North", "South", "West", "East", "This tile", "Cancel"))
var/valid = FALSE
switch(choice)
if("North")

View File

@@ -57,7 +57,7 @@
var/datum/computer_file/data/F = HDD.find_file_by_name(open_file)
if(!F || !istype(F))
return
if(F.do_not_edit && (alert("WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No"))
if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) == "No"))
return
var/oldtext = html_decode(F.stored_data)

View File

@@ -118,7 +118,7 @@
if("PRG_openfile")
if(is_edited)
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
save_file(open_file)
browsing = 0
if(!open_file(params["PRG_openfile"]))
@@ -127,7 +127,7 @@
if("PRG_newfile")
if(is_edited)
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
save_file(open_file)
var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null)

View File

@@ -117,7 +117,7 @@
return TRUE
if("newaccount")
var/newdomain = sanitize(input(usr,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds)
var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds))
if(!newdomain)
return TRUE
var/newlogin = sanitize(input(usr,"Pick account name (@[newdomain]):", "Account name"), 100)

View File

@@ -59,7 +59,7 @@
ntnet_global.setting_disabled = FALSE
return TRUE
var/response = alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No")
var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
ntnet_global.setting_disabled = TRUE
return TRUE

View File

@@ -80,14 +80,16 @@ var/warrant_uid = 0
if("addwarrant")
. = TRUE
var/datum/data/record/warrant/W = new()
var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest"))
var/temp = tgui_alert(usr, "Do you want to create a search-, or an arrest warrant?", "Warrant Type", list("Search","Arrest","Cancel"))
if(!temp)
return
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if(temp == "arrest")
if(temp == "Arrest")
W.fields["namewarrant"] = "Unknown"
W.fields["charges"] = "No charges present"
W.fields["auth"] = "Unauthorized"
W.fields["arrestsearch"] = "arrest"
if(temp == "search")
if(temp == "Search")
W.fields["namewarrant"] = "No suspect/location given" // VOREStation edit
W.fields["charges"] = "No reason given"
W.fields["auth"] = "Unauthorized"
@@ -109,7 +111,7 @@ var/warrant_uid = 0
var/namelist = list()
for(var/datum/data/record/t in data_core.general)
namelist += t.fields["name"]
var/new_name = sanitize(input(usr, "Please input name") as null|anything in namelist)
var/new_name = sanitize(tgui_input_list(usr, "Please input name:", "Name Choice", namelist))
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_name)
return
@@ -117,7 +119,7 @@ var/warrant_uid = 0
if("editwarrantnamecustom")
. = TRUE
var/new_name = sanitize(input("Please input name") as null|text)
var/new_name = sanitize(input(usr, "Please input name") as null|text)
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_name)
return
@@ -125,7 +127,7 @@ var/warrant_uid = 0
if("editwarrantcharges")
. = TRUE
var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
var/new_charges = sanitize(input(usr, "Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_charges)
return

View File

@@ -285,7 +285,7 @@
return 0
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
var/attempt_pin = input(usr, "Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)