small fix to avoid System.TypeLoadException when Licentia is not present

This commit is contained in:
Stardust3D 2024-05-27 20:54:13 +02:00
parent 06e09762a4
commit 086b2e155e
4 changed files with 36 additions and 12 deletions

View file

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