Merge pull request #3595 from Erthilo/master

Fixes broken gender checks with hair
This commit is contained in:
Mloc
2013-08-27 15:02:40 -07:00
2 changed files with 17 additions and 7 deletions
+8 -4
View File
@@ -4,9 +4,11 @@ proc/random_hair_style(gender, species = "Human")
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(gender != S.gender && S.gender != NEUTER)
if(gender == MALE && S.gender == FEMALE)
continue
if(!(species in S.species_allowed))
if(gender == FEMALE && S.gender == MALE)
continue
if( !(species in S.species_allowed))
continue
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
@@ -21,9 +23,11 @@ proc/random_facial_hair_style(gender, species = "Human")
var/list/valid_facialhairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(gender != S.gender && S.gender != NEUTER)
if(gender == MALE && S.gender == FEMALE)
continue
if(!(species in S.species_allowed))
if(gender == FEMALE && S.gender == MALE)
continue
if( !(species in S.species_allowed))
continue
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+9 -3
View File
@@ -822,7 +822,9 @@ datum/preferences
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(gender != S.gender && S.gender != NEUTER)
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if( !(species in S.species_allowed))
continue
@@ -838,7 +840,9 @@ datum/preferences
var/list/valid_facialhairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(gender != S.gender && S.gender != NEUTER)
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if( !(species in S.species_allowed))
continue
@@ -921,7 +925,9 @@ datum/preferences
var/list/valid_facialhairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(gender != S.gender && S.gender != NEUTER)
if(gender == MALE && S.gender == FEMALE)
continue
if(gender == FEMALE && S.gender == MALE)
continue
if( !(species in S.species_allowed))
continue