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
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4942.0.1.1")]
|
||||
[assembly: AssemblyFileVersion("4942.0.1.1")]
|
||||
[assembly: AssemblyVersion("4942.0.1.2")]
|
||||
[assembly: AssemblyFileVersion("4942.0.1.2")]
|
|
@ -68,6 +68,7 @@
|
|||
<Compile Include="Mod.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Recipe_Surgery_Mammoplasty.cs" />
|
||||
<Compile Include="Recipe_Surgery_Sphinctoplasty.cs" />
|
||||
<Compile Include="Recipe_Surgery_Vaginoplasty.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -80,6 +81,9 @@
|
|||
<Content Include="..\..\Defs\Recipe_Surgery\Recipes_Surgery_Mammoplasty.xml">
|
||||
<Link>Defs\Recipe_Surgery\Recipes_Surgery_Mammoplasty.xml</Link>
|
||||
</Content>
|
||||
<Content Include="..\..\Defs\Recipe_Surgery\Recipes_Surgery_Sphinctoplasty.xml">
|
||||
<Link>Defs\Recipe_Surgery\Recipes_Surgery_Sphinctoplasty.xml</Link>
|
||||
</Content>
|
||||
<Content Include="..\..\Defs\Recipe_Surgery\Recipes_Surgery_Vaginoplasty.xml">
|
||||
<Link>Defs\Recipe_Surgery\Recipes_Surgery_Vaginoplasty.xml</Link>
|
||||
</Content>
|
||||
|
|
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +1,14 @@
|
|||
using RimWorld;
|
||||
using System;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dyspareunia;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
public class Recipe_Surgery_Vaginoplasty : Recipe_Surgery
|
||||
public abstract class Recipe_Surgery_Vaginoplasty : Recipe_Surgery
|
||||
{
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
{
|
||||
|
@ -20,6 +22,7 @@ namespace RJW_PlasticSurgeries
|
|||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients,
|
||||
Bill bill)
|
||||
{
|
||||
|
@ -30,13 +33,62 @@ namespace RJW_PlasticSurgeries
|
|||
}
|
||||
}
|
||||
|
||||
protected void SurgeryResult(Pawn pawn)
|
||||
public abstract void SurgeryResult(Pawn pawn);
|
||||
|
||||
protected void SurgeryX(Pawn pawn, float severity)
|
||||
{
|
||||
pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina).ForEach(hed =>
|
||||
{
|
||||
hed.Severity *= 0.75f;
|
||||
PenetrationUtility.AddDamageHediff(Dyspareunia.DamageDefOf.SexStretch, 0.5f, hed, null);
|
||||
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_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Tight : Recipe_Surgery_Vaginoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Average : Recipe_Surgery_Vaginoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Accomodating : Recipe_Surgery_Vaginoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.7f);
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Cavernous : Recipe_Surgery_Vaginoplasty
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.9f);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue