Preference edits (#473)

Makes several lorefriendly changes to chargen.
Permits numbers in chargen naming for the benefit of IPCs.
Permits chargen fluff to be viewed via employment record consoles and ID cards.
This commit is contained in:
LordFowl
2016-06-30 02:35:20 +03:00
committed by skull132
parent 7cc197c8ee
commit 1cfb3086de
10 changed files with 119 additions and 21 deletions
+23 -3
View File
@@ -165,6 +165,26 @@ datum/preferences
ZeroSkills(1)
/datum/preferences/proc/getMinAge(var/age_min)
if(species == "Vaurca" || species == "Machine" || species == "Diona")
age_min = 1
if(species == "Human" || species == "Skrell" || species == "Tajara" || species == "Unathi")
age_min = 17
return age_min
/datum/preferences/proc/getMaxAge(var/age_max)
if(species == "Vaurca")
age_max = 20
if(species == "Machine")
age_max = 30
if(species == "Skrell" || species == "Diona")
age_max = 500
if(species == "Human")
age_max = 120
if(species == "Tajara" || species == "Unathi")
age_max = 85
return age_max
/datum/preferences/proc/ZeroSkills(var/forced = 0)
for(var/V in SKILLS) for(var/datum/skill/S in SKILLS[V])
if(!skills.Find(S.ID) || forced)
@@ -1195,7 +1215,7 @@ datum/preferences
if("name")
real_name = random_name(gender,species)
if("age")
age = rand(AGE_MIN, AGE_MAX)
age = rand(getMinAge(), getMaxAge())
if("hair")
r_hair = rand(0,255)
g_hair = rand(0,255)
@@ -1244,9 +1264,9 @@ datum/preferences
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
var/new_age = input(user, "Choose your character's age:\n([getMinAge()]-[getMaxAge()])", "Character Preference") as num|null
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
age = max(min( round(text2num(new_age)), getMaxAge()),getMinAge())
if("species")
user << browse(null, "window=species")
+21 -9
View File
@@ -13,19 +13,25 @@ var/global/list/seen_religions = list()
return
var/global/list/citizenship_choices = list(
"Earth",
"Mars",
"Moghes",
"Ahdomai",
"Qerrbalak"
"Sol Alliance",
"Republic of Biesel",
"Republic of Elyra",
"Eridani Federation",
"Jargon Federation",
"People's Republic of Adhomai",
"Izweski Hegemony",
"Zo'ra Hive",
"K'lax Hive",
)
var/global/list/home_system_choices = list(
"Sol",
"Nyx",
"Tau Ceti",
"Epsilon Ursae Minoris",
"S'randarr"
"New Ankara",
"Epsilon Eridani",
"Jargon",
"S'rand'marr ",
"Uueoa-Esa"
)
var/global/list/faction_choices = list(
@@ -49,5 +55,11 @@ var/global/list/religion_choices = list(
"Islamic",
"Christian",
"Agnostic",
"Deist"
"Deist",
"Qeblak",
"Weishii",
"S'rendarr & Messa",
"Ma'ta'ke",
"Th'akh",
"Sk'akh"
)
+1 -1
View File
@@ -209,7 +209,7 @@
if(!real_name) real_name = random_name(gender)
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
age = sanitize_integer(age, getMinAge(), getMaxAge(), initial(age))
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
+1 -1
View File
@@ -321,7 +321,7 @@
if (!real_name) real_name = random_name(gender)
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
age = sanitize_integer(age, getMinAge(), getMaxAge(), initial(age))
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))