Sex restriction for markings (#19894)
* Add sex restriction to markings * Apply to existing systems
This commit is contained in:
@@ -254,6 +254,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
|
||||
var oldSex = humanoid.Sex;
|
||||
humanoid.Sex = sex;
|
||||
humanoid.MarkingSet.EnsureSexes(sex, _markingManager);
|
||||
RaiseLocalEvent(uid, new SexChangedEvent(oldSex, sex));
|
||||
|
||||
if (sync)
|
||||
@@ -308,13 +309,13 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
? profile.Appearance.SkinColor.WithAlpha(facialHairAlpha) : profile.Appearance.FacialHairColor;
|
||||
|
||||
if (_markingManager.Markings.TryGetValue(profile.Appearance.HairStyleId, out var hairPrototype) &&
|
||||
_markingManager.CanBeApplied(profile.Species, hairPrototype, _prototypeManager))
|
||||
_markingManager.CanBeApplied(profile.Species, profile.Sex, hairPrototype, _prototypeManager))
|
||||
{
|
||||
AddMarking(uid, profile.Appearance.HairStyleId, hairColor, false);
|
||||
}
|
||||
|
||||
if (_markingManager.Markings.TryGetValue(profile.Appearance.FacialHairStyleId, out var facialHairPrototype) &&
|
||||
_markingManager.CanBeApplied(profile.Species, facialHairPrototype, _prototypeManager))
|
||||
_markingManager.CanBeApplied(profile.Species, profile.Sex, facialHairPrototype, _prototypeManager))
|
||||
{
|
||||
AddMarking(uid, profile.Appearance.FacialHairStyleId, facialHairColor, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user