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>Ludeon.RimWorld</li>
<li>rim.job.world</li> <li>rim.job.world</li>
<li>NuttySquabble.Dyspareunia</li> <li>NuttySquabble.Dyspareunia</li>
<li>LustLicentia.RJWLabs</li>
</loadAfter> </loadAfter>
</ModMetaData> </ModMetaData>

Binary file not shown.

View file

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

View file

@ -10,6 +10,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 = ModLister.HasActiveModWithName("Dyspareunia");
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)
{ {
@ -41,15 +42,21 @@ namespace RJW_PlasticSurgeries
PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null); 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 => GetHediffs(pawn).ForEach(hed =>
{ {
hed.Severity = severity; 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 List<Hediff> GetHediffs(Pawn pawn);
protected abstract (HediffDef, float) GetLicentiaDamage();
} }
} }

View file

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

View file

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using LicentiaLabs;
using rjw; using rjw;
using Verse; using Verse;
@ -21,6 +22,9 @@ namespace RJW_PlasticSurgeries
{ {
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis); 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 public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty

View file

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

View file

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using LicentiaLabs;
using rjw; using rjw;
using Verse; using Verse;
@ -20,6 +21,9 @@ namespace RJW_PlasticSurgeries
{ {
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina); 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 public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty