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
+21 -21
View File
@@ -113,7 +113,7 @@
var/task = href_list["editrights"]
if(task == "add")
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
var/new_ckey = ckey(tgui_input_text(usr,"New admin's ckey","Admin ckey", null))
if(!new_ckey) return
if(new_ckey in admin_datums)
to_chat(usr, "<span class='filter_adminlog warning'>Error: Topic 'editrights': [new_ckey] is already an admin</span>")
@@ -151,7 +151,7 @@
switch(new_rank)
if(null,"") return
if("*New Rank*")
new_rank = input(usr, "Please input a new rank", "New custom rank") as null|text
new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank")
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
@@ -232,7 +232,7 @@
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
var/new_time_left = input(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() )
emergency_shuttle.launch_time = world.time + new_time_left*10
@@ -240,7 +240,7 @@
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(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() )
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]")
@@ -343,12 +343,12 @@
mins = min(525599,mins)
minutes = CMinutes + mins
duration = GetExp(minutes)
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
reason = sanitize(tgui_input_text(usr,"Reason?","reason",reason2))
if(!reason) return
if("No")
temp = 0
duration = "Perma"
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
reason = sanitize(tgui_input_text(usr,"Reason?","reason",reason2))
if(!reason) return
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
@@ -758,13 +758,13 @@
if(config.ban_legacy_system)
to_chat(usr, "<span class='filter_adminlog warning'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</span>")
return
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max)
to_chat(usr, "<span class='filter_adminlog warning'> Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!</span>")
return
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
if(!reason)
return
@@ -789,7 +789,7 @@
return 1
if("No")
if(!check_rights(R_BAN)) return
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
if(reason)
var/msg
for(var/job in notbannedlist)
@@ -846,7 +846,7 @@
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
var/reason = sanitize(input(usr, "Please enter reason.") as null|message)
var/reason = sanitize(tgui_input_text(usr, "Please enter reason.", multiline = TRUE))
if(!reason)
return
@@ -888,14 +888,14 @@
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
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
to_chat(usr, "<span class='warning'>Moderators can only job tempban up to [config.mod_tempban_max] minutes!</span>")
return
if(mins >= 525600) mins = 525599
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
@@ -919,7 +919,7 @@
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
if(!check_rights(R_BAN)) return
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
if(!reason)
return
switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel")))
@@ -1045,7 +1045,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(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.
var/speech = tgui_input_text(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
@@ -1463,7 +1463,7 @@
return
if(L.can_centcom_reply())
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", ""))
var/input = sanitize(tgui_input_text(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", ""))
if(!input) return
to_chat(src.owner, "<span class='filter_adminlog'>You sent [input] to [L] via a secure channel.</span>")
@@ -1488,7 +1488,7 @@
to_chat(usr, "<span class='filter_adminlog'>The person you are trying to contact is not wearing a headset</span>")
return
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
var/input = sanitize(tgui_input_text(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
if(!input) return
to_chat(src.owner, "<span class='filter_adminlog'>You sent [input] to [H] via a secure channel.</span>")
@@ -1785,7 +1785,7 @@
src.access_news_network()
else if(href_list["ac_set_channel_name"])
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.admincaster_feed_channel.channel_name = sanitizeSafe(tgui_input_text(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.access_news_network()
else if(href_list["ac_set_channel_lock"])
@@ -1817,11 +1817,11 @@
src.access_news_network()
else if(href_list["ac_set_new_title"])
src.admincaster_feed_message.title = sanitize(input(usr, "Enter the Feed title", "Network Channel Handler", ""))
src.admincaster_feed_message.title = sanitize(tgui_input_text(usr, "Enter the Feed title", "Network Channel Handler", ""))
src.access_news_network()
else if(href_list["ac_set_new_message"])
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "") as message)
src.admincaster_feed_message.body = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", "", multiline = TRUE))
src.access_news_network()
else if(href_list["ac_submit_new_message"])
@@ -1863,7 +1863,7 @@
src.access_news_network()
else if(href_list["ac_set_wanted_name"])
src.admincaster_feed_message.author = sanitize(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.admincaster_feed_message.author = sanitize(tgui_input_text(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.access_news_network()
else if(href_list["ac_set_wanted_desc"])
@@ -1972,7 +1972,7 @@
src.access_news_network()
else if(href_list["ac_set_signature"])
src.admincaster_signature = sanitize(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
src.admincaster_signature = sanitize(tgui_input_text(usr, "Provide your desired signature", "Network Identity Handler", ""))
src.access_news_network()
else if(href_list["populate_inactive_customitems"])