Constify minimum and maximum player ages.

This commit is contained in:
Phil Bordelon
2012-05-01 18:33:47 -05:00
parent 77b3a2bf68
commit f0de6ac13f
3 changed files with 11 additions and 7 deletions
+4 -4
View File
@@ -634,11 +634,11 @@ datum/preferences
if(link_tags["age"])
switch(link_tags["age"])
if("input")
var/new_age = input(user, "Please select type in age: 20-65", "Character Generation") as num
var/new_age = input(user, "Please enter an age ([minimum_age]-[maximum_age])", "Character Generation") as num
if(new_age)
age = max(min(round(text2num(new_age)), 65), 20)
age = max(min(round(text2num(new_age)), maximum_age), minimum_age)
if("random")
age = rand (20, 45)
age = rand (minimum_age, maximum_age)
if(link_tags["b_type"])
switch(link_tags["b_type"])
@@ -1012,4 +1012,4 @@ datum/preferences
character.disabilities = disabilities
#undef UI_OLD
#undef UI_NEW
#undef UI_NEW
@@ -15,7 +15,7 @@ datum/preferences
underwear = 1
backbag = 2
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
age = rand(20,65)
age = rand(minimum_age, maximum_age)
copy_to(H,1)
proc/randomize_name()
@@ -263,4 +263,4 @@ datum/preferences
if(H.name == f_style)
facial_hair_style = H
else
del(H)
del(H)