Sex restriction for markings (#19894)

* Add sex restriction to markings

* Apply to existing systems
This commit is contained in:
Morb
2023-09-19 23:56:10 +03:00
committed by GitHub
parent 1b2fd313a0
commit 835bde4c6e
13 changed files with 169 additions and 20 deletions

View File

@@ -170,11 +170,11 @@ public sealed class HumanoidAppearanceSystem : SharedHumanoidAppearanceSystem
var facialHair = new Marking(profile.Appearance.FacialHairStyleId,
new[] { facialHairColor });
if (_markingManager.CanBeApplied(profile.Species, hair, _prototypeManager))
if (_markingManager.CanBeApplied(profile.Species, profile.Sex, hair, _prototypeManager))
{
markings.AddBack(MarkingCategories.Hair, hair);
}
if (_markingManager.CanBeApplied(profile.Species, facialHair, _prototypeManager))
if (_markingManager.CanBeApplied(profile.Species, profile.Sex, facialHair, _prototypeManager))
{
markings.AddBack(MarkingCategories.FacialHair, facialHair);
}
@@ -192,6 +192,7 @@ public sealed class HumanoidAppearanceSystem : SharedHumanoidAppearanceSystem
}
markings.EnsureSpecies(profile.Species, profile.Appearance.SkinColor, _markingManager, _prototypeManager);
markings.EnsureSexes(profile.Sex, _markingManager);
markings.EnsureDefault(
profile.Appearance.SkinColor,
profile.Appearance.EyeColor,