Merge tag 'optional_Dyspareunia' into develop

4945.0.1.5 optional_Dyspareunia
This commit is contained in:
Stardust3D 2022-02-03 02:26:35 +01:00
commit 52dcd049a8
7 changed files with 22 additions and 16 deletions

View File

@ -2,5 +2,5 @@
<Manifest>
<identifier>RJW PlasticSurgeries</identifier>
<version>4943.0.1.4</version>
<version>4945.0.1.5</version>
</Manifest>

Binary file not shown.

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("4943.0.1.5")]
[assembly: AssemblyFileVersion("4943.0.1.5")]
[assembly: AssemblyVersion("4945.0.1.5")]
[assembly: AssemblyFileVersion("4945.0.1.5")]

View File

@ -10,6 +10,8 @@ namespace RJW_PlasticSurgeries
{
public abstract class Recipe_Surgery_Sphinctoplasty : Recipe_Surgery
{
private readonly bool hasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
{
var part = Genital_Helper.get_anusBPR(pawn);
@ -38,16 +40,17 @@ namespace RJW_PlasticSurgeries
pawn.GetAnusList().ForEach(hed =>
{
hed.Severity = severity;
try
if (hasDyspareunia)
{
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
catch (Exception e)
{
Log.Error("Try enabling Dyspareunia for sore genitals");
DamageHediff(hed);
}
});
}
private static void DamageHediff(Hediff hed)
{
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
}
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty

View File

@ -10,6 +10,8 @@ namespace RJW_PlasticSurgeries
{
public abstract class Recipe_Surgery_Vaginoplasty : Recipe_Surgery
{
private readonly bool hasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
{
var part = Genital_Helper.get_genitalsBPR(pawn);
@ -38,16 +40,17 @@ namespace RJW_PlasticSurgeries
pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina).ForEach(hed =>
{
hed.Severity = severity;
try
if (hasDyspareunia)
{
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
catch (Exception e)
{
Log.Error("Try enabling Dyspareunia for sore genitals");
DamageHediff(hed);
}
});
}
private static void DamageHediff(Hediff hed)
{
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
}
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty

View File

@ -11,7 +11,7 @@ plugins {
//id("com.ullink.nunit") version "1.12"
}
version = "4943.0.1.5"
version = "4945.0.1.5"
val friendlyName = "rjw-plasticsurgeries"
tasks.register<com.ullink.Msbuild>("buildC#") {