diff --git a/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs b/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs index 45d17b2..c2523eb 100644 --- a/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs +++ b/RJWSexperience/RJWSexperience/ExtensionMethods/PawnExtensions.cs @@ -114,20 +114,20 @@ namespace RJWSexperience public static void AddVirginTrait(this Pawn pawn) { - if (pawn.story?.traits != null) + if (pawn.story?.traits == null) + return; + + if (pawn.IsVirgin()) { - if (pawn.IsVirgin()) - { - int degree = 0; - if (pawn.gender == Gender.Female) degree = 2; - Trait virgin = new Trait(VariousDefOf.Virgin, degree, true); - pawn.story.traits.GainTrait(virgin); - } - else if (pawn.gender == Gender.Female && Rand.Chance(0.05f)) - { - Trait virgin = new Trait(VariousDefOf.Virgin, 1, true); - pawn.story.traits.GainTrait(virgin); - } + Virginity.TraitDegree degree = Virginity.TraitDegree.MaleVirgin; + if (pawn.gender == Gender.Female) degree = Virginity.TraitDegree.FemaleVirgin; + Trait virgin = new Trait(VariousDefOf.Virgin, (int)degree, true); + pawn.story.traits.GainTrait(virgin); + } + else if (pawn.gender == Gender.Female && Rand.Chance(0.05f)) + { + Trait virgin = new Trait(VariousDefOf.Virgin, (int)Virginity.TraitDegree.FemaleAfterSurgery, true); + pawn.story.traits.GainTrait(virgin); } } } diff --git a/RJWSexperience/RJWSexperience/Virginity/TraitDegree.cs b/RJWSexperience/RJWSexperience/Virginity/TraitDegree.cs new file mode 100644 index 0000000..6baad93 --- /dev/null +++ b/RJWSexperience/RJWSexperience/Virginity/TraitDegree.cs @@ -0,0 +1,10 @@ +namespace RJWSexperience.Virginity +{ + public enum TraitDegree + { + FemaleDamagedVirgin = -1, + MaleVirgin = 0, + FemaleAfterSurgery = 1, + FemaleVirgin = 2 + } +}