Input Conversion Part 1

This commit is contained in:
ItsSelis
2022-06-19 03:05:03 +02:00
parent 37daa28920
commit 06c9b26252
134 changed files with 342 additions and 342 deletions
+2 -2
View File
@@ -350,13 +350,13 @@ SUBSYSTEM_DEF(game_master)
choose_game_master(usr)
if(href_list["set_staleness"])
var/amount = input(usr, "How much staleness should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much staleness should there be?", "Game Master")
if(!isnull(amount))
staleness = amount
message_admins("GM staleness was set to [amount] by [usr.key].")
if(href_list["set_danger"])
var/amount = input(usr, "How much danger should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much danger should there be?", "Game Master")
if(!isnull(amount))
danger = amount
message_admins("GM danger was set to [amount] by [usr.key].")
+6 -6
View File
@@ -74,7 +74,7 @@ SUBSYSTEM_DEF(media_tracks)
return
// Required
var/url = input(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL") as message|null
var/url = tgui_input_text(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL", multiline = TRUE)
if(!url)
return
@@ -112,20 +112,20 @@ SUBSYSTEM_DEF(media_tracks)
sort_tracks()
return
var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
var/genre = input(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre") as text|null
var/genre = tgui_input_text(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre")
if(isnull(genre)) // Cancel rather than empty string
return
@@ -160,7 +160,7 @@ SUBSYSTEM_DEF(media_tracks)
if(!check_rights(R_DEBUG|R_FUN))
return
var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
+3 -3
View File
@@ -363,15 +363,15 @@ SUBSYSTEM_DEF(supply)
// Will add an item entry to the specified export receipt on the user-side list
/datum/controller/subsystem/supply/proc/add_export_item(var/datum/exported_crate/E, var/mob/user)
var/new_name = input(user, "Name", "Please enter the name of the item.") as null|text
var/new_name = tgui_input_text(user, "Name", "Please enter the name of the item.")
if(!new_name)
return
var/new_quantity = input(user, "Name", "Please enter the quantity of the item.") as null|num
var/new_quantity = tgui_input_number(user, "Name", "Please enter the quantity of the item.")
if(!new_quantity)
return
var/new_value = input(user, "Name", "Please enter the value of the item.") as null|num
var/new_value = tgui_input_number(user, "Name", "Please enter the value of the item.")
if(!new_value)
return
+2 -2
View File
@@ -231,11 +231,11 @@ SUBSYSTEM_DEF(vote)
choices.Add(antag.role_text)
choices.Add("None")
if(VOTE_CUSTOM)
question = sanitizeSafe(input(usr, "What is the vote for?") as text|null)
question = sanitizeSafe(tgui_input_text(usr, "What is the vote for?"))
if(!question)
return 0
for(var/i = 1 to 10)
var/option = capitalize(sanitize(input(usr, "Please enter an option or hit cancel to finish") as text|null))
var/option = capitalize(sanitize(tgui_input_text(usr, "Please enter an option or hit cancel to finish")))
if(!option || mode || !usr.client)
break
choices.Add(option)