added sphinctoplasties

This commit is contained in:
Stardust3D 2021-12-30 21:56:09 +01:00
parent 05caabf067
commit 4d175395e6
10 changed files with 280 additions and 10 deletions

View File

@ -2,5 +2,5 @@
<Manifest>
<identifier>RJW PlasticSurgeries</identifier>
<version>4942.0.1.1</version>
<version>4942.0.1.2</version>
</Manifest>

Binary file not shown.

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>RJW_PlasticSurgeries</name>
</assembly>
<members>
<member name="M:RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty.ApplyOnPawn(Verse.Pawn,Verse.BodyPartRecord,Verse.Pawn,System.Collections.Generic.List{Verse.Thing},RimWorld.Bill)">
<inheritdoc />
</member>
<member name="M:RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty.ApplyOnPawn(Verse.Pawn,Verse.BodyPartRecord,Verse.Pawn,System.Collections.Generic.List{Verse.Thing},RimWorld.Bill)">
<inheritdoc />
</member>
</members>
</doc>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<RecipeDef Name="Surgery_Sphinctoplasty_X" Abstract="True">
<defName>Surgery_Sphinctoplasty</defName>
<label>sphinctoplasty</label>
<description>Surgically tightens the pawn's Sphincter by 25%.</description>
<!--<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty</workerClass>-->
<jobString>tightening Sphincter</jobString>
<effectWorking>Surgery</effectWorking>
<soundWorking>Recipe_Surgery</soundWorking>
<workSpeedStat>MedicalOperationSpeed</workSpeedStat>
<workSkill>Medicine</workSkill>
<workSkillLearnFactor>0.2</workSkillLearnFactor>
<workAmount>400</workAmount>
<anesthetize>true</anesthetize>
<recipeUsers>
<li>Human</li>
</recipeUsers>
<surgerySuccessChanceFactor>95</surgerySuccessChanceFactor>
<ingredients>
<li>
<filter>
<categories>
<li>Medicine</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Medicine</li>
</categories>
</fixedIngredientFilter>
</RecipeDef>
<RecipeDef ParentName="Surgery_Sphinctoplasty_X">
<defName>Surgery_Sphinctoplasty_Micro</defName>
<label>sphinctoplasty (micro)</label>
<description>Surgically gives the pawn an micro Sphincter.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Micro</workerClass>
<jobString>alter Sphincter size to micro</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Sphinctoplasty_X">
<defName>Surgery_Sphinctoplasty_Tight</defName>
<label>sphinctoplasty (tight)</label>
<description>Surgically gives the pawn an tight Sphincter.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Tight</workerClass>
<jobString>alter Sphincter size to tight</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Sphinctoplasty_X">
<defName>Surgery_Sphinctoplasty_Average</defName>
<label>sphinctoplasty (average)</label>
<description>Surgically gives the pawn an average Sphincter.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Average</workerClass>
<jobString>alter Sphincter size to average</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Sphinctoplasty_X">
<defName>Surgery_Sphinctoplasty_Accomodating</defName>
<label>sphinctoplasty (accomodating)</label>
<description>Surgically gives the pawn an accomodating Sphincter.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Accomodating</workerClass>
<jobString>alter Sphincter size to accomodating</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Sphinctoplasty_X">
<defName>Surgery_Sphinctoplasty_Cavernous</defName>
<label>sphinctoplasty (cavernous)</label>
<description>Surgically gives the pawn an cavernous Sphincter.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Cavernous</workerClass>
<jobString>alter Sphincter size to cavernous</jobString>
</RecipeDef>
</Defs>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<RecipeDef>
<RecipeDef Name="Surgery_Vaginoplasty_X" Abstract="True">
<defName>Surgery_Vaginoplasty</defName>
<label>vaginoplasty</label>
<description>Surgically tightens the pawn's Vagina by 25%.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty</workerClass>
<!--<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty</workerClass>-->
<jobString>tightening Vagina</jobString>
<effectWorking>Surgery</effectWorking>
<soundWorking>Recipe_Surgery</soundWorking>
@ -34,4 +34,39 @@
</categories>
</fixedIngredientFilter>
</RecipeDef>
<RecipeDef ParentName="Surgery_Vaginoplasty_X">
<defName>Surgery_Vaginoplasty_Micro</defName>
<label>vaginoplasty (micro)</label>
<description>Surgically gives the pawn an micro Vagina.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Micro</workerClass>
<jobString>alter Vagina size to micro</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Vaginoplasty_X">
<defName>Surgery_Vaginoplasty_Tight</defName>
<label>vaginoplasty (tight)</label>
<description>Surgically gives the pawn an tight Vagina.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Tight</workerClass>
<jobString>alter Vagina size to tight</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Vaginoplasty_X">
<defName>Surgery_Vaginoplasty_Average</defName>
<label>vaginoplasty (average)</label>
<description>Surgically gives the pawn an average Vagina.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Average</workerClass>
<jobString>alter Vagina size to average</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Vaginoplasty_X">
<defName>Surgery_Vaginoplasty_Accomodating</defName>
<label>vaginoplasty (accomodating)</label>
<description>Surgically gives the pawn an accomodating Vagina.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Accomodating</workerClass>
<jobString>alter Vagina size to accomodating</jobString>
</RecipeDef>
<RecipeDef ParentName="Surgery_Vaginoplasty_X">
<defName>Surgery_Vaginoplasty_Cavernous</defName>
<label>vaginoplasty (cavernous)</label>
<description>Surgically gives the pawn an cavernous Vagina.</description>
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Cavernous</workerClass>
<jobString>alter Vagina size to cavernous</jobString>
</RecipeDef>
</Defs>

View File

@ -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")]

View File

@ -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>

View 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);
}
}
}

View File

@ -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);
}
}
}