Fixes hair style choices not checking for gender restrictions (#11068)

This commit is contained in:
Alberyk
2021-01-28 14:41:58 -03:00
committed by GitHub
parent 27158091a1
commit 15c1dc743e
3 changed files with 12 additions and 2 deletions

View File

@@ -444,6 +444,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(pref.gender == MALE && S.gender == FEMALE)
continue
if(pref.gender == FEMALE && S.gender == MALE)
continue
if(!(mob_species.type in S.species_allowed))
continue

View File

@@ -209,7 +209,7 @@
if(!length(valid_species))
valid_species = owner.generate_valid_species(check_whitelist, whitelist, blacklist)
if(!length(valid_hairstyles) || !length(valid_facial_hairstyles))
valid_hairstyles = owner.generate_valid_hairstyles(check_gender = 0)
valid_hairstyles = owner.generate_valid_hairstyles(check_gender = 1)
valid_facial_hairstyles = owner.generate_valid_facial_hairstyles()
if(!length(valid_accents))
valid_accents = owner.generate_valid_accent()

View File

@@ -0,0 +1,6 @@
author: Alberyk
delete-after: True
changes:
- bugfix: "Fixed hair style choices not checking for gender restrictions."