Refacor PawnExtensions.PoptheCherry

This commit is contained in:
amevarashi 2022-06-18 10:27:03 +05:00
parent 6c8f14020e
commit 650d61832f
1 changed files with 5 additions and 12 deletions

View File

@ -81,24 +81,17 @@ namespace RJWSexperience
if (props?.sexType != xxx.rjwSextype.Vaginal) if (props?.sexType != xxx.rjwSextype.Vaginal)
return; return;
int? removedDegree = Virginity.TraitHandler.RemoveVirginTrait(pawn);
if (pawn.IsVirgin()) if (pawn.IsVirgin())
{ {
pawn.TryGetComp<SexHistory.SexHistoryComp>()?.RecordFirst(partner, props); pawn.TryGetComp<SexHistory.SexHistoryComp>()?.RecordFirst(partner, props);
int? removedDegree = Virginity.TraitHandler.RemoveVirginTrait(pawn);
if (removedDegree != null) if (removedDegree != null)
{
RJWUtility.ThrowVirginHIstoryEvent(pawn, partner, props, (int)removedDegree);
Messages.Message(Keyed.RS_LostVirgin(pawn.LabelShort, partner.LabelShort), MessageTypeDefOf.NeutralEvent, true); Messages.Message(Keyed.RS_LostVirgin(pawn.LabelShort, partner.LabelShort), MessageTypeDefOf.NeutralEvent, true);
}
}
else
{
int? removedDegree = Virginity.TraitHandler.RemoveVirginTrait(pawn);
if (removedDegree != null)
{
RJWUtility.ThrowVirginHIstoryEvent(pawn, partner, props, (int)removedDegree);
}
} }
if (removedDegree != null)
RJWUtility.ThrowVirginHIstoryEvent(pawn, partner, props, (int)removedDegree);
} }
} }
} }