Separate max age from max age input

The maximum character age a user can manually input is now defined by AGE_MAX_INPUT instead of AGE_MAX. These values are identical by default.

Also reverts the change to dialog box text.
This commit is contained in:
Darius
2022-12-09 08:00:19 -05:00
parent 7321d42ea5
commit f5cf485321
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -1746,9 +1746,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
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(Minimum: [AGE_MIN])", "Character Preference") as num|null
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX_INPUT])", "Character Preference") as num|null
if(new_age)
age = max(min( round(text2num(new_age)), SHORT_REAL_LIMIT),AGE_MIN)
age = max(min( round(text2num(new_age)), AGE_MAX_INPUT),AGE_MIN)
if("security_records")
var/rec = stripped_multiline_input(usr, "Set your security record note section. This should be IC!", "Security Records", html_decode(security_records), MAX_FLAVOR_LEN, TRUE)