mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] remove old inputs (#10038)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f3ebea3af1
commit
965f8f4a61
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user