mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
better bodytype offsets for hulk
This commit is contained in:
parent
ce09ac0b2a
commit
04717154e3
7 changed files with 67 additions and 2 deletions
Binary file not shown.
|
@ -23,6 +23,9 @@
|
||||||
</defNames>
|
</defNames>
|
||||||
<isFucking>true</isFucking>
|
<isFucking>true</isFucking>
|
||||||
<initiator>true</initiator>
|
<initiator>true</initiator>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, 0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
</actors>
|
</actors>
|
||||||
|
|
||||||
|
@ -465,6 +468,9 @@
|
||||||
<defNames>
|
<defNames>
|
||||||
<li>Human</li>
|
<li>Human</li>
|
||||||
</defNames>
|
</defNames>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, -0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<defNames>
|
<defNames>
|
||||||
|
@ -473,6 +479,9 @@
|
||||||
<isFucking>true</isFucking>
|
<isFucking>true</isFucking>
|
||||||
<controlGenitalAngle>true</controlGenitalAngle>
|
<controlGenitalAngle>true</controlGenitalAngle>
|
||||||
<initiator>true</initiator>
|
<initiator>true</initiator>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, 0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
</actors>
|
</actors>
|
||||||
<animationStages>
|
<animationStages>
|
||||||
|
@ -879,6 +888,9 @@
|
||||||
<li>Human</li>
|
<li>Human</li>
|
||||||
</defNames>
|
</defNames>
|
||||||
<isFucked>true</isFucked>
|
<isFucked>true</isFucked>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, 0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<defNames>
|
<defNames>
|
||||||
|
@ -886,6 +898,9 @@
|
||||||
</defNames>
|
</defNames>
|
||||||
<initiator>true</initiator>
|
<initiator>true</initiator>
|
||||||
<isFucking>true</isFucking>
|
<isFucking>true</isFucking>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, 0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
</actors>
|
</actors>
|
||||||
|
|
||||||
|
@ -1984,6 +1999,9 @@
|
||||||
</defNames>
|
</defNames>
|
||||||
<isFucked>true</isFucked>
|
<isFucked>true</isFucked>
|
||||||
<initiator>true</initiator>
|
<initiator>true</initiator>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, 0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
@ -1992,6 +2010,9 @@
|
||||||
</defNames>
|
</defNames>
|
||||||
<isFucking>true</isFucking>
|
<isFucking>true</isFucking>
|
||||||
<controlGenitalAngle>true</controlGenitalAngle>
|
<controlGenitalAngle>true</controlGenitalAngle>
|
||||||
|
<bodyTypeOffset>
|
||||||
|
<Hulk>(0, -0.2)</Hulk>
|
||||||
|
</bodyTypeOffset>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</actors>
|
</actors>
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Source\Actors\Actor.cs" />
|
<Compile Include="Source\Actors\Actor.cs" />
|
||||||
<Compile Include="Source\Actors\AlienRaceOffset.cs" />
|
<Compile Include="Source\Actors\AlienRaceOffset.cs" />
|
||||||
|
<Compile Include="Source\Actors\BodyTypeOffset.cs" />
|
||||||
<Compile Include="Source\Animations\AnimationStage.cs" />
|
<Compile Include="Source\Animations\AnimationStage.cs" />
|
||||||
<Compile Include="Source\Animations\Clips\BaseAnimationClip.cs" />
|
<Compile Include="Source\Animations\Clips\BaseAnimationClip.cs" />
|
||||||
<Compile Include="Source\Animations\Clips\PawnAnimationClip.cs" />
|
<Compile Include="Source\Animations\Clips\PawnAnimationClip.cs" />
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace Rimworld_Animations {
|
||||||
public bool isFucking = false;
|
public bool isFucking = false;
|
||||||
public bool isFucked = false;
|
public bool isFucked = false;
|
||||||
public bool controlGenitalAngle = false;
|
public bool controlGenitalAngle = false;
|
||||||
|
public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset();
|
||||||
public Vector3 offset = new Vector2(0, 0);
|
public Vector3 offset = new Vector2(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
Source/Actors/BodyTypeOffset.cs
Normal file
18
Source/Actors/BodyTypeOffset.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Rimworld_Animations {
|
||||||
|
public class BodyTypeOffset {
|
||||||
|
|
||||||
|
public Vector2? Male;
|
||||||
|
public Vector2? Female;
|
||||||
|
public Vector2? Thin;
|
||||||
|
public Vector2? Hulk;
|
||||||
|
public Vector2? Fat;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -78,10 +78,10 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
//TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
|
//TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
|
||||||
/*
|
/*
|
||||||
if (x.defName != "Cowgirl")
|
if (x.defName != "Doggystyle")
|
||||||
return false;
|
return false;
|
||||||
*/
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
if (x.actors[i].isFucking && !rjw.xxx.can_fuck(localParticipants[i])) {
|
if (x.actors[i].isFucking && !rjw.xxx.can_fuck(localParticipants[i])) {
|
||||||
Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " can't fuck");
|
Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " can't fuck");
|
||||||
|
|
|
@ -105,6 +105,30 @@ namespace Rimworld_Animations {
|
||||||
anchor.z += raceOffset.offset.y;
|
anchor.z += raceOffset.offset.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//change the offset based on pawn body type
|
||||||
|
if(pawn?.story?.bodyType != null) {
|
||||||
|
if (pawn.story.bodyType == BodyTypeDefOf.Fat && anim?.actors[actor]?.bodyTypeOffset?.Fat != null) {
|
||||||
|
anchor.x += anim.actors[actor].bodyTypeOffset.Fat.Value.x * (mirror ? -1f : 1f);
|
||||||
|
anchor.z += anim.actors[actor].bodyTypeOffset.Fat.Value.y;
|
||||||
|
}
|
||||||
|
else if (pawn.story.bodyType == BodyTypeDefOf.Female && anim?.actors[actor]?.bodyTypeOffset?.Female != null) {
|
||||||
|
anchor.x += anim.actors[actor].bodyTypeOffset.Female.Value.x * (mirror ? -1f : 1f);
|
||||||
|
anchor.z += anim.actors[actor].bodyTypeOffset.Female.Value.y;
|
||||||
|
}
|
||||||
|
else if (pawn.story.bodyType == BodyTypeDefOf.Male && anim?.actors[actor]?.bodyTypeOffset?.Male != null) {
|
||||||
|
anchor.x += anim.actors[actor].bodyTypeOffset.Male.Value.x * (mirror ? -1f : 1f);
|
||||||
|
anchor.z += anim.actors[actor].bodyTypeOffset.Male.Value.y;
|
||||||
|
}
|
||||||
|
else if (pawn.story.bodyType == BodyTypeDefOf.Thin && anim?.actors[actor]?.bodyTypeOffset?.Thin != null) {
|
||||||
|
anchor.x += anim.actors[actor].bodyTypeOffset.Thin.Value.x * (mirror ? -1f : 1f);
|
||||||
|
anchor.z += anim.actors[actor].bodyTypeOffset.Thin.Value.y;
|
||||||
|
}
|
||||||
|
else if (pawn.story.bodyType == BodyTypeDefOf.Hulk && anim?.actors[actor]?.bodyTypeOffset?.Hulk != null) {
|
||||||
|
anchor.x += anim.actors[actor].bodyTypeOffset.Hulk.Value.x * (mirror ? -1f : 1f);
|
||||||
|
anchor.z += anim.actors[actor].bodyTypeOffset.Hulk.Value.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pawn.jobs.posture = PawnPosture.Standing;
|
pawn.jobs.posture = PawnPosture.Standing;
|
||||||
|
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
|
|
Loading…
Reference in a new issue