From 55a71f0397129fdaa8257c4f2bef91f575381688 Mon Sep 17 00:00:00 2001 From: Stardust3D <3dstardust@gmail.com> Date: Thu, 3 Feb 2022 02:23:30 +0100 Subject: [PATCH] better checking for Dyspareunia --- .../Recipe_Surgery_Sphinctoplasty.cs | 14 +------------- .../Recipe_Surgery_Vaginoplasty.cs | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs b/Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs index 09c6092..1ceef5c 100644 --- a/Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs +++ b/Source/RJW_PlasticSurgeries/Recipe_Surgery_Sphinctoplasty.cs @@ -10,19 +10,7 @@ namespace RJW_PlasticSurgeries { public abstract class Recipe_Surgery_Sphinctoplasty : Recipe_Surgery { - private readonly bool hasDyspareunia; - - public Recipe_Surgery_Sphinctoplasty() - { - try - { - hasDyspareunia = Type.GetType("Dyspareunia.PenetrationUtility").ToString() != null; - } - catch (Exception e) - { - hasDyspareunia = false; - } - } + private readonly bool hasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia"); public override IEnumerable GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { diff --git a/Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs b/Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs index dae54f3..73209ca 100644 --- a/Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs +++ b/Source/RJW_PlasticSurgeries/Recipe_Surgery_Vaginoplasty.cs @@ -10,19 +10,7 @@ namespace RJW_PlasticSurgeries { public abstract class Recipe_Surgery_Vaginoplasty : Recipe_Surgery { - private readonly bool hasDyspareunia; - - public Recipe_Surgery_Vaginoplasty() - { - try - { - hasDyspareunia = Type.GetType("Dyspareunia.PenetrationUtility").ToString() != null; - } - catch (Exception e) - { - hasDyspareunia = false; - } - } + private readonly bool hasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia"); public override IEnumerable GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) {