Move all cum related code to a separate folder

This commit is contained in:
amevarashi 2022-04-27 15:56:16 +05:00
parent e70903c16e
commit 481c73f389
21 changed files with 245 additions and 281 deletions

View file

@ -40,7 +40,7 @@
<li Class="IngestionOutcomeDoer_OffsetPsyfocus">
<offset>0.05</offset>
</li>
<li Class="RJWSexperience.CumOutcomeDoers"/>
<li Class="RJWSexperience.Cum.IngestionOutcomeDoer_RecordEatenCum"/>
</outcomeDoers>
</ingestible>
<comps>
@ -137,7 +137,7 @@
<parentCategory>Foods</parentCategory>
<allowedByDefault>true</allowedByDefault>
<saveKey>allowWithCum</saveKey>
<workerClass>RJWSexperience.SpecialThingFilterWorker_Cum</workerClass>
<workerClass>RJWSexperience.Cum.FilterWorkers.SpecialThingFilterWorker_Cum</workerClass>
</SpecialThingFilterDef>
<SpecialThingFilterDef>
@ -147,6 +147,6 @@
<parentCategory>Foods</parentCategory>
<allowedByDefault>true</allowedByDefault>
<saveKey>allowWithoutCum</saveKey>
<workerClass>RJWSexperience.SpecialThingFilterWorker_NoCum</workerClass>
<workerClass>RJWSexperience.Cum.FilterWorkers.SpecialThingFilterWorker_NoCum</workerClass>
</SpecialThingFilterDef>
</Defs>

View file

@ -16,7 +16,7 @@
<li Class="IngestionOutcomeDoer_OffsetPsyfocus">
<offset>0.05</offset>
</li>
<li Class="RJWSexperience.CumOutcomeDoers">
<li Class="RJWSexperience.Cum.IngestionOutcomeDoer_RecordEatenCum">
<unitAmount>5.2</unitAmount>
</li>
</outcomeDoers>
@ -33,7 +33,7 @@
<li Class="IngestionOutcomeDoer_OffsetPsyfocus">
<offset>0.05</offset>
</li>
<li Class="RJWSexperience.CumOutcomeDoers">
<li Class="RJWSexperience.Cum.IngestionOutcomeDoer_RecordEatenCum">
<unitAmount>5.2</unitAmount>
</li>
</value>

View file

@ -1,55 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using rjw;
namespace RJWSexperience
{
public class Building_CumBucket : Building_Storage
{
protected float storedcum = 0f;
protected float totalgathered = 0f;
public override void ExposeData()
{
Scribe_Values.Look(ref storedcum, "storedcum", storedcum, true);
Scribe_Values.Look(ref totalgathered, "totalgathered", totalgathered, true);
base.ExposeData();
}
public override string GetInspectString()
{
return Keyed.RSTotalGatheredCum + String.Format("{0:0.##}ml", totalgathered);
}
public void AddCum(float amount)
{
AddCum(amount, VariousDefOf.GatheredCum);
}
public void AddCum(float amount, ThingDef cumDef)
{
Thing cum = ThingMaker.MakeThing(cumDef);
AddCum(amount, cum);
}
public void AddCum(float amount, Thing cum)
{
storedcum += amount;
totalgathered += amount;
int num = (int)storedcum;
cum.stackCount = num;
if (cum.stackCount > 0 && !GenPlace.TryPlaceThing(cum, PositionHeld, Map, ThingPlaceMode.Direct, out Thing res))
{
FilthMaker.TryMakeFilth(PositionHeld, Map, VariousDefOf.FilthCum, num);
}
storedcum -= num;
}
}
}

View file

@ -0,0 +1,48 @@
using RimWorld;
using Verse;
namespace RJWSexperience // Used in Menstruation with this namespace
{
public class Building_CumBucket : Building_Storage
{
protected float storedcum = 0f;
protected float totalgathered = 0f;
public override void ExposeData()
{
Scribe_Values.Look(ref storedcum, "storedcum", storedcum, true);
Scribe_Values.Look(ref totalgathered, "totalgathered", totalgathered, true);
base.ExposeData();
}
public override string GetInspectString()
{
return Keyed.RSTotalGatheredCum + string.Format("{0:0.##}ml", totalgathered);
}
public void AddCum(float amount)
{
AddCum(amount, VariousDefOf.GatheredCum);
}
public void AddCum(float amount, ThingDef cumDef)
{
Thing cum = ThingMaker.MakeThing(cumDef);
AddCum(amount, cum);
}
public void AddCum(float amount, Thing cum)
{
storedcum += amount;
totalgathered += amount;
int num = (int)storedcum;
cum.stackCount = num;
if (cum.stackCount > 0 && !GenPlace.TryPlaceThing(cum, PositionHeld, Map, ThingPlaceMode.Direct, out Thing res))
{
FilthMaker.TryMakeFilth(PositionHeld, Map, VariousDefOf.FilthCum, num);
}
storedcum -= num;
}
}
}

View file

@ -0,0 +1,61 @@
using rjw;
using RJWSexperience.Logs;
using System;
using System.Collections.Generic;
using System.Linq;
using Verse;
namespace RJWSexperience.Cum
{
public static class CumUtility
{
public static float GetCumVolume(Pawn pawn)
{
List<Hediff> hediffs = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn));
if (hediffs.NullOrEmpty()) return 0f;
else return GetCumVolume(pawn, hediffs);
}
public static float GetCumVolume(Pawn pawn, List<Hediff> hediffs)
{
CompHediffBodyPart part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) return 0f;
return GetCumVolume(pawn, part);
}
public static float GetCumVolume(Pawn pawn, CompHediffBodyPart part)
{
float res;
try
{
res = part.FluidAmmount * part.FluidModifier * pawn.BodySize / pawn.RaceProps.baseBodySize * Rand.Range(0.8f, 1.2f) * RJWSettings.cum_on_body_amount_adjust * 0.3f;
}
catch (NullReferenceException)
{
res = 0.0f;
}
if (pawn.Has(Quirk.Messy)) res *= Rand.Range(4.0f, 8.0f);
return res;
}
public static void FeedCum(Pawn pawn, float amount)
{
const float allOf = 1000f;
var log = LogManager.GetLogger<DebugLogProvider>("PawnExtensions");
log.Message($"AteCum({pawn.NameShortColored}, {amount})");
Thing cum = ThingMaker.MakeThing(VariousDefOf.GatheredCum);
cum.stackCount = (int)Math.Ceiling(amount);
log.Message($"Created a stack of {cum.stackCount} cum");
cum.Ingested(pawn, allOf);
log.Message($"{pawn.NameShortColored} ingested cum");
}
}
}

View file

@ -1,6 +1,6 @@
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Cum.FilterWorkers
{
public class SpecialThingFilterWorker_Cum : SpecialThingFilterWorker_CumBase
{

View file

@ -1,7 +1,7 @@
using RimWorld;
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Cum.FilterWorkers
{
public abstract class SpecialThingFilterWorker_CumBase : SpecialThingFilterWorker
{

View file

@ -1,6 +1,6 @@
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Cum.FilterWorkers
{
public class SpecialThingFilterWorker_NoCum : SpecialThingFilterWorker_CumBase
{

View file

@ -1,9 +1,9 @@
using RimWorld;
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Cum
{
public class CumOutcomeDoers : IngestionOutcomeDoer
public class IngestionOutcomeDoer_RecordEatenCum : IngestionOutcomeDoer
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float unitAmount = 1.0f;
@ -11,7 +11,7 @@ namespace RJWSexperience
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
int amount = ingested.stackCount * (int)unitAmount;
Logs.LogManager.GetLogger<CumOutcomeDoers, Logs.DebugLogProvider>().Message($"Record {pawn.NameShortColored} eating {amount} ml of cum");
Logs.LogManager.GetLogger<IngestionOutcomeDoer_RecordEatenCum, Logs.DebugLogProvider>().Message($"Record {pawn.NameShortColored} eating {amount} ml of cum");
pawn.records.Increment(VariousDefOf.NumofEatenCum);
pawn.records.AddTo(VariousDefOf.AmountofEatenCum, amount);
}

View file

@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Linq;
using Verse;
namespace RJWSexperience.Interactions
namespace RJWSexperience.Cum.Interactions
{
public class CumAddictPartKindUsageRule : IPartPreferenceRule
{

View file

@ -0,0 +1,92 @@
using RimWorld;
using rjw;
using System.Collections.Generic;
using Verse;
using Verse.AI;
namespace RJWSexperience // Used in Menstruation with this namespace
{
public class JobDriver_CleanSelfWithBucket : JobDriver
{
protected const int UNITTIME = 240;//ticks - 120 = 2 real seconds, 3 in-game minutes
protected float progress = 0;
protected float severitycache = 1;
protected Hediff hediffcache;
protected float CleaningTime
{
get
{
return severitycache * UNITTIME;
}
}
protected Building_CumBucket Bucket => TargetB.Thing as Building_CumBucket;
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return pawn.Reserve(pawn, job, 1, -1, null, errorOnFailed);
}
protected override IEnumerable<Toil> MakeNewToils()
{
this.FailOn(delegate
{
List<Hediff> hediffs = pawn.health.hediffSet.hediffs;
return !hediffs.Exists(x => x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Bukkake);
});
yield return Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.ClosestTouch);
Toil cleaning = new Toil
{
initAction = CleaningInit,
tickAction = CleaningTick,
defaultCompleteMode = ToilCompleteMode.Never
};
cleaning.AddFinishAction(Finish);
cleaning.WithProgressBar(TargetIndex.A, () => progress / CleaningTime);
yield return cleaning;
}
protected void CleaningInit()
{
hediffcache = pawn.health.hediffSet.hediffs.Find(x => x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Semen || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_InsectSpunk);
if (hediffcache == null)
{
pawn.jobs.EndCurrentJob(JobCondition.Succeeded);
}
else
{
progress = 0;
severitycache = hediffcache.Severity;
}
}
protected void CleaningTick()
{
progress++;
if (progress > CleaningTime)
{
Cleaned();
}
}
protected void Cleaned()
{
if (hediffcache != null)
{
float cumamount = hediffcache.Severity * 10;
hediffcache.Severity = 0;
Bucket.AddCum(cumamount);
}
CleaningInit();
}
protected void Finish()
{
if (pawn.CurJobDef == JobDefOf.Wait_MaintainPosture)
{
pawn.jobs.EndCurrentJob(JobCondition.InterruptForced);
}
}
}
}

View file

@ -0,0 +1,14 @@
using System;
using Verse;
using Verse.AI;
namespace RJWSexperience.Cum
{
public class JobGiver_UseBucket : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
throw new NotImplementedException();
}
}
}

View file

@ -1,6 +1,6 @@
using RimWorld;
namespace RJWSexperience
namespace RJWSexperience // Change in namespace will lead to save incompatibility
{
public class Thought_AteCum : Thought_Recordbased
{
@ -22,7 +22,7 @@ namespace RJWSexperience
Thought_AteCum thought_Memory = (Thought_AteCum)thoughts.memories.OldestMemoryInGroup(this);
if (thought_Memory != null)
{
showBubble = (thought_Memory.age > thought_Memory.def.DurationTicks / 2);
showBubble = thought_Memory.age > thought_Memory.def.DurationTicks / 2;
thought_Memory.Merged();
return true;
}

View file

@ -1,10 +1,7 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using Verse;
using RJWSexperience.Logs;
namespace RJWSexperience
{
@ -47,40 +44,6 @@ namespace RJWSexperience
return null;
}
public static float GetCumVolume(this Pawn pawn)
{
List<Hediff> hediffs = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn));
if (hediffs.NullOrEmpty()) return 0;
else return pawn.GetCumVolume(hediffs);
}
public static float GetCumVolume(this Pawn pawn, List<Hediff> hediffs)
{
CompHediffBodyPart part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
if (part == null) part = hediffs?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault()?.TryGetComp<CompHediffBodyPart>();
return pawn.GetCumVolume(part);
}
public static float GetCumVolume(this Pawn pawn, CompHediffBodyPart part)
{
float res;
try
{
res = part.FluidAmmount * part.FluidModifier * pawn.BodySize / pawn.RaceProps.baseBodySize * Rand.Range(0.8f, 1.2f) * RJWSettings.cum_on_body_amount_adjust * 0.3f;
}
catch (NullReferenceException)
{
res = 0.0f;
}
if (pawn.Has(Quirk.Messy)) res *= Rand.Range(4.0f, 8.0f);
return res;
}
/// <summary>
/// If the pawn is virgin, return true.
/// </summary>
@ -131,20 +94,6 @@ namespace RJWSexperience
}
}
public static void AteCum(this Pawn pawn, float amount)
{
const float allOf = 1000f;
var log = LogManager.GetLogger<DebugLogProvider>("PawnExtensions");
log.Message($"AteCum({pawn.NameShortColored}, {amount})");
Thing cum = ThingMaker.MakeThing(VariousDefOf.GatheredCum);
cum.stackCount = (int)Math.Ceiling(amount);
log.Message($"Created a stack of {cum.stackCount} cum");
cum.Ingested(pawn, allOf);
log.Message($"{pawn.NameShortColored} ingested cum");
}
public static void AddVirginTrait(this Pawn pawn)
{
if (pawn.story?.traits != null)

View file

@ -25,7 +25,7 @@ namespace RJWSexperience
var log = LogManager.GetLogger("StaticConstructorOnStartup");
List<IPartPreferenceRule> partKindUsageRules = Unprivater.GetProtectedValue<List<IPartPreferenceRule>>("_partKindUsageRules", typeof(PartPreferenceDetectorService));
partKindUsageRules.Add(new Interactions.CumAddictPartKindUsageRule());
partKindUsageRules.Add(new Cum.Interactions.CumAddictPartKindUsageRule());
log.Message("Added 1 rule to PartPreferenceDetectorService._partKindUsageRules");
}
}

View file

@ -1,107 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using RimWorld;
using rjw;
namespace RJWSexperience
{
public class JobGiver_UseBucket : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
throw new NotImplementedException();
}
}
public class JobDriver_CleanSelfWithBucket : JobDriver
{
const int UNITTIME = 240;//ticks - 120 = 2 real seconds, 3 in-game minutes
protected float progress = 0;
protected float severitycache = 1;
protected Hediff hediffcache;
protected float CleaningTime
{
get
{
return severitycache * UNITTIME;
}
}
protected Building_CumBucket Bucket => TargetB.Thing as Building_CumBucket;
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return pawn.Reserve(pawn, job, 1, -1, null, errorOnFailed);
}
protected override IEnumerable<Toil> MakeNewToils()
{
this.FailOn(delegate
{
List<Hediff> hediffs = pawn.health.hediffSet.hediffs;
return !hediffs.Exists(x => x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Bukkake);
});
yield return Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.ClosestTouch);
Toil cleaning = new Toil();
cleaning.initAction = CleaningInit;
cleaning.tickAction = CleaningTick;
cleaning.AddFinishAction(Finish);
cleaning.defaultCompleteMode = ToilCompleteMode.Never;
cleaning.WithProgressBar(TargetIndex.A, () => progress/CleaningTime);
yield return cleaning;
}
protected void CleaningInit()
{
hediffcache = pawn.health.hediffSet.hediffs.Find(x => (x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Semen || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_InsectSpunk));
if (hediffcache == null)
{
pawn.jobs.EndCurrentJob(JobCondition.Succeeded);
}
else
{
progress = 0;
severitycache = hediffcache.Severity;
}
}
protected void CleaningTick()
{
progress += 1;
if (progress > CleaningTime)
{
Cleaned();
}
}
protected void Cleaned()
{
if (hediffcache != null)
{
float cumamount = hediffcache.Severity * 10;
hediffcache.Severity = 0;
Bucket.AddCum(cumamount);
}
CleaningInit();
}
protected void Finish()
{
if (pawn.CurJobDef == JobDefOf.Wait_MaintainPosture)
{
pawn.jobs.EndCurrentJob(JobCondition.InterruptForced);
}
}
}
}

View file

@ -2,6 +2,7 @@
using RimWorld;
using rjw;
using rjw.Modules.Interactions.Enums;
using RJWSexperience.Cum;
using RJWSexperience.ExtensionMethods;
using RJWSexperience.Logs;
using UnityEngine;
@ -66,7 +67,7 @@ namespace RJWSexperience
if (props.sexType == xxx.rjwSextype.Masturbation || partner == null)
{
Building_CumBucket cumbucket = pawn.GetAdjacentBuilding<Building_CumBucket>();
cumbucket?.AddCum(pawn.GetCumVolume());
cumbucket?.AddCum(CumUtility.GetCumVolume(pawn));
}
RJWUtility.UpdateSatisfactionHIstory(pawn, partner, props, satisfaction);
@ -124,7 +125,7 @@ namespace RJWSexperience
if (!PawnsPenisIsInPartnersMouth(props))
return;
props.partner.AteCum(props.pawn.GetCumVolume());
CumUtility.FeedCum(props.partner, CumUtility.GetCumVolume(props.pawn));
}
private static bool PawnsPenisIsInPartnersMouth(SexProps props)

View file

@ -1,7 +1,6 @@
using HarmonyLib;
using RimWorld;
using rjw;
using RJWSexperience.ExtensionMethods;
using System;
using System.Collections.Generic;
using UnityEngine;

View file

@ -65,18 +65,20 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Building_Cumbucket.cs" />
<Compile Include="Cum\Building_Cumbucket.cs" />
<Compile Include="Configurations.cs" />
<Compile Include="Cum\CumUtility.cs" />
<Compile Include="Cum\JobGiver_UseBucket.cs" />
<Compile Include="DebugAction.cs" />
<Compile Include="ExtensionMethods\PawnExtensions.cs" />
<Compile Include="ExtensionMethods\SexPropsExtensions.cs" />
<Compile Include="FilterWorkers\SpecialThingFilterWorker_CumBase.cs" />
<Compile Include="FilterWorkers\SpecialThingFilterWorker_NoCum.cs" />
<Compile Include="Cum\FilterWorkers\SpecialThingFilterWorker_CumBase.cs" />
<Compile Include="Cum\FilterWorkers\SpecialThingFilterWorker_NoCum.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Harmony.cs" />
<Compile Include="IngestionOutcomeDoers.cs" />
<Compile Include="Interactions\CumAddictPartKindUsageRule.cs" />
<Compile Include="JobDrivers.cs" />
<Compile Include="Cum\IngestionOutcomeDoer_RecordEatenCum.cs" />
<Compile Include="Cum\Interactions\CumAddictPartKindUsageRule.cs" />
<Compile Include="Cum\JobDriver_CleanSelfWithBucket.cs" />
<Compile Include="Logs\DebugLogProvider.cs" />
<Compile Include="Logs\LogManager.cs" />
<Compile Include="Patches\DefInjection.cs" />
@ -92,12 +94,12 @@
<Compile Include="Patches\Rimworld_Patch.cs" />
<Compile Include="Patches\RJW_Patch.cs" />
<Compile Include="SexperienceMod.cs" />
<Compile Include="FilterWorkers\SpecialThingFilterWorker_Cum.cs" />
<Compile Include="Cum\FilterWorkers\SpecialThingFilterWorker_Cum.cs" />
<Compile Include="StatParts.cs" />
<Compile Include="Thoughts\ThoughtDefExtension_IncreaseRecord.cs" />
<Compile Include="Thoughts\ThoughtDefExtension_StageFromOpinion.cs" />
<Compile Include="Thoughts\ThoughtDefExtension_StageFromRecord.cs" />
<Compile Include="Thoughts\Thought_AteCum.cs" />
<Compile Include="Cum\Thought_AteCum.cs" />
<Compile Include="Thoughts\Thought_IncreaseRecord.cs" />
<Compile Include="Thoughts\Thought_Opinionbased.cs" />
<Compile Include="Thoughts\Thought_Recordbased.cs" />

View file

@ -1,20 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using rjw;
using RimWorld;
using Verse;
using Verse.AI;
using UnityEngine;
using rjw.Modules.Interactions.Objects;
using rjw.Modules.Interactions.Helpers;
using rjw.Modules.Interactions.Enums;
namespace RJWSexperience
{
public static class RJWUtility
public static class RJWUtility
{
public static bool RemoveVirginTrait(Pawn pawn, Pawn partner, SexProps props)
{

View file

@ -1,5 +1,4 @@
using RimWorld;
using System.Linq;
using Verse;
namespace RJWSexperience
@ -36,39 +35,5 @@ namespace RJWSexperience
public static readonly PawnRelationDef relation_birthgiver = DefDatabase<PawnRelationDef>.GetNamed("RJW_Sire");
public static readonly PawnRelationDef relation_spawn = DefDatabase<PawnRelationDef>.GetNamed("RJW_Pup");
public static readonly KeyBindingDef OpenSexStatistics = DefDatabase<KeyBindingDef>.GetNamed("OpenSexStatistics");
public static float CumneedLevelOffset
{
get
{
if (cumneedLevelOffsetcache == null)
{
CreateCumCompCache();
}
return cumneedLevelOffsetcache ?? 1.0f;
}
}
public static float CumexistingAddictionSeverityOffset
{
get
{
if (cumexistingAddictionSeverityOffsetcache == null)
{
CreateCumCompCache();
}
return cumexistingAddictionSeverityOffsetcache ?? 1.0f;
}
}
private static void CreateCumCompCache()
{
CompProperties_Drug comp = (CompProperties_Drug)GatheredCum.comps.FirstOrDefault(x => x is CompProperties_Drug);
cumneedLevelOffsetcache = comp.needLevelOffset;
cumexistingAddictionSeverityOffsetcache = comp.existingAddictionSeverityOffset;
}
private static float? cumneedLevelOffsetcache = null;
private static float? cumexistingAddictionSeverityOffsetcache = null;
}
}