Mirror of 1.4.17 from Lovers Lab

This commit is contained in:
ghostclinic3YTB 2023-04-03 21:47:50 -04:00
parent a5ed05c17b
commit ac3b77b5ba
210 changed files with 258 additions and 290 deletions

View file

@ -30,6 +30,7 @@ namespace SizedApparel
public bool isHediffDirty = true;
public bool isApparelDirty = true;
public bool isSkeletonDirty = true;
public bool isBodyAddonDirty = true; // reset all body addon graphics.
public bool hasUnsupportedApparel = true;
public bool havingSex = false;//Obsolete
public bool hasUpdateForSex = false;//Obsolete
@ -216,7 +217,7 @@ namespace SizedApparel
{
if (bodyaddon == null)
continue;
var a = new SizedApparelBodyPart(pawn, this, bodyaddon.partName, bodyaddon.bodyPartOf, bodyaddon.defaultHediffName, bodyaddon.isBreasts, false, bodyaddon.customPath, bodyaddon.colorType);
var a = new SizedApparelBodyPart(pawn, this, bodyaddon.partName, bodyaddon.bodyPartOf, bodyaddon.defaultHediffName, bodyaddon.isBreasts, false, bodyaddon.customPath, bodyaddon.colorType, bodyaddon.mustHaveBone);
a.SetDepthOffsets(bodyaddon.depthOffset.south, bodyaddon.depthOffset.north, bodyaddon.depthOffset.east, bodyaddon.depthOffset.west);
//a.SetDepthOffsets(bodyaddon.depthOffset);
a.SetCenteredTexture(bodyaddon.centeredTexture);
@ -239,7 +240,7 @@ namespace SizedApparel
{
if (bodyaddon == null)
continue;
var a = new SizedApparelBodyPart(pawn, this, bodyaddon.partName, bodyaddon.bodyPartOf, bodyaddon.defaultHediffName, bodyaddon.isBreasts, false, bodyaddon.customPath, bodyaddon.colorType);
var a = new SizedApparelBodyPart(pawn, this, bodyaddon.partName, bodyaddon.bodyPartOf, bodyaddon.defaultHediffName, bodyaddon.isBreasts, false, bodyaddon.customPath, bodyaddon.colorType, bodyaddon.mustHaveBone);
a.SetDepthOffsets(bodyaddon.depthOffset.south, bodyaddon.depthOffset.north, bodyaddon.depthOffset.east, bodyaddon.depthOffset.west);
//a.SetDepthOffsets(bodyaddon.depthOffset);
a.SetCenteredTexture(bodyaddon.centeredTexture);
@ -413,7 +414,7 @@ namespace SizedApparel
bool flag2 = true;
if (flag2 && checkApparelForCanPose)
{
if (!a.CheckCanPose("JiggleUp", true, false, false))
if (!a.CheckCanPose("JiggleUp", true, false, true, true))
return;
flag2 = false;
}
@ -747,12 +748,13 @@ namespace SizedApparel
needToCheckApparelGraphicRecords = false;
}
public void SetDirty(bool clearPawnGraphicSet = false, bool dirtyHediff = true, bool dirtyApparel = true, bool dirtySkeleton = false)
public void SetDirty(bool clearPawnGraphicSet = false, bool dirtyHediff = true, bool dirtyApparel = true, bool dirtySkeleton = false, bool dirtyBodyAddons = false)
{
this.isDirty = true;
this.isHediffDirty = dirtyHediff;
this.isApparelDirty = dirtyApparel;
this.isSkeletonDirty = dirtySkeleton;
this.isBodyAddonDirty = dirtyBodyAddons;
if (clearPawnGraphicSet)
{
if (pawn == null)
@ -936,7 +938,16 @@ namespace SizedApparel
if (isSkeletonDirty)
{
InitSkeleton();
ResetBodyAddonBoneLink();
if (isBodyAddonDirty)
InitBodyAddons();
else
ResetBodyAddonBoneLink();
}
else
{
if (isBodyAddonDirty)
InitBodyAddons();
}
}
@ -951,6 +962,12 @@ namespace SizedApparel
return;
if (pubicHairDef == null)
{
pubicHairDef = SizedApparelUtility.GetRandomPubicHair();
}
if (SizedApparelSettings.Debug)
Log.Message("[SizedApparel] Updating Component of " + pawn.Name);
if (updateGraphics)
@ -1778,6 +1795,7 @@ namespace SizedApparel
if (addon.bodyPartOf == SizedApparelBodyPartOf.Anus)
{
addon.SetHediffData(anusHediff.def.defName, SizedApparelUtility.PrivatePartSeverityInt(anusHediff.Severity), 1000, anusVar?.variation);
addon.SetBone(skeleton?.FindBone("Anus"));
addon.UpdateGraphic();
}
}