mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Minor tweaks for rjw 4.1.0 +
Relevant animation context when applicable
This commit is contained in:
parent
e2c80c9423
commit
7f1e2314dd
8 changed files with 44 additions and 13 deletions
Binary file not shown.
|
@ -4,6 +4,10 @@
|
||||||
<defName>Quadruped_Doggystyle</defName>
|
<defName>Quadruped_Doggystyle</defName>
|
||||||
<label>quadruped doggystyle</label>
|
<label>quadruped doggystyle</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>Anal</li>
|
||||||
|
<li>Vaginal</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<defNames>
|
<defNames>
|
||||||
|
@ -20,6 +24,8 @@
|
||||||
</li>
|
</li>
|
||||||
</actors>
|
</actors>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<animationStages>
|
<animationStages>
|
||||||
<li>
|
<li>
|
||||||
<stageName>Fuck</stageName>
|
<stageName>Fuck</stageName>
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
<defName>Tribadism</defName>
|
<defName>Tribadism</defName>
|
||||||
<label>scissoring</label>
|
<label>scissoring</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>Scissoring</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<defNames>
|
<defNames>
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
<defName>Double_Penetration</defName>
|
<defName>Double_Penetration</defName>
|
||||||
<label>double penetration</label>
|
<label>double penetration</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>DoublePenetration</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<defNames>
|
<defNames>
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
<defName>Doggystyle</defName>
|
<defName>Doggystyle</defName>
|
||||||
<label>doggystyle</label>
|
<label>doggystyle</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>Vaginal</li>
|
||||||
|
<li>Anal</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<!--each type cooresponds to an animation clip in each animationStage-->
|
<!--each type cooresponds to an animation clip in each animationStage-->
|
||||||
|
@ -450,6 +454,9 @@
|
||||||
<defName>Blowjob</defName>
|
<defName>Blowjob</defName>
|
||||||
<label>blowjob</label>
|
<label>blowjob</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>Oral</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<!--each type cooresponds to an animation clip in each animationStage-->
|
<!--each type cooresponds to an animation clip in each animationStage-->
|
||||||
|
@ -847,6 +854,10 @@
|
||||||
<defName>ReverseStandAndCarry</defName>
|
<defName>ReverseStandAndCarry</defName>
|
||||||
<label>ReverseStandAndCarry</label>
|
<label>ReverseStandAndCarry</label>
|
||||||
<sounds>true</sounds>
|
<sounds>true</sounds>
|
||||||
|
<sexTypes>
|
||||||
|
<li>Anal</li>
|
||||||
|
<li>Oral</li>
|
||||||
|
</sexTypes>
|
||||||
<actors>
|
<actors>
|
||||||
<li>
|
<li>
|
||||||
<!--each type cooresponds to an animation clip in each animationStage-->
|
<!--each type cooresponds to an animation clip in each animationStage-->
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Rimworld_Animations {
|
||||||
Note: always make the list in this order:
|
Note: always make the list in this order:
|
||||||
Female pawns, animal female pawns, male pawns, animal male pawns
|
Female pawns, animal female pawns, male pawns, animal male pawns
|
||||||
*/
|
*/
|
||||||
public static AnimationDef tryFindAnimation(ref List<Pawn> participants) {
|
public static AnimationDef tryFindAnimation(ref List<Pawn> participants, rjw.xxx.rjwSextype sexType = 0) {
|
||||||
|
|
||||||
//aggressors first
|
//aggressors first
|
||||||
participants = participants.OrderByDescending(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator).ToList();
|
participants = participants.OrderByDescending(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator).ToList();
|
||||||
|
@ -84,6 +84,13 @@ namespace Rimworld_Animations {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
List<AnimationDef> optionsWithSexType = options.ToList().FindAll(x => x.sexTypes.Contains(sexType));
|
||||||
|
|
||||||
|
if (optionsWithSexType.Any()) {
|
||||||
|
Log.Message("Selecting animation for rjwSexType " + sexType.ToStringSafe() + "...");
|
||||||
|
return optionsWithSexType.RandomElement();
|
||||||
|
}
|
||||||
|
|
||||||
if (options != null && options.Any()) {
|
if (options != null && options.Any()) {
|
||||||
Log.Message("Randomly selecting animation...");
|
Log.Message("Randomly selecting animation...");
|
||||||
return options.RandomElement();
|
return options.RandomElement();
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Rimworld_Animations {
|
||||||
public List<Actor> actors;
|
public List<Actor> actors;
|
||||||
public int animationTimeTicks = 0; //do not set manually
|
public int animationTimeTicks = 0; //do not set manually
|
||||||
public bool sounds = false;
|
public bool sounds = false;
|
||||||
|
public List<rjw.xxx.rjwSextype> sexTypes;
|
||||||
|
|
||||||
public override void PostLoad() {
|
public override void PostLoad() {
|
||||||
base.PostLoad();
|
base.PostLoad();
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace Rimworld_Animations {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pawn Target = __instance.Target;
|
Pawn Target = __instance.Target as Pawn;
|
||||||
Pawn pawn = __instance.pawn;
|
Pawn pawn = __instance.pawn;
|
||||||
|
|
||||||
Building_Bed bed = __instance.Bed;
|
Building_Bed bed = __instance.Bed;
|
||||||
|
@ -33,22 +33,22 @@ namespace Rimworld_Animations {
|
||||||
bed = (__instance as JobDriver_SexCasualForAnimation).Bed;
|
bed = (__instance as JobDriver_SexCasualForAnimation).Bed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance.Target.jobs?.curDriver is JobDriver_SexBaseReciever) {
|
if ((__instance.Target as Pawn).jobs?.curDriver is JobDriver_SexBaseReciever) {
|
||||||
|
|
||||||
if (!(Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Contains(pawn)) {
|
if (!(Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Contains(pawn)) {
|
||||||
(Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Add(pawn);
|
(Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Add(pawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bed != null) {
|
if (bed != null) {
|
||||||
RerollAnimations(Target, __instance.duration, bed as Thing);
|
RerollAnimations(Target, __instance.duration, bed as Thing, __instance.sexType);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RerollAnimations(Target, __instance.duration);
|
RerollAnimations(Target, __instance.duration, sexType: __instance.sexType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RerollAnimations(Pawn pawn, int duration, Thing bed = null) {
|
public static void RerollAnimations(Pawn pawn, int duration, Thing bed = null, xxx.rjwSextype sexType = xxx.rjwSextype.None) {
|
||||||
|
|
||||||
if(pawn == null || !(pawn.jobs?.curDriver is JobDriver_SexBaseReciever)) {
|
if(pawn == null || !(pawn.jobs?.curDriver is JobDriver_SexBaseReciever)) {
|
||||||
Log.Message("Error: Tried to reroll animations when pawn isn't sexing");
|
Log.Message("Error: Tried to reroll animations when pawn isn't sexing");
|
||||||
|
@ -61,7 +61,7 @@ namespace Rimworld_Animations {
|
||||||
pawnsToAnimate = pawnsToAnimate.Append(pawn).ToList();
|
pawnsToAnimate = pawnsToAnimate.Append(pawn).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationDef anim = AnimationUtility.tryFindAnimation(ref pawnsToAnimate);
|
AnimationDef anim = AnimationUtility.tryFindAnimation(ref pawnsToAnimate, sexType);
|
||||||
|
|
||||||
if (anim != null) {
|
if (anim != null) {
|
||||||
|
|
||||||
|
@ -138,10 +138,10 @@ namespace Rimworld_Animations {
|
||||||
__instance.pawn.mindState.canLovinTick = Find.TickManager.TicksGame + ticksToNextLovin;
|
__instance.pawn.mindState.canLovinTick = Find.TickManager.TicksGame + ticksToNextLovin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance.Target.jobs?.curDriver is JobDriver_SexBaseReciever) {
|
if ((__instance.Target as Pawn)?.jobs?.curDriver is JobDriver_SexBaseReciever) {
|
||||||
if (__instance.pawn.TryGetComp<CompBodyAnimator>().isAnimating) {
|
if (__instance.pawn.TryGetComp<CompBodyAnimator>().isAnimating) {
|
||||||
|
|
||||||
List<Pawn> parteners = (__instance.Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners;
|
List<Pawn> parteners = ((__instance.Target as Pawn)?.jobs.curDriver as JobDriver_SexBaseReciever).parteners;
|
||||||
|
|
||||||
for (int i = 0; i < parteners.Count; i++) {
|
for (int i = 0; i < parteners.Count; i++) {
|
||||||
|
|
||||||
|
@ -153,13 +153,13 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
__instance.Target.TryGetComp<CompBodyAnimator>().isAnimating = false;
|
__instance.Target.TryGetComp<CompBodyAnimator>().isAnimating = false;
|
||||||
|
|
||||||
if (xxx.is_human(__instance.Target)) {
|
if (xxx.is_human((__instance.Target as Pawn))) {
|
||||||
__instance.Target.Drawer.renderer.graphics.ResolveApparelGraphics();
|
(__instance.Target as Pawn)?.Drawer.renderer.graphics.ResolveApparelGraphics();
|
||||||
PortraitsCache.SetDirty(__instance.Target);
|
PortraitsCache.SetDirty((__instance.Target as Pawn));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(__instance.Target.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Remove(__instance.pawn);
|
((__instance.Target as Pawn)?.jobs.curDriver as JobDriver_SexBaseReciever).parteners.Remove(__instance.pawn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue