2021-12-30 20:56:09 +00:00
|
|
|
|
using System;
|
2021-12-29 19:54:45 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-12-29 19:55:19 +00:00
|
|
|
|
using Dyspareunia;
|
2022-01-15 02:57:37 +00:00
|
|
|
|
using RimWorld;
|
|
|
|
|
using rjw;
|
2021-12-29 18:50:44 +00:00
|
|
|
|
using Verse;
|
2022-01-15 02:57:37 +00:00
|
|
|
|
using DamageDefOf = Dyspareunia.DamageDefOf;
|
2021-12-29 18:50:44 +00:00
|
|
|
|
|
|
|
|
|
namespace RJW_PlasticSurgeries
|
|
|
|
|
{
|
2021-12-30 20:56:09 +00:00
|
|
|
|
public abstract class Recipe_Surgery_Vaginoplasty : Recipe_Surgery
|
2021-12-29 18:50:44 +00:00
|
|
|
|
{
|
|
|
|
|
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-30 20:56:09 +00:00
|
|
|
|
/// <inheritdoc />
|
2021-12-29 18:50:44 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-30 20:56:09 +00:00
|
|
|
|
public abstract void SurgeryResult(Pawn pawn);
|
|
|
|
|
|
|
|
|
|
protected void SurgeryX(Pawn pawn, float severity)
|
2021-12-29 18:50:44 +00:00
|
|
|
|
{
|
2021-12-29 19:55:19 +00:00
|
|
|
|
pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina).ForEach(hed =>
|
|
|
|
|
{
|
2021-12-30 20:56:09 +00:00
|
|
|
|
hed.Severity = severity;
|
|
|
|
|
try
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
Log.Error("Try enabling Dyspareunia for sore genitals");
|
|
|
|
|
}
|
2021-12-29 19:55:19 +00:00
|
|
|
|
});
|
2021-12-29 18:50:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-30 20:56:09 +00:00
|
|
|
|
|
|
|
|
|
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 0.1f);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Recipe_Surgery_Vaginoplasty_Tight : Recipe_Surgery_Vaginoplasty
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 0.3f);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Recipe_Surgery_Vaginoplasty_Average : Recipe_Surgery_Vaginoplasty
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 0.5f);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Recipe_Surgery_Vaginoplasty_Accomodating : Recipe_Surgery_Vaginoplasty
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 0.7f);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Recipe_Surgery_Vaginoplasty_Cavernous : Recipe_Surgery_Vaginoplasty
|
|
|
|
|
{
|
2022-01-15 02:57:37 +00:00
|
|
|
|
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 0.9f);
|
2021-12-30 20:56:09 +00:00
|
|
|
|
}
|
2021-12-29 18:50:44 +00:00
|
|
|
|
}
|