mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v2.0.3
- Fixed a bug that was causing alien addons to not render when pawns were wearing apparel
This commit is contained in:
parent
9144029fec
commit
001121649b
11 changed files with 20 additions and 13 deletions
|
@ -138,8 +138,8 @@ namespace Rimworld_Animations_Patch
|
|||
|
||||
public void UpdateVisibility()
|
||||
{
|
||||
if (pawn == null || bodyAddon == null || bodyPartRecord == null) return;
|
||||
canDraw = true;
|
||||
if (pawn == null || bodyAddon == null || bodyPartRecord == null) return;
|
||||
|
||||
if (pawn.health?.hediffSet?.GetNotMissingParts()?.Contains(bodyPartRecord) == false)
|
||||
{ bodyPartMissing = true; return; }
|
||||
|
@ -151,6 +151,7 @@ namespace Rimworld_Animations_Patch
|
|||
{
|
||||
CompApparelVisibility comp = apparel?.TryGetComp<CompApparelVisibility>();
|
||||
if (comp == null) continue;
|
||||
|
||||
LoadRimNudeData(comp);
|
||||
|
||||
if (comp.isBeingWorn == false) continue;
|
||||
|
@ -158,7 +159,7 @@ namespace Rimworld_Animations_Patch
|
|||
if (bodyAddon.bodyPart == PatchBodyPartDefOf.Genitals ||
|
||||
bodyAddon.bodyPart == PatchBodyPartDefOf.Anus ||
|
||||
bodyAddon.bodyPart == PatchBodyPartDefOf.Chest ||
|
||||
bodyAddon.hediffGraphics?.Any(x => x.path.NullOrEmpty() == false && (x.path.Contains("belly") || x.path.Contains("Belly"))) == true)
|
||||
bodyAddon.hediffGraphics?.Any(x => x.path.NullOrEmpty() == false && x.path.Contains("belly", StringComparison.OrdinalIgnoreCase)) == true)
|
||||
{
|
||||
if ((bodyAddon.bodyPart == PatchBodyPartDefOf.Genitals || bodyAddon.bodyPart == PatchBodyPartDefOf.Anus) && comp.coversGroin)
|
||||
{ canDraw = false; return; };
|
||||
|
@ -166,16 +167,19 @@ namespace Rimworld_Animations_Patch
|
|||
if (bodyAddon.bodyPart == PatchBodyPartDefOf.Chest && comp.coversChest)
|
||||
{ canDraw = false; return; };
|
||||
|
||||
if (bodyAddon.hediffGraphics?.Any(x => x.path.NullOrEmpty() == false && (x.path.Contains("belly") || x.path.Contains("Belly"))) == true && comp.coversBelly)
|
||||
if (bodyAddon.hediffGraphics?.Any(x => x.path.NullOrEmpty() == false && x.path.Contains("belly", StringComparison.OrdinalIgnoreCase)) == true && comp.coversBelly)
|
||||
{ canDraw = false; return; }
|
||||
}
|
||||
|
||||
else if (apparel.def.apparel.hatRenderedFrontOfFace || apparel.def.apparel.hatRenderedAboveBody || apparel.def.apparel.hatRenderedBehindHead)
|
||||
{ return; }
|
||||
|
||||
else
|
||||
{
|
||||
if (bodyAddon.hiddenUnderApparelFor?.Any(x => apparel?.def.apparel?.hatRenderedFrontOfFace == false && apparel.def.apparel?.bodyPartGroups?.Contains(x) == true) == true)
|
||||
if (bodyAddon.hiddenUnderApparelFor?.Any(x => apparel.def.apparel.bodyPartGroups?.Contains(x) == true) == true)
|
||||
{ canDraw = false; return; };
|
||||
|
||||
if (bodyAddon.hiddenUnderApparelTag?.Any(x => apparel?.def.apparel?.hatRenderedFrontOfFace == false && apparel.def.apparel?.tags?.Contains(x) == true) == true)
|
||||
if (bodyAddon.hiddenUnderApparelTag?.Any(x => apparel.def.apparel.tags?.Contains(x) == true) == true)
|
||||
{ canDraw = false; return; };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue