[MIRROR] remove old inputs (#10038)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-01 18:22:56 -07:00
committed by GitHub
parent f3ebea3af1
commit 965f8f4a61
101 changed files with 302 additions and 282 deletions

View File

@@ -27,7 +27,7 @@
* Text sanitization
*/
// Can be used almost the same way as normal input for text
/proc/clean_input(Message, Title, Default, mob/user=usr)
/proc/clean_input(Message, Title, Default, mob/user)
var/txt = input(user, Message, Title, Default) as text | null
if(txt)
return html_encode(txt)

View File

@@ -345,7 +345,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
//newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname)
newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname)
newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname, MAX_NAME_LEN)
if((world.time-time_passed)>3000)
return //took too long
newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.