- Fixed an issue with the orgasm not filling in some circumstances
- Fixed a bug with sex overdrive not applying correctly
- Fixed an issue with 'on orgasm' events not triggering correctly
This commit is contained in:
AbstractConcept 2023-02-08 23:32:58 -06:00
parent cce0053fd6
commit 003b67fb97
14 changed files with 92 additions and 102 deletions

View file

@ -12,7 +12,7 @@ namespace Rimworld_Animations_Patch
{
public static class AnimationPatchUtility
{
public static int FindTrueAnimationLength(Pawn pawn, out int orgasmTick)
public static int FindTrueAnimationLength(Pawn pawn, out int orgasmTick, bool skipFirstStage = false)
{
orgasmTick = int.MaxValue;
@ -37,10 +37,10 @@ namespace Rimworld_Animations_Patch
foreach (AnimationStage animStage in anim.animationStages)
{
// Legacy: skip the first stage of quickies if there's no playTimeTicksQuick values declared
if (anim.animationStages.IndexOf(animStage) == 0 && isQuickie && anim.animationStages.Any(x => x.playTimeTicksQuick >= 0) == false)
{ continue; }
if (anim.animationStages.IndexOf(animStage) == 0 && isQuickie && anim.animationStages.Any(x => x.playTimeTicksQuick >= 0) == false) continue;
if (anim.animationStages.IndexOf(animStage) == 0 && skipFirstStage) continue;
int curr_tick = 0;
int curr_tick = 0;
foreach (PawnKeyframe keyframe in (animStage.animationClips[actorId] as PawnAnimationClip).keyframes)
{
@ -68,8 +68,9 @@ namespace Rimworld_Animations_Patch
{ orgasmTick = (int)(ticks * (2f + Rand.Value)); }
}
return ticks;
DebugMode.Message(pawn.NameShortColored + " will orgasm at tick " + orgasmTick);
return ticks;
}
// Extended version of PawnHeadRotInAnimation (prevents pawn hair from getting messed up when draw in portraits)

View file

@ -72,15 +72,12 @@ namespace Rimworld_Animations_Patch
public static void DetermineApparelToKeepOn(Pawn pawn)
{
if (pawn?.apparel?.WornApparel == null)
{ return; }
if (pawn?.apparel?.WornApparel == null) return;
foreach (Apparel apparel in pawn.apparel.WornApparel)
{
CompApparelVisibility comp = apparel.TryGetComp<CompApparelVisibility>();
if (comp != null)
{ comp.isBeingWorn = true; }
if (comp != null) comp.isBeingWorn = true;
}
ActorAnimationData animData = pawn.GetAnimationData();
@ -98,14 +95,9 @@ namespace Rimworld_Animations_Patch
{
CompApparelVisibility comp = apparel.TryGetComp<CompApparelVisibility>();
if (comp == null)
{ continue; }
if (apparel.def is bondage_gear_def)
{ continue; }
if (ApparelSettings.GetRimNudeData(apparel) != null && ApparelSettings.GetRimNudeData(apparel).sexWear)
{ continue; }
if (comp == null) continue;
if (apparel.def is bondage_gear_def) continue;
if (ApparelSettings.GetRimNudeData(apparel) != null && ApparelSettings.GetRimNudeData(apparel).sexWear) continue;
if (clothingPreference == RJWPreferenceSettings.Clothing.Nude || undressForRitual || undressForParty)
{