Adds mutant races to the character preferences. It can only choose between lizard and human right now.

Adds a new server configuration to toggle on and off the mutant races preferences. If it's off, everyone will be human.
This commit is contained in:
Aranclanos
2014-04-11 21:10:27 -03:00
parent 556d137526
commit 2da47fbb79
7 changed files with 33 additions and 5 deletions
+12
View File
@@ -53,6 +53,7 @@ datum/preferences
var/facial_hair_color = "000" //Facial hair color
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
var/mutant_race = "human" //Mutant race
//Mob preview
var/icon/preview_icon_front = null
@@ -163,6 +164,10 @@ datum/preferences
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
if(config.mutant_races)
dat += "<b>Mutant Race:</b><BR><a href='?_src_=prefs;preference=mutant_race;task=input'>[mutant_race]</a><BR>"
else
dat += "<b>Mutant Race:</b> human<BR>"
dat += "<b>Blood Type:</b> [blood_type]<BR>"
dat += "<b>Skin Tone:</b><BR><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
@@ -612,6 +617,11 @@ datum/preferences
if(new_eyes)
eye_color = sanitize_hexcolor(new_eyes)
if("mutant_race")
var/new_mutant_race = input(user, "Choose your character's mutant race:", "Character Preference") as null|anything in mutant_races
if(new_mutant_race)
mutant_race = new_mutant_race
if("s_tone")
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
if(new_s_tone)
@@ -712,6 +722,8 @@ datum/preferences
character.name = character.real_name
if(character.dna)
character.dna.real_name = character.real_name
if(mutant_race != "human" && config.mutant_races)
character.dna.mutantrace = mutant_race
character.gender = gender
character.age = age
@@ -165,6 +165,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] >> facial_hair_style
S["underwear"] >> underwear
S["backbag"] >> backbag
S["mutant_race"] >> mutant_race
//Jobs
S["userandomjob"] >> userandomjob
@@ -202,6 +203,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
eye_color = sanitize_hexcolor(eye_color, 3, 0)
skin_tone = sanitize_inlist(skin_tone, skin_tones)
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
mutant_race = sanitize_text(mutant_race, initial(mutant_race))
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
@@ -238,6 +240,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] << facial_hair_style
S["underwear"] << underwear
S["backbag"] << backbag
S["mutant_race"] << mutant_race
//Jobs
S["userandomjob"] << userandomjob