mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v2.0.6
- Fixed an issue where body addons with custom sizes were not scaling correctly - Added additional debugging option which disables the patching of c0ffeeee's animation system - to be used to assist in determining if bugs or other issues are related to this patching
This commit is contained in:
parent
003b67fb97
commit
e139ff14fb
14 changed files with 60 additions and 29 deletions
|
@ -7,6 +7,7 @@ using HarmonyLib;
|
|||
using Verse;
|
||||
using Rimworld_Animations;
|
||||
using rjw;
|
||||
using AlienRace;
|
||||
|
||||
namespace Rimworld_Animations_Patch
|
||||
{
|
||||
|
@ -184,6 +185,34 @@ namespace Rimworld_Animations_Patch
|
|||
return 1f;
|
||||
}
|
||||
|
||||
public static Vector2 DetermineDrawSize(Pawn pawn, AlienPartGenerator.AlienComp alienComp, AlienPartGenerator.BodyAddon bodyAddon, BodyAddonData bodyAddonData, bool isPortrait)
|
||||
{
|
||||
Vector2 drawSize = isPortrait && bodyAddon.drawSizePortrait != Vector2.zero ? bodyAddon.drawSizePortrait : bodyAddon.drawSize;
|
||||
|
||||
if (bodyAddon.scaleWithPawnDrawsize)
|
||||
{
|
||||
if (isPortrait && bodyAddonData.alignsWithHead)
|
||||
{ drawSize *= alienComp.customPortraitHeadDrawSize; }
|
||||
|
||||
else if (bodyAddonData.alignsWithHead)
|
||||
{ drawSize *= alienComp.customHeadDrawSize; }
|
||||
|
||||
else if (isPortrait)
|
||||
{ drawSize *= alienComp.customPortraitDrawSize; }
|
||||
|
||||
else
|
||||
{ drawSize *= alienComp.customDrawSize; }
|
||||
}
|
||||
|
||||
if (ModsConfig.BiotechActive)
|
||||
{ drawSize *= pawn.ageTracker.CurLifeStage.bodyWidth ?? 1.5f; }
|
||||
|
||||
else
|
||||
{ drawSize *= 1.5f; }
|
||||
|
||||
return drawSize;
|
||||
}
|
||||
|
||||
private static Dictionary<string, Vector3> raceSpecificChildMultipliers = new Dictionary<string, Vector3>()
|
||||
{
|
||||
{ "Alien_Orassan", new Vector3(1.4f, 1.4f, 1.4f) },
|
||||
|
|
|
@ -70,6 +70,16 @@ namespace Rimworld_Animations_Patch
|
|||
return false;
|
||||
}
|
||||
|
||||
public static RJWPreferenceSettings.Clothing GetClothingPreference(Pawn pawn)
|
||||
{
|
||||
var clothingPreference = pawn.IsInBed(out Building bed) ? RJWPreferenceSettings.sex_wear : ApparelSettings.apparelWornForQuickies;
|
||||
|
||||
if (xxx.has_quirk(pawn, "Endytophile"))
|
||||
{ clothingPreference = RJWPreferenceSettings.Clothing.Clothed; }
|
||||
|
||||
return clothingPreference;
|
||||
}
|
||||
|
||||
public static void DetermineApparelToKeepOn(Pawn pawn)
|
||||
{
|
||||
if (pawn?.apparel?.WornApparel == null) return;
|
||||
|
@ -81,10 +91,7 @@ namespace Rimworld_Animations_Patch
|
|||
}
|
||||
|
||||
ActorAnimationData animData = pawn.GetAnimationData();
|
||||
var clothingPreference = pawn.IsInBed(out Building bed) ? RJWPreferenceSettings.sex_wear : ApparelSettings.apparelWornForQuickies;
|
||||
|
||||
if (xxx.has_quirk(pawn, "Endytophile"))
|
||||
{ clothingPreference = RJWPreferenceSettings.Clothing.Clothed; }
|
||||
var clothingPreference = GetClothingPreference(pawn);
|
||||
|
||||
// Get naked for rituals and parties
|
||||
bool undressForRitual = pawn.GetLord() != null && pawn.GetLord().LordJob is LordJob_Ritual;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue