mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Compare commits
5 commits
0e9419b039
...
8a93f3b087
Author | SHA1 | Date | |
---|---|---|---|
|
8a93f3b087 | ||
|
e639ae8fb8 | ||
|
7596fe86c6 | ||
|
775d3d913e | ||
|
eead6ae7ca |
9 changed files with 97 additions and 44 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -348,3 +348,11 @@ healthchecksdb
|
||||||
/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs
|
/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs
|
||||||
/Source/Patches/ThingAnimationPatches/HarmonyPatch_ThingDrawAt.cs
|
/Source/Patches/ThingAnimationPatches/HarmonyPatch_ThingDrawAt.cs
|
||||||
/Defs/AnimationDefs/Animations_SexToys.xml
|
/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,11 +19,6 @@ namespace Rimworld_Animations
|
||||||
public bool canAnimationBeUsed(List<Pawn> actors)
|
public bool canAnimationBeUsed(List<Pawn> actors)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (RJWAnimationSettings.debugMode)
|
|
||||||
{
|
|
||||||
Log.Message("[anims] Checking if " + defName + " is valid animation");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!contexts.NullOrEmpty())
|
if (!contexts.NullOrEmpty())
|
||||||
{
|
{
|
||||||
foreach (BaseGroupAnimationContext context in contexts)
|
foreach (BaseGroupAnimationContext context in contexts)
|
||||||
|
|
|
@ -14,6 +14,6 @@ namespace Rimworld_Animations
|
||||||
public Rot4 rotation = Rot4.North;
|
public Rot4 rotation = Rot4.North;
|
||||||
public SoundDef sound = null;
|
public SoundDef sound = null;
|
||||||
public VoiceTagDef voice = null;
|
public VoiceTagDef voice = null;
|
||||||
public bool visible = true;
|
public bool visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,50 +11,45 @@ namespace Rimworld_Animations {
|
||||||
[HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")]
|
[HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")]
|
||||||
static class HarmonyPatch_JobDriver_SexBaseInitiator_Start {
|
static class HarmonyPatch_JobDriver_SexBaseInitiator_Start {
|
||||||
public static void Postfix(ref JobDriver_SexBaseInitiator __instance) {
|
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 pawn = __instance.pawn;
|
||||||
Pawn partner = __instance.Target as Pawn;
|
Pawn partner = __instance.Target as Pawn;
|
||||||
Building_Bed bed = __instance.Bed;
|
|
||||||
|
|
||||||
if (partner?.jobs?.curDriver is JobDriver_SexBaseReciever partnerSexBaseReceiver) {
|
if (partner?.jobs?.curDriver is JobDriver_SexBaseReciever partnerSexBaseReceiver) {
|
||||||
|
|
||||||
Pawn Target = __instance.Target as Pawn;
|
Pawn Target = __instance.Target as Pawn;
|
||||||
|
|
||||||
int preAnimDuration = __instance.duration;
|
|
||||||
|
|
||||||
|
|
||||||
List<Pawn> participants = partnerSexBaseReceiver.parteners.Append(partner).ToList();
|
List<Pawn> participants = partnerSexBaseReceiver.parteners.Append(partner).ToList();
|
||||||
|
|
||||||
GroupAnimationDef groupAnimation = AnimationUtility.FindGroupAnimation(participants, out int reorder);
|
GroupAnimationDef groupAnimation = AnimationUtility.FindGroupAnimation(participants, out int reorder);
|
||||||
|
|
||||||
if (groupAnimation != null)
|
if (groupAnimation != null)
|
||||||
{
|
{
|
||||||
Thing anchor;
|
Thing anchor = (Thing)__instance.Bed ?? partner;
|
||||||
if (bed != null) anchor = bed;
|
|
||||||
else anchor = partner;
|
|
||||||
|
|
||||||
AnimationUtility.StartGroupAnimation(participants, groupAnimation, reorder, anchor);
|
AnimationUtility.StartGroupAnimation(participants, groupAnimation, reorder, anchor);
|
||||||
int animTicks = AnimationUtility.GetAnimationLength(pawn);
|
int animTicks = AnimationUtility.GetAnimationLength(pawn);
|
||||||
|
|
||||||
foreach(Pawn participant in participants)
|
foreach(Pawn participant in participants)
|
||||||
{
|
{
|
||||||
(participant.jobs.curDriver as JobDriver_Sex).ticks_left = animTicks;
|
if (RJWAnimationSettings.debugMode)
|
||||||
(participant.jobs.curDriver as JobDriver_Sex).sex_ticks = animTicks;
|
{
|
||||||
(participant.jobs.curDriver as JobDriver_Sex).orgasmStartTick = animTicks;
|
Log.Message("Participant: " + participant.Name);
|
||||||
(participant.jobs.curDriver as JobDriver_Sex).duration = animTicks;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +87,8 @@ namespace Rimworld_Animations {
|
||||||
}
|
}
|
||||||
|
|
||||||
//stop partner's other partners (threesome pawns) animating
|
//stop partner's other partners (threesome pawns) animating
|
||||||
if (__instance.Partner.jobs.curDriver is JobDriver_SexBaseReciever partnerReceiverJob)
|
//added null ref checks for instances when pawns get nulled or lose their jobs
|
||||||
|
if (__instance.Partner?.jobs?.curDriver is JobDriver_SexBaseReciever partnerReceiverJob)
|
||||||
{
|
{
|
||||||
foreach(Pawn pawn in partnerReceiverJob.parteners)
|
foreach(Pawn pawn in partnerReceiverJob.parteners)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,13 +31,6 @@ namespace Rimworld_Animations
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set graphic variant nodes to invisible when not animating
|
|
||||||
if (node is PawnRenderNode_GraphicVariants)
|
|
||||||
{
|
|
||||||
__result = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,13 @@ namespace Rimworld_Animations
|
||||||
if (parms.Portrait) return false;
|
if (parms.Portrait) return false;
|
||||||
|
|
||||||
//don't draw if not visible at tick
|
//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 false;
|
return extendedAnimator.visibleAtTick(node.tree.AnimationTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//don't draw at all if not animating
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
protected override Material GetMaterial(PawnRenderNode node, PawnDrawParms parms)
|
protected override Material GetMaterial(PawnRenderNode node, PawnDrawParms parms)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,6 +44,12 @@ namespace Rimworld_Animations {
|
||||||
//each participant gets their own unique extendedanimatoranchor, important for scribe_deep saving
|
//each participant gets their own unique extendedanimatoranchor, important for scribe_deep saving
|
||||||
List<AnimationDef> allAnimationsForPawn = groupAnimationDef.GetAllAnimationsForActor(i, seed, reorder);
|
List<AnimationDef> allAnimationsForPawn = groupAnimationDef.GetAllAnimationsForActor(i, seed, reorder);
|
||||||
BaseExtendedAnimatorAnchor animatorAnchor = new ExtendedAnimatorAnchor_Thing(anchor);
|
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);
|
participants[i].TryGetComp<CompExtendedAnimator>().PlayGroupAnimation(allAnimationsForPawn, position, rotation, animatorAnchor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,6 +143,12 @@
|
||||||
<Content Include="1.5\Assemblies\0MultiplayerAPI.dll" />
|
<Content Include="1.5\Assemblies\0MultiplayerAPI.dll" />
|
||||||
<Content Include="1.5\Assemblies\Rimworld-Animations.dll" />
|
<Content Include="1.5\Assemblies\Rimworld-Animations.dll" />
|
||||||
<Content Include="1.5\Assemblies\RJW.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\AnimationPropDef_Cowgirl_Xray.xml" />
|
||||||
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage1.xml" />
|
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage1.xml" />
|
||||||
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage2_1.xml" />
|
<Content Include="1.5\Defs\AnimationDefs\Cowgirl\Cowgirl_Stage2_1.xml" />
|
||||||
|
@ -178,6 +184,56 @@
|
||||||
<Content Include="1.5\Defs\AnimationDefs\Missionary\Stage6.xml" />
|
<Content Include="1.5\Defs\AnimationDefs\Missionary\Stage6.xml" />
|
||||||
<Content Include="1.5\Defs\AnimationPropDefs\AnimationPropDef_Hand.xml" />
|
<Content Include="1.5\Defs\AnimationPropDefs\AnimationPropDef_Hand.xml" />
|
||||||
<Content Include="1.5\Defs\OffsetDefs\OffsetDef_Placeholder.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\TexPathVariantsDefs\TexPathVariants_XrayPenis_Human.xml" />
|
||||||
<Content Include="1.5\Defs\AnimationDefs\TestAnimation1.xml" />
|
<Content Include="1.5\Defs\AnimationDefs\TestAnimation1.xml" />
|
||||||
<Content Include="1.5\Defs\AnimationDefs\TestAnimation2.xml" />
|
<Content Include="1.5\Defs\AnimationDefs\TestAnimation2.xml" />
|
||||||
|
|
Loading…
Reference in a new issue