mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
improving context by using rjw's new sexprops
This commit is contained in:
parent
a890f7ccd7
commit
cd7a778f07
5 changed files with 74 additions and 9 deletions
Binary file not shown.
|
@ -671,5 +671,53 @@
|
|||
</animationStages>
|
||||
|
||||
</Rimworld_Animations.AnimationDef>
|
||||
|
||||
<!--
|
||||
<Rimworld_Animations.AnimationDef>
|
||||
<defName>Cunnilingus</defName>
|
||||
<label>cunnilingus</label>
|
||||
<sounds>true</sounds>
|
||||
<sexTypes>
|
||||
<li>Vaginal</li>
|
||||
</sexTypes>
|
||||
<actors>
|
||||
<li>
|
||||
<defNames>
|
||||
<li>Human</li>
|
||||
</defNames>
|
||||
<isFucked>true</isFucked>
|
||||
</li>
|
||||
<li>
|
||||
<defNames>
|
||||
<li>Human</li>
|
||||
</defNames>
|
||||
<initiator>true</initiator>
|
||||
</li>
|
||||
</actors>
|
||||
|
||||
|
||||
|
||||
<animationStages>
|
||||
<li>
|
||||
<stageName>Slow</stageName>
|
||||
<isLooping>True</isLooping>
|
||||
<playTimeTicks></playTimeTicks>
|
||||
<stageIndex>0</stageIndex>
|
||||
<animationClips>
|
||||
<li Class="Rimworld_Animations.PawnAnimationClip">
|
||||
<layer>LayingPawn</layer>
|
||||
<keyframes>
|
||||
<li></li>
|
||||
</keyframes>
|
||||
</li>
|
||||
<li Class="Rimworld_Animations.PawnAnimationClip">
|
||||
<keyframes></keyframes>
|
||||
</li>
|
||||
</animationClips>
|
||||
</li>
|
||||
|
||||
</animationStages>
|
||||
|
||||
</Rimworld_Animations.AnimationDef>
|
||||
-->
|
||||
</Defs>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJW">
|
||||
<HintPath>..\RJW\1.1\Assemblies\RJW.dll</HintPath>
|
||||
<HintPath>..\rjw-master\1.1\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -14,11 +14,13 @@ namespace Rimworld_Animations {
|
|||
Note: always make the list in this order:
|
||||
Female pawns, animal female pawns, male pawns, animal male pawns
|
||||
*/
|
||||
public static AnimationDef tryFindAnimation(ref List<Pawn> participants, rjw.xxx.rjwSextype sexType = 0) {
|
||||
public static AnimationDef tryFindAnimation(ref List<Pawn> participants, rjw.xxx.rjwSextype sexType = 0, rjw.SexProps sexProps = null) {
|
||||
|
||||
//aggressors last
|
||||
participants = participants.OrderBy(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator).ToList();
|
||||
|
||||
participants = participants.OrderBy(p => p == sexProps.Giver).ToList();
|
||||
|
||||
participants = participants.OrderByDescending(p => rjw.GenderHelper.GetSex(p) == rjw.GenderHelper.Sex.futa).ToList();
|
||||
|
||||
//pawns that can fuck last
|
||||
|
@ -30,7 +32,6 @@ namespace Rimworld_Animations {
|
|||
IEnumerable<AnimationDef> options = DefDatabase<AnimationDef>.AllDefs.Where((AnimationDef x) => {
|
||||
|
||||
|
||||
|
||||
if (x.actors.Count != localParticipants.Count) {
|
||||
return false;
|
||||
}
|
||||
|
@ -191,7 +192,15 @@ namespace Rimworld_Animations {
|
|||
|
||||
//if the animation not for initiators, but an initiator is playing it
|
||||
|
||||
if (x.actors[i].initiator && !(localParticipants[i].jobs.curDriver is rjw.JobDriver_SexBaseInitiator)) {
|
||||
if(sexProps != null) {
|
||||
|
||||
if(x.actors[i].initiator && localParticipants[i] == sexProps.Reciever) {
|
||||
initiatorsAlignWithSexType = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (x.actors[i].initiator && !(localParticipants[i].jobs.curDriver is rjw.JobDriver_SexBaseInitiator)) {
|
||||
initiatorsAlignWithSexType = false;
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +212,15 @@ namespace Rimworld_Animations {
|
|||
|
||||
//if the animation not for initiators, but an initiator is playing it
|
||||
|
||||
if (x.actors[i].initiator && !(localParticipants[i].jobs.curDriver is rjw.JobDriver_SexBaseInitiator)) {
|
||||
if (sexProps != null) {
|
||||
|
||||
if (x.actors[i].initiator && localParticipants[i] == sexProps.Giver) {
|
||||
initiatorsAlignWithSexType = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (x.actors[i].initiator && !(localParticipants[i].jobs.curDriver is rjw.JobDriver_SexBaseInitiator)) {
|
||||
initiatorsAlignWithSexType = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,15 +55,15 @@ namespace Rimworld_Animations {
|
|||
bool quickie = (__instance is JobDriver_SexQuick) && AnimationSettings.fastAnimForQuickie;
|
||||
|
||||
if (bed != null) {
|
||||
RerollAnimations(Target, __instance.duration, bed as Thing, __instance.sexType, quickie);
|
||||
RerollAnimations(Target, __instance.duration, bed as Thing, __instance.sexType, quickie, sexProps: __instance.Sexprops);
|
||||
}
|
||||
else {
|
||||
RerollAnimations(Target, __instance.duration, sexType: __instance.sexType, fastAnimForQuickie: quickie);
|
||||
RerollAnimations(Target, __instance.duration, sexType: __instance.sexType, fastAnimForQuickie: quickie, sexProps: __instance.Sexprops);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RerollAnimations(Pawn pawn, int duration, Thing bed = null, xxx.rjwSextype sexType = xxx.rjwSextype.None, bool fastAnimForQuickie = false) {
|
||||
public static void RerollAnimations(Pawn pawn, int duration, Thing bed = null, xxx.rjwSextype sexType = xxx.rjwSextype.None, bool fastAnimForQuickie = false, rjw.SexProps sexProps = null) {
|
||||
|
||||
if(pawn == null || !(pawn.jobs?.curDriver is JobDriver_SexBaseReciever)) {
|
||||
Log.Message("Error: Tried to reroll animations when pawn isn't sexing");
|
||||
|
@ -76,7 +76,7 @@ namespace Rimworld_Animations {
|
|||
pawnsToAnimate = pawnsToAnimate.Append(pawn).ToList();
|
||||
}
|
||||
|
||||
AnimationDef anim = AnimationUtility.tryFindAnimation(ref pawnsToAnimate, sexType);
|
||||
AnimationDef anim = AnimationUtility.tryFindAnimation(ref pawnsToAnimate, sexType, sexProps);
|
||||
|
||||
if (anim != null) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue