Change TraitDegree into a static class

This commit is contained in:
amevarashi 2022-06-17 18:55:43 +05:00
parent bc3c0aa6cf
commit 81794f752c
3 changed files with 10 additions and 10 deletions

View file

@ -36,10 +36,10 @@ namespace RJWSexperience.Virginity
protected void SurgeryResult(Pawn pawn)
{
TraitDegree degree = TraitDegree.FemaleAfterSurgery;
int degree = TraitDegree.FemaleAfterSurgery;
if (pawn.IsVirgin())
degree = TraitDegree.FemaleVirgin;
Trait virgin = new Trait(VariousDefOf.Virgin, (int)degree, true);
Trait virgin = new Trait(VariousDefOf.Virgin, degree, true);
pawn.story.traits.GainTrait(virgin);
}
}

View file

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

View file

@ -15,14 +15,14 @@ namespace RJWSexperience.Virginity
if (pawn.IsVirgin())
{
TraitDegree degree = TraitDegree.MaleVirgin;
int degree = TraitDegree.MaleVirgin;
if (pawn.gender == Gender.Female) degree = TraitDegree.FemaleVirgin;
Trait virgin = new Trait(VariousDefOf.Virgin, (int)degree, true);
Trait virgin = new Trait(VariousDefOf.Virgin, degree, true);
pawn.story.traits.GainTrait(virgin);
}
else if (pawn.gender == Gender.Female && Rand.Chance(hymenSurgeryChance))
{
Trait virgin = new Trait(VariousDefOf.Virgin, (int)TraitDegree.FemaleAfterSurgery, true);
Trait virgin = new Trait(VariousDefOf.Virgin, TraitDegree.FemaleAfterSurgery, true);
pawn.story.traits.GainTrait(virgin);
}
}