Virgin trait degree enum

This commit is contained in:
amevarashi 2022-06-12 09:20:12 +05:00
parent 77ddd1da33
commit 518e683dd4
2 changed files with 23 additions and 13 deletions

View file

@ -114,20 +114,20 @@ namespace RJWSexperience
public static void AddVirginTrait(this Pawn pawn) public static void AddVirginTrait(this Pawn pawn)
{ {
if (pawn.story?.traits != null) if (pawn.story?.traits == null)
return;
if (pawn.IsVirgin())
{ {
if (pawn.IsVirgin()) Virginity.TraitDegree degree = Virginity.TraitDegree.MaleVirgin;
{ if (pawn.gender == Gender.Female) degree = Virginity.TraitDegree.FemaleVirgin;
int degree = 0; Trait virgin = new Trait(VariousDefOf.Virgin, (int)degree, true);
if (pawn.gender == Gender.Female) degree = 2; pawn.story.traits.GainTrait(virgin);
Trait virgin = new Trait(VariousDefOf.Virgin, degree, true); }
pawn.story.traits.GainTrait(virgin); else if (pawn.gender == Gender.Female && Rand.Chance(0.05f))
} {
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);
Trait virgin = new Trait(VariousDefOf.Virgin, 1, true);
pawn.story.traits.GainTrait(virgin);
}
} }
} }
} }

View file

@ -0,0 +1,10 @@
namespace RJWSexperience.Virginity
{
public enum TraitDegree
{
FemaleDamagedVirgin = -1,
MaleVirgin = 0,
FemaleAfterSurgery = 1,
FemaleVirgin = 2
}
}