mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Compare commits
No commits in common. "8a93f3b087db60c62ad9b9fbf7b793ac8e6be3a5" and "0e9419b03996921e2a31ade80a6f2845fdcabbb1" have entirely different histories.
8a93f3b087
...
0e9419b039
9 changed files with 44 additions and 97 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -348,11 +348,3 @@ healthchecksdb
|
|||
/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs
|
||||
/Source/Patches/ThingAnimationPatches/HarmonyPatch_ThingDrawAt.cs
|
||||
/Defs/AnimationDefs/Animations_SexToys.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/HumanRotatedOffset.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/BasicBestiality4v1.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/BasicBestiality3v1.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/BasicBestiality2v1.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/BasicBestiality1v1.xml
|
||||
/1.5/Defs/AnimationDefs/BasicBestiality/!BasicBestiality.xml
|
||||
/1.5/Defs/TestDoNotPush
|
||||
/1.5/Textures/AnimationProps/BEV
|
||||
|
|
Binary file not shown.
|
@ -19,6 +19,11 @@ namespace Rimworld_Animations
|
|||
public bool canAnimationBeUsed(List<Pawn> actors)
|
||||
{
|
||||
|
||||
if (RJWAnimationSettings.debugMode)
|
||||
{
|
||||
Log.Message("[anims] Checking if " + defName + " is valid animation");
|
||||
}
|
||||
|
||||
if (!contexts.NullOrEmpty())
|
||||
{
|
||||
foreach (BaseGroupAnimationContext context in contexts)
|
||||
|
|
|
@ -14,6 +14,6 @@ namespace Rimworld_Animations
|
|||
public Rot4 rotation = Rot4.North;
|
||||
public SoundDef sound = null;
|
||||
public VoiceTagDef voice = null;
|
||||
public bool visible = false;
|
||||
public bool visible = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,45 +11,50 @@ namespace Rimworld_Animations {
|
|||
[HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")]
|
||||
static class HarmonyPatch_JobDriver_SexBaseInitiator_Start {
|
||||
public static void Postfix(ref JobDriver_SexBaseInitiator __instance) {
|
||||
/*
|
||||
These particular jobs need special code
|
||||
don't play anim for now
|
||||
*/
|
||||
if(__instance is JobDriver_Masturbate || __instance is JobDriver_ViolateCorpse) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if(!RJWAnimationSettings.PlayAnimForNonsexualActs && NonSexualAct(__instance))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Pawn pawn = __instance.pawn;
|
||||
Pawn partner = __instance.Target as Pawn;
|
||||
|
||||
Building_Bed bed = __instance.Bed;
|
||||
|
||||
if (partner?.jobs?.curDriver is JobDriver_SexBaseReciever partnerSexBaseReceiver) {
|
||||
|
||||
Pawn Target = __instance.Target as Pawn;
|
||||
|
||||
int preAnimDuration = __instance.duration;
|
||||
|
||||
|
||||
List<Pawn> participants = partnerSexBaseReceiver.parteners.Append(partner).ToList();
|
||||
|
||||
GroupAnimationDef groupAnimation = AnimationUtility.FindGroupAnimation(participants, out int reorder);
|
||||
|
||||
if (groupAnimation != null)
|
||||
{
|
||||
Thing anchor = (Thing)__instance.Bed ?? partner;
|
||||
Thing anchor;
|
||||
if (bed != null) anchor = bed;
|
||||
else anchor = partner;
|
||||
|
||||
AnimationUtility.StartGroupAnimation(participants, groupAnimation, reorder, anchor);
|
||||
int animTicks = AnimationUtility.GetAnimationLength(pawn);
|
||||
|
||||
foreach(Pawn participant in participants)
|
||||
{
|
||||
if (RJWAnimationSettings.debugMode)
|
||||
{
|
||||
Log.Message("Participant: " + participant.Name);
|
||||
Log.Message("JobDriver: " + participant.CurJobDef.defName);
|
||||
|
||||
}
|
||||
|
||||
//null ref check for pawns that might have lost their jobs or become null for some reason
|
||||
if (participant?.jobs?.curDriver is JobDriver_Sex participantJobDriver)
|
||||
{
|
||||
participantJobDriver.ticks_left = animTicks;
|
||||
participantJobDriver.sex_ticks = animTicks;
|
||||
participantJobDriver.orgasmStartTick = animTicks;
|
||||
participantJobDriver.duration = animTicks;
|
||||
}
|
||||
|
||||
|
||||
(participant.jobs.curDriver as JobDriver_Sex).ticks_left = animTicks;
|
||||
(participant.jobs.curDriver as JobDriver_Sex).sex_ticks = animTicks;
|
||||
(participant.jobs.curDriver as JobDriver_Sex).orgasmStartTick = animTicks;
|
||||
(participant.jobs.curDriver as JobDriver_Sex).duration = animTicks;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,8 +92,7 @@ namespace Rimworld_Animations {
|
|||
}
|
||||
|
||||
//stop partner's other partners (threesome pawns) animating
|
||||
//added null ref checks for instances when pawns get nulled or lose their jobs
|
||||
if (__instance.Partner?.jobs?.curDriver is JobDriver_SexBaseReciever partnerReceiverJob)
|
||||
if (__instance.Partner.jobs.curDriver is JobDriver_SexBaseReciever partnerReceiverJob)
|
||||
{
|
||||
foreach(Pawn pawn in partnerReceiverJob.parteners)
|
||||
{
|
||||
|
|
|
@ -31,6 +31,13 @@ namespace Rimworld_Animations
|
|||
return true;
|
||||
}
|
||||
|
||||
//set graphic variant nodes to invisible when not animating
|
||||
if (node is PawnRenderNode_GraphicVariants)
|
||||
{
|
||||
__result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,13 +18,14 @@ namespace Rimworld_Animations
|
|||
if (parms.Portrait) return false;
|
||||
|
||||
//don't draw if not visible at tick
|
||||
if (node.AnimationWorker is AnimationWorker_KeyframesExtended extendedAnimator)
|
||||
if (node.AnimationWorker is AnimationWorker_KeyframesExtended extendedAnimator
|
||||
&& !extendedAnimator.visibleAtTick(node.tree.AnimationTick))
|
||||
{
|
||||
return extendedAnimator.visibleAtTick(node.tree.AnimationTick);
|
||||
return false;
|
||||
}
|
||||
|
||||
//don't draw at all if not animating
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
protected override Material GetMaterial(PawnRenderNode node, PawnDrawParms parms)
|
||||
{
|
||||
|
|
|
@ -44,12 +44,6 @@ namespace Rimworld_Animations {
|
|||
//each participant gets their own unique extendedanimatoranchor, important for scribe_deep saving
|
||||
List<AnimationDef> allAnimationsForPawn = groupAnimationDef.GetAllAnimationsForActor(i, seed, reorder);
|
||||
BaseExtendedAnimatorAnchor animatorAnchor = new ExtendedAnimatorAnchor_Thing(anchor);
|
||||
|
||||
if (RJWAnimationSettings.debugMode)
|
||||
{
|
||||
Log.Message("Now playing animation: " + groupAnimationDef.defName);
|
||||
}
|
||||
|
||||
participants[i].TryGetComp<CompExtendedAnimator>().PlayGroupAnimation(allAnimationsForPawn, position, rotation, animatorAnchor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,12 +143,6 @@
|
|||
<Content Include="1.5\Assemblies\0MultiplayerAPI.dll" />
|
||||
<Content Include="1.5\Assemblies\Rimworld-Animations.dll" />
|
||||
<Content Include="1.5\Assemblies\RJW.dll" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\!BasicBestiality.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\BasicBestiality1v1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\BasicBestiality2v1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\BasicBestiality3v1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\BasicBestiality4v1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\BasicBestiality\HumanRotatedOffset.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\AnimationPropDef_Cowgirl_Xray.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage2_1.xml" />
|
||||
|
@ -184,56 +178,6 @@
|
|||
<Content Include="1.5\Defs\AnimationDefs\Missionary\Stage6.xml" />
|
||||
<Content Include="1.5\Defs\AnimationPropDefs\AnimationPropDef_Hand.xml" />
|
||||
<Content Include="1.5\Defs\OffsetDefs\OffsetDef_Placeholder.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\AnimationPropDef_BEV.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle Intro1.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle Intro2.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle Intro3.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle1.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle2.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle3.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle4.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle5.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle6.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle7.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\Doggystyle8.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\GroupAnimation_Doggystyle_Condom_BEV.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\OffsetDef_Doggystyle_BEV_Bottom.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\OffsetDef_Doggystyle_BEV_Top.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationDefs\Doggystyle Condom\TexPathVariants_Doggystyle_BEV.xml" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\Condom.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomOpened.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomUnused.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage1.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage10.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage11.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage2.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage3.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage4.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage5.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage6.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage7.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage8.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithCumStages\CondomWithCumStage9.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\CondomWithPenis.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Condom\UsedCondom.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Cum_Drop.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Cum_Drop_Flipped.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Cum_Splash.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image1.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image2.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image3.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image4.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image5.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image6.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Cum\Image7.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Food\Grape.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Food\VineofGrapes.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Hands\Hand.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Hands\HandClean.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Misc\Image1.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Misc\Phone.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Penis\Penis.png" />
|
||||
<Content Include="1.5\Defs\TestDoNotPush\AnimationProps\BEV\Water\Drop.png" />
|
||||
<Content Include="1.5\Defs\TexPathVariantsDefs\TexPathVariants_XrayPenis_Human.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\TestAnimation1.xml" />
|
||||
<Content Include="1.5\Defs\AnimationDefs\TestAnimation2.xml" />
|
||||
|
|
Loading…
Reference in a new issue