mirror of
https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
synced 2024-08-14 23:57:25 +00:00
small fix to avoid System.TypeLoadException when Licentia is not present
This commit is contained in:
parent
cdf14f0d7a
commit
d998151749
4 changed files with 36 additions and 12 deletions
|
@ -7,7 +7,7 @@ namespace RJW_PlasticSurgeries
|
|||
{
|
||||
public abstract class Recipe_Plastic_Surgery : Recipe_Surgery
|
||||
{
|
||||
protected readonly bool HasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
|
||||
protected readonly bool HasDyspareunia = false; // ModLister.HasActiveModWithName("Dyspareunia");
|
||||
protected readonly bool HasLicentia = ModLister.HasActiveModWithName("RimJobWorld - Licentia Labs");
|
||||
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -23,8 +24,15 @@ namespace RJW_PlasticSurgeries
|
|||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -21,9 +22,16 @@ namespace RJW_PlasticSurgeries
|
|||
{
|
||||
return pawn.GetAnusList();
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -21,9 +22,16 @@ namespace RJW_PlasticSurgeries
|
|||
{
|
||||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
||||
|
|
Loading…
Reference in a new issue