testing Licentia stuff

This commit is contained in:
Stardust3D 2022-10-19 19:46:54 +02:00
parent 9f85f3bd33
commit b3df4f7314
9 changed files with 27 additions and 2 deletions

View File

@ -30,5 +30,6 @@
<li>Ludeon.RimWorld</li>
<li>rim.job.world</li>
<li>NuttySquabble.Dyspareunia</li>
<li>LustLicentia.RJWLabs</li>
</loadAfter>
</ModMetaData>

Binary file not shown.

View File

@ -62,6 +62,9 @@
<HintPath>..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="LicentiaLabs">
<HintPath>..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll</HintPath>
</Reference>
<Reference Include="RJW">
<HintPath>..\..\..\rjw-base\1.3\Assemblies\RJW.dll</HintPath>
</Reference>

View File

@ -10,6 +10,7 @@ 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)
{
@ -41,15 +42,21 @@ namespace RJW_PlasticSurgeries
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
}
protected void SurgeryX(Pawn pawn, float severity, bool useDyspareunia = false)
protected void SurgeryX(Pawn pawn, float severity, bool damagePart = false)
{
GetHediffs(pawn).ForEach(hed =>
{
hed.Severity = severity;
if (useDyspareunia && HasDyspareunia) DamageHediff(hed);
if (damagePart && HasDyspareunia) DamageHediff(hed);
if (damagePart && HasLicentia)
{
var (type, damage) = GetLicentiaDamage();
LicentiaLabs.DamageHelper.ApplyDamage(pawn, hed.Part, type, damage);
}
});
}
protected abstract List<Hediff> GetHediffs(Pawn pawn);
protected abstract (HediffDef, float) GetLicentiaDamage();
}
}

View File

@ -55,6 +55,8 @@ namespace RJW_PlasticSurgeries
severity = curve.Evaluate(cupSize);
return true;
}
protected override (HediffDef, float) GetLicentiaDamage() => throw new NotSupportedException();
}
public class Recipe_Surgery_Mammoplasty_A : Recipe_Surgery_Mammoplasty

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using LicentiaLabs;
using rjw;
using Verse;
@ -21,6 +22,9 @@ namespace RJW_PlasticSurgeries
{
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
}
protected override (HediffDef, float) GetLicentiaDamage() =>
(Licentia.HediffDefs.StretchTear, 0.2f);
}
public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using LicentiaLabs;
using rjw;
using Verse;
@ -20,6 +21,9 @@ namespace RJW_PlasticSurgeries
{
return pawn.GetAnusList();
}
protected override (HediffDef, float) GetLicentiaDamage() =>
(Licentia.HediffDefs.StretchTear, 0.2f);
}
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using LicentiaLabs;
using rjw;
using Verse;
@ -20,6 +21,9 @@ namespace RJW_PlasticSurgeries
{
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
}
protected override (HediffDef, float) GetLicentiaDamage() =>
(Licentia.HediffDefs.StretchTear, 0.2f);
}
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty