mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Fixes invalid name error showing up when cancelling the input (#39781)
The 'invalid name' message won't appear now if the user cancels it when changing his name on the character setup window
This commit is contained in:
@@ -1102,11 +1102,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
ghost_others = GHOST_OTHERS_SIMPLE
|
||||
|
||||
if("name")
|
||||
var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null )
|
||||
var/new_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
new_name = reject_bad_name(new_name)
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("age")
|
||||
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
|
||||
|
||||
Reference in New Issue
Block a user