mirror of
https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
synced 2024-08-14 23:57:25 +00:00
relative vaginoplasty and absolute mammoplasty working
This commit is contained in:
parent
9c5e39738c
commit
defb76bb95
18 changed files with 776 additions and 0 deletions
37
Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs
Normal file
37
Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
public class Recipe_Surgery_Vaginoplasty : Recipe_Surgery
|
||||
{
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
{
|
||||
if (pawn.gender != Gender.Female) yield break;
|
||||
|
||||
var part = Genital_Helper.get_genitalsBPR(pawn);
|
||||
if (part != null)
|
||||
{
|
||||
var hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
||||
if (Genital_Helper.has_vagina(pawn, hediffs)) yield return part;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients,
|
||||
Bill bill)
|
||||
{
|
||||
if (billDoer != null)
|
||||
{
|
||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
|
||||
SurgeryResult(pawn);
|
||||
}
|
||||
}
|
||||
|
||||
protected void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina).ForEach(hed => hed.Severity *= 0.75f);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue