mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Rename source folder
This commit is contained in:
parent
0a412a0060
commit
a4c046a841
55 changed files with 0 additions and 0 deletions
39
Source/RJWSexperience/Virginity/Recipe_HymenSurgery.cs
Normal file
39
Source/RJWSexperience/Virginity/Recipe_HymenSurgery.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Virginity
|
||||
{
|
||||
public class Recipe_HymenSurgery : Recipe_Surgery
|
||||
{
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
{
|
||||
if (pawn.gender != Gender.Female)
|
||||
yield break;
|
||||
|
||||
BodyPartRecord part = Genital_Helper.get_genitalsBPR(pawn);
|
||||
if (part == null)
|
||||
yield break;
|
||||
|
||||
List<Hediff> hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
||||
if (Genital_Helper.has_vagina(pawn, hediffs) && !HasHymen(pawn))
|
||||
yield return part;
|
||||
}
|
||||
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
|
||||
{
|
||||
if (billDoer == null)
|
||||
return;
|
||||
|
||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
|
||||
{
|
||||
billDoer,
|
||||
pawn
|
||||
});
|
||||
TraitHandler.AddVirginTrait(pawn);
|
||||
}
|
||||
|
||||
private static bool HasHymen(Pawn pawn) => pawn.story?.traits?.GetTrait(VariousDefOf.Virgin)?.Degree > 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue