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
06e09762a4
commit
086b2e155e
4 changed files with 36 additions and 12 deletions
|
@ -7,7 +7,7 @@ namespace RJW_PlasticSurgeries
|
||||||
{
|
{
|
||||||
public abstract class Recipe_Plastic_Surgery : Recipe_Surgery
|
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");
|
protected readonly bool HasLicentia = ModLister.HasActiveModWithName("RimJobWorld - Licentia Labs");
|
||||||
|
|
||||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
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 LicentiaLabs;
|
||||||
using rjw;
|
using rjw;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -23,8 +24,15 @@ namespace RJW_PlasticSurgeries
|
||||||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
|
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
protected override (HediffDef, float) GetLicentiaDamage()
|
||||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
{
|
||||||
|
if (HasLicentia)
|
||||||
|
{
|
||||||
|
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty
|
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 LicentiaLabs;
|
||||||
using rjw;
|
using rjw;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -22,8 +23,15 @@ namespace RJW_PlasticSurgeries
|
||||||
return pawn.GetAnusList();
|
return pawn.GetAnusList();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
protected override (HediffDef, float) GetLicentiaDamage()
|
||||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
{
|
||||||
|
if (HasLicentia)
|
||||||
|
{
|
||||||
|
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty
|
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 LicentiaLabs;
|
||||||
using rjw;
|
using rjw;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -22,8 +23,15 @@ namespace RJW_PlasticSurgeries
|
||||||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
|
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
protected override (HediffDef, float) GetLicentiaDamage()
|
||||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
{
|
||||||
|
if (HasLicentia)
|
||||||
|
{
|
||||||
|
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new NotSupportedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue