Skip to content

Commit 923493a

Browse files
committed
gaugeFemale logic tweaks
1 parent 129b105 commit 923493a

File tree

1 file changed

+43
-45
lines changed

1 file changed

+43
-45
lines changed

Core_SkinEffects/SkinEffectsController.cs

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using KoiSkinOverlayX;
1212
using UnityEngine;
1313
using KKAPI.Utilities;
14-
using System.IO;
1514

1615
namespace KK_SkinEffects
1716
{
@@ -227,50 +226,49 @@ public byte[] SiruState
227226

228227
internal void OnFemaleGaugeUp(SaveData.Heroine heroine, HFlag hFlag)
229228
{
230-
var orgs = hFlag.GetOrgCount();
231-
232-
// Increase sweat level every time female gauge reaches 70
233-
if (hFlag.gaugeFemale >= 70)
234-
{
235-
// Using GetOrgCount to prevent adding a level when you let gauge fall below 70 and resume
236-
if (SweatLevel < orgs + 1)
237-
{
238-
SweatLevel = orgs + 1;
239-
}
240-
}
229+
var gaugeFemale = hFlag.gaugeFemale;
241230

242-
243-
// Note: In my experience masturbation (peeping scenes) do not increase Org count when the girl climaxes.
244-
// So a workaround is to use a narrow check between gauge 70-71 with a boolean flag to stop checking.
245-
if (hFlag.mode == HFlag.EMode.masturbation)
231+
if (hFlag.mode == HFlag.EMode.masturbation)
246232
{
247-
if (hFlag.gaugeFemale >= 0 && hFlag.gaugeFemale < 5 && _stopChecking != false)
248-
{
249-
_stopChecking = false; //Reset it when meter resets, only if not already set back to false.
250-
}
251-
252-
if (hFlag.gaugeFemale >= 70 && hFlag.gaugeFemale < 71 && _stopChecking == false)
253-
{
254-
255-
// Also make this check between 70-71, as it seems to be a decimal value between these two numbers. Don't want to check consistently.
256-
257-
PussyJuiceLevel = PussyJuiceLevel + 1; //TextureLoader will only go up to the Math.Max for texture count. So if we had 10 levels of texture .png files in resources it would
258-
// Increment through them all step by step. By default we have 3 textures for each level.
259-
_stopChecking = true;
233+
// Worakound to org count not increasing when the girl climaxes in masturbation/peeping scenes
234+
if (_stopChecking)
235+
{
236+
if (gaugeFemale >= 0 && gaugeFemale < 5)
237+
{
238+
//Reset it when meter resets, only if not already set back to false.
239+
_stopChecking = false;
240+
}
241+
}
242+
else
243+
{
244+
if (gaugeFemale >= 70 && gaugeFemale < 71)
245+
{
246+
// Also make this check between 70-71, as it seems to be a decimal value between these two numbers. Don't want to check consistently.
247+
SweatLevel += 1;
248+
PussyJuiceLevel += 1;
249+
_stopChecking = true;
250+
}
251+
}
252+
}
253+
else
254+
{
255+
if (gaugeFemale >= 70)
256+
{
257+
// Using GetOrgCount to prevent adding a level when you let gauge fall below 70 and resume
258+
var orgsPlusOne = hFlag.GetOrgCount() + 1;
259+
if (SweatLevel < orgsPlusOne)
260+
SweatLevel = orgsPlusOne;
261+
if (PussyJuiceLevel < orgsPlusOne)
262+
PussyJuiceLevel = orgsPlusOne;
260263
}
261264
}
262-
else if (PussyJuiceLevel < orgs + 1)
263-
{
264-
PussyJuiceLevel = orgs + 1;
265-
}
266-
267-
265+
268266
// When going too rough and has FragileVag, add bld effect
269267
if (FragileVag)
270268
{
271269
if (_fragileVagTriggeredLvl == 0)
272270
{
273-
if (orgs == 0 && IsRoughPiston(hFlag))
271+
if (hFlag.GetOrgCount() == 0 && IsRoughPiston(hFlag))
274272
{
275273
BloodLevel = Mathf.Max(1, BloodLevel + 1);
276274
_fragileVagTriggeredLvl = 1;
@@ -369,8 +367,8 @@ public void OnAnalInsert(SaveData.Heroine heroine, HFlag hFlag)
369367
public void OnCumInMouth(SaveData.Heroine heroine, HFlag hFlag)
370368
{
371369
DroolLevel++;
372-
TearLevel++;
373-
370+
TearLevel++;
371+
374372
_mouthFilledWithCumCount += 1;
375373
if (_mouthFilledWithCumCount >= 3)
376374
CumInNoseLevel += 1;
@@ -610,8 +608,8 @@ private void UpdateBldTexture(bool refresh = true)
610608
if (refresh)
611609
UpdateTextures(true, false);
612610
}
613-
}
614-
611+
}
612+
615613
private void UpdateCumTexture(bool refresh = true)
616614
{
617615
_ksox.AdditionalTextures.RemoveAll(x => TextureLoader.CumTextures.Contains(x.Texture));
@@ -624,8 +622,8 @@ private void UpdateCumTexture(bool refresh = true)
624622
if (refresh)
625623
UpdateTextures(true, false);
626624
}
627-
}
628-
625+
}
626+
629627
private void UpdateAnalCumTexture(bool refresh = true)
630628
{
631629
_ksox.AdditionalTextures.RemoveAll(x => TextureLoader.AnalCumTextures.Contains(x.Texture));
@@ -683,8 +681,8 @@ private void UpdateDroolTexture(bool refresh = true)
683681
if (refresh)
684682
UpdateTextures(false, true);
685683
}
686-
}
687-
684+
}
685+
688686
private void UpdateSalivaTexture(bool refresh = true)
689687
{
690688
_ksox.AdditionalTextures.RemoveAll(x => TextureLoader.SalivaTextures.Contains(x.Texture));
@@ -731,7 +729,7 @@ private void UpdatePussyJuiceTexture(bool refresh = true)
731729
{
732730
_ksox.AdditionalTextures.RemoveAll(x => TextureLoader.PussyJuiceTextures.Contains(x.Texture));
733731

734-
if (StudioAPI.InsideStudio || SkinEffectsPlugin.EnableJuice.Value)
732+
if (StudioAPI.InsideStudio || SkinEffectsPlugin.EnableJuice.Value)
735733
{
736734
if (PussyJuiceLevel > 0)
737735
{

0 commit comments

Comments
 (0)