mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Compare commits
3 commits
f3649d2182
...
7e366a2224
Author | SHA1 | Date | |
---|---|---|---|
|
7e366a2224 | ||
|
e5853d18a4 | ||
|
8888f76708 |
8 changed files with 48 additions and 20 deletions
|
@ -504,14 +504,29 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
public bool LoopNeverending()
|
public bool LoopNeverending()
|
||||||
{
|
{
|
||||||
if(pawn?.jobs?.curDriver != null &&
|
return IsNeverEndingSex(pawn) || IsNeverEndingSexPartner(pawn);
|
||||||
(pawn.jobs.curDriver is JobDriver_Sex) && (pawn.jobs.curDriver as JobDriver_Sex).neverendingsex ||
|
|
||||||
(pawn.jobs.curDriver is JobDriver_SexBaseReciever) && (pawn.jobs.curDriver as JobDriver_Sex).Partner?.jobs?.curDriver != null && ((pawn.jobs.curDriver as JobDriver_Sex).Partner.jobs.curDriver as JobDriver_Sex).neverendingsex)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsNeverEndingSex(Pawn pawn)
|
||||||
|
{
|
||||||
|
bool hasDriver = pawn?.jobs?.curDriver != null;
|
||||||
|
if (!hasDriver)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
return (pawn.jobs.curDriver is JobDriver_Sex jds) && jds.neverendingsex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsNeverEndingSexPartner(Pawn pawn)
|
||||||
|
{
|
||||||
|
bool hasDriver = pawn?.jobs?.curDriver != null;
|
||||||
|
if (!hasDriver)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var partner = (pawn.jobs.curDriver is JobDriver_SexBaseReciever jds) ? jds.Partner : null;
|
||||||
|
if (partner == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsNeverEndingSex(partner);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetOnLoop()
|
public void ResetOnLoop()
|
||||||
|
|
Binary file not shown.
|
@ -60,7 +60,7 @@ namespace Rimworld_Animations {
|
||||||
bool mirrored = curPawn.TryGetComp<CompBodyAnimator>().Mirror;
|
bool mirrored = curPawn.TryGetComp<CompBodyAnimator>().Mirror;
|
||||||
|
|
||||||
float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", offsetX.ToString()), out offsetX);
|
float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", offsetX.ToString()), out offsetX);
|
||||||
offsetX = listingStandard.Slider(offsetX, -2 * (mirrored ? -1 : 1), 2 * (mirrored ? -1 : 1));
|
offsetX = listingStandard.Slider(offsetX, -2, 2);
|
||||||
|
|
||||||
float.TryParse(listingStandard.TextEntryLabeled("Z Offset: ", offsetZ.ToString()), out offsetZ);
|
float.TryParse(listingStandard.TextEntryLabeled("Z Offset: ", offsetZ.ToString()), out offsetZ);
|
||||||
offsetZ = listingStandard.Slider(offsetZ, -2, 2);
|
offsetZ = listingStandard.Slider(offsetZ, -2, 2);
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace Rimworld_Animations
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
|
||||||
|
public static class HarmonyPatch_ResolveApparelGraphics
|
||||||
|
{
|
||||||
|
public static bool Prefix(ref Pawn ___pawn)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (___pawn.TryGetComp<CompBodyAnimator>() != null && ___pawn.TryGetComp<CompBodyAnimator>().isAnimating)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -139,19 +139,7 @@ namespace Rimworld_Animations {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
|
|
||||||
public static class HarmonyPatch_ResolveApparelGraphics
|
|
||||||
{
|
|
||||||
public static bool Prefix(ref Pawn ___pawn)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (___pawn.TryGetComp<CompBodyAnimator>() != null && ___pawn.TryGetComp<CompBodyAnimator>().isAnimating)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -99,6 +99,7 @@
|
||||||
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderer.cs" />
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderer.cs" />
|
||||||
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_PawnRotation.cs" />
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_PawnRotation.cs" />
|
||||||
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_Pawn_DrawTracker.cs" />
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_Pawn_DrawTracker.cs" />
|
||||||
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_ResolveApparelGraphics.cs" />
|
||||||
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_SetPawnAnimatable.cs" />
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_SetPawnAnimatable.cs" />
|
||||||
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_Thing.cs" />
|
<Compile Include="1.4\Source\Patches\RimworldPatches\HarmonyPatch_Thing.cs" />
|
||||||
<Compile Include="1.4\Source\Patches\RJWPatches\HarmonyPatch_PlaySexSounds.cs" />
|
<Compile Include="1.4\Source\Patches\RJWPatches\HarmonyPatch_PlaySexSounds.cs" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue