mirror of
https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
synced 2024-08-14 23:57:25 +00:00
added sphinctoplasties
This commit is contained in:
parent
05caabf067
commit
4d175395e6
10 changed files with 280 additions and 10 deletions
93
Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs
Normal file
93
Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using Dyspareunia;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
public abstract class Recipe_Surgery_Sphinctoplasty : Recipe_Surgery
|
||||
{
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
{
|
||||
if (pawn.gender != Gender.Female) yield break;
|
||||
|
||||
var part = Genital_Helper.get_anusBPR(pawn);
|
||||
if (part != null)
|
||||
{
|
||||
var hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
||||
if (Genital_Helper.has_anus(pawn, hediffs)) yield return part;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void SurgeryResult(Pawn pawn);
|
||||
|
||||
protected void SurgeryX(Pawn pawn, float severity)
|
||||
{
|
||||
pawn.GetAnusList().ForEach(hed =>
|
||||
{
|
||||
hed.Severity = severity;
|
||||
try
|
||||
{
|
||||
PenetrationUtility.AddDamageHediff(Dyspareunia.DamageDefOf.SexStretch, 0.5f, hed, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("Try enabling Dyspareunia for sore genitals");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Tight : Recipe_Surgery_Sphinctoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Average : Recipe_Surgery_Sphinctoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Accomodating : Recipe_Surgery_Sphinctoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.7f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Cavernous : Recipe_Surgery_Sphinctoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.9f);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue