mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v 1.2.4
This commit is contained in:
parent
d18d422a94
commit
fcf187c7dd
22 changed files with 184 additions and 41 deletions
|
@ -172,5 +172,43 @@ namespace Rimworld_Animations_Patch
|
|||
|
||||
return anchor;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ShouldNotDrawAddonsForPawn(Pawn pawn)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static float GetBodySize(Pawn pawn)
|
||||
{
|
||||
return 1f;
|
||||
}
|
||||
|
||||
private static Dictionary<string, Vector3> raceSpecifocChildMultipliers = new Dictionary<string, Vector3>()
|
||||
{
|
||||
{ "Alien_Orassan", new Vector3(1.4f, 1.4f, 1.4f) },
|
||||
{ "Alien_Cutebold", new Vector3(1.2f, 1f, 1f) },
|
||||
};
|
||||
|
||||
public static Vector2 GetRaceSpecificOffsetMultipliers(Pawn pawn, string bodypart)
|
||||
{
|
||||
Vector2 multiplierVector = new Vector2();
|
||||
|
||||
if (GetBodySize(pawn) == 1f || raceSpecifocChildMultipliers.TryGetValue(pawn.def.defName, out Vector3 raceVector) == false)
|
||||
{ raceVector = new Vector3(1f, 1f, 1f); }
|
||||
|
||||
if (bodypart?.ToLower() == "tail")
|
||||
{
|
||||
multiplierVector.x = raceVector.z;
|
||||
multiplierVector.y = raceVector.x;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
multiplierVector.x = raceVector.y;
|
||||
multiplierVector.y = raceVector.x;
|
||||
}
|
||||
|
||||
return multiplierVector;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue