This commit is contained in:
AbstractConcept 2022-10-01 21:14:35 -05:00
parent d18d422a94
commit fcf187c7dd
22 changed files with 184 additions and 41 deletions

View file

@ -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;
}
}
}