mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Fixes being able to have alien species hair on humans or other species.
This commit is contained in:
@@ -1,14 +1,41 @@
|
|||||||
proc/random_hair_style(gender, species = "Human")
|
proc/random_hair_style(gender, species = "Human")
|
||||||
switch(gender)
|
var/h_style = "Bald"
|
||||||
if(MALE) return pick(hair_styles_male_list)
|
|
||||||
if(FEMALE) return pick(hair_styles_female_list)
|
var/list/valid_hairstyles = list()
|
||||||
else return pick(hair_styles_list)
|
for(var/hairstyle in hair_styles_list)
|
||||||
|
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
|
||||||
|
if(gender == MALE && S.gender == FEMALE)
|
||||||
|
continue
|
||||||
|
if(gender == FEMALE && S.gender == MALE)
|
||||||
|
continue
|
||||||
|
if( !(species in S.species_allowed))
|
||||||
|
continue
|
||||||
|
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
|
||||||
|
|
||||||
|
if(valid_hairstyles.len)
|
||||||
|
h_style = pick(valid_hairstyles)
|
||||||
|
|
||||||
|
return h_style
|
||||||
|
|
||||||
proc/random_facial_hair_style(gender, species = "Human")
|
proc/random_facial_hair_style(gender, species = "Human")
|
||||||
switch(gender)
|
var/f_style = "Shaved"
|
||||||
if(MALE) return pick(facial_hair_styles_male_list)
|
|
||||||
if(FEMALE) return pick(facial_hair_styles_female_list)
|
var/list/valid_facialhairstyles = list()
|
||||||
else return pick(facial_hair_styles_list)
|
for(var/facialhairstyle in facial_hair_styles_list)
|
||||||
|
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
|
||||||
|
if(gender == MALE && S.gender == FEMALE)
|
||||||
|
continue
|
||||||
|
if(gender == FEMALE && S.gender == MALE)
|
||||||
|
continue
|
||||||
|
if( !(species in S.species_allowed))
|
||||||
|
continue
|
||||||
|
|
||||||
|
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
|
||||||
|
|
||||||
|
if(valid_facialhairstyles.len)
|
||||||
|
f_style = pick(valid_facialhairstyles)
|
||||||
|
|
||||||
|
return f_style
|
||||||
|
|
||||||
proc/random_name(gender, species = "Human")
|
proc/random_name(gender, species = "Human")
|
||||||
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||||
|
|||||||
@@ -764,13 +764,13 @@ datum/preferences
|
|||||||
g_hair = rand(0,255)
|
g_hair = rand(0,255)
|
||||||
b_hair = rand(0,255)
|
b_hair = rand(0,255)
|
||||||
if("h_style")
|
if("h_style")
|
||||||
h_style = random_hair_style(gender)
|
h_style = random_hair_style(gender, species)
|
||||||
if("facial")
|
if("facial")
|
||||||
r_facial = rand(0,255)
|
r_facial = rand(0,255)
|
||||||
g_facial = rand(0,255)
|
g_facial = rand(0,255)
|
||||||
b_facial = rand(0,255)
|
b_facial = rand(0,255)
|
||||||
if("f_style")
|
if("f_style")
|
||||||
f_style = random_facial_hair_style(gender)
|
f_style = random_facial_hair_style(gender, species)
|
||||||
if("underwear")
|
if("underwear")
|
||||||
underwear = rand(1,underwear_m.len)
|
underwear = rand(1,underwear_m.len)
|
||||||
ShowChoices(user)
|
ShowChoices(user)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ datum/preferences
|
|||||||
else
|
else
|
||||||
gender = FEMALE
|
gender = FEMALE
|
||||||
s_tone = random_skin_tone()
|
s_tone = random_skin_tone()
|
||||||
h_style = random_hair_style(gender)
|
h_style = random_hair_style(gender, species)
|
||||||
f_style = random_facial_hair_style(gender)
|
f_style = random_facial_hair_style(gender, species)
|
||||||
randomize_hair_color("hair")
|
randomize_hair_color("hair")
|
||||||
randomize_hair_color("facial")
|
randomize_hair_color("facial")
|
||||||
randomize_eyes_color()
|
randomize_eyes_color()
|
||||||
|
|||||||
Reference in New Issue
Block a user