alien race offsets

This commit is contained in:
Platinum 2020-04-18 09:49:03 -07:00
parent 7f1e2314dd
commit 90400a798a
5 changed files with 25 additions and 0 deletions

View File

@ -68,6 +68,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Source\Actors\Actor.cs" />
<Compile Include="Source\Actors\AlienRaceOffset.cs" />
<Compile Include="Source\Animations\AnimationStage.cs" />
<Compile Include="Source\Animations\Clips\BaseAnimationClip.cs" />
<Compile Include="Source\Animations\Clips\PawnAnimationClip.cs" />

View File

@ -9,6 +9,7 @@ namespace Rimworld_Animations {
public class Actor {
public List<string> defNames;
public List<string> requiredGenitals;
public List<AlienRaceOffset> raceOffsets;
public bool activeRole = false;
public string gender;
public bool isFucking = false;

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Rimworld_Animations {
public class AlienRaceOffset {
public string defName;
public float x = 0;
public float z = 0;
}
}

View File

@ -96,6 +96,13 @@ namespace Rimworld_Animations {
isAnimating = true;
AlienRaceOffset offset = anim?.actors[actor]?.raceOffsets?.Find(x => x.defName == pawn.def.defName);
if (offset != null) {
anchor.x += offset.x;
anchor.z += offset.z;
}
pawn.jobs.posture = PawnPosture.Standing;
this.actor = actor;