This commit is contained in:
Stardust3D 2024-06-02 16:44:01 +02:00
parent ed7646a76f
commit 44a9d7eb78
22 changed files with 884 additions and 35 deletions

View file

@ -1,15 +1,12 @@
using System.Collections.Generic;
using Dyspareunia;
using RimWorld;
using rjw;
using Verse;
using DamageDefOf = Dyspareunia.DamageDefOf;
namespace RJW_PlasticSurgeries
{
public abstract class Recipe_Plastic_Surgery : Recipe_Surgery
{
protected readonly bool HasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
protected readonly bool HasLicentia = ModLister.HasActiveModWithName("RimJobWorld - Licentia Labs");
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
@ -37,17 +34,11 @@ namespace RJW_PlasticSurgeries
protected abstract void SurgeryResult(Pawn pawn);
private static void DamageHediff(Hediff hed)
{
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
protected void SurgeryX(Pawn pawn, float severity, bool damagePart = false)
{
GetHediffs(pawn).ForEach(hed =>
{
hed.Severity = severity;
if (damagePart && HasDyspareunia) DamageHediff(hed);
if (damagePart && HasLicentia)
{
var (type, damage) = GetLicentiaDamage();