mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
alien race offsets
This commit is contained in:
parent
7f1e2314dd
commit
90400a798a
5 changed files with 25 additions and 0 deletions
Binary file not shown.
|
@ -68,6 +68,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<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\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" />
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace Rimworld_Animations {
|
||||||
public class Actor {
|
public class Actor {
|
||||||
public List<string> defNames;
|
public List<string> defNames;
|
||||||
public List<string> requiredGenitals;
|
public List<string> requiredGenitals;
|
||||||
|
public List<AlienRaceOffset> raceOffsets;
|
||||||
public bool activeRole = false;
|
public bool activeRole = false;
|
||||||
public string gender;
|
public string gender;
|
||||||
public bool isFucking = false;
|
public bool isFucking = false;
|
||||||
|
|
16
Source/Actors/AlienRaceOffset.cs
Normal file
16
Source/Actors/AlienRaceOffset.cs
Normal 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -96,6 +96,13 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
isAnimating = true;
|
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;
|
pawn.jobs.posture = PawnPosture.Standing;
|
||||||
|
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
|
|
Loading…
Reference in a new issue