Mirror of 1.4.22 from Lovers Lab

This commit is contained in:
ghostclinic3YTB 2023-04-03 21:48:55 -04:00
parent 5d0da3bc88
commit b501ddfb0f
1119 changed files with 12505 additions and 2543 deletions

View file

@ -461,6 +461,8 @@ namespace SizedApparel
}
//Apparel Graphic Texture injection
[StaticConstructorOnStartup]
[HarmonyPatch(typeof(ApparelGraphicRecordGetter), "TryGetGraphicApparel")]
[HarmonyBefore(new string[]{"QualityOfBuilding"})]
@ -477,7 +479,6 @@ namespace SizedApparel
if (bodyType == null)
return;
if (apparel.Wearer != null)
{
//rec = new ApparelGraphicRecord(null, null);
@ -540,7 +541,7 @@ namespace SizedApparel
{
Graphic sizedGraphic = null;
//Log.Message("4");
string resultPath = SizedApparelsDatabase.GetSupportedApparelSizedPath(new SizedApparelsDatabase.SizedApparelDatabaseKey(rec.graphic.path, apparel?.Wearer?.def.defName, breastHediff.def.defName, apparel.Wearer.gender, apparel?.Wearer?.story?.bodyType?.defName, SizedApparelUtility.BreastSeverityInt(BreastSeverity))).pathWithSizeIndex;
string resultPath = SizedApparelsDatabase.GetSupportedApparelSizedPath(new SizedApparelsDatabase.SizedApparelDatabaseKey(rec.graphic.path, apparel?.Wearer?.def.defName, breastHediff?.def?.defName, apparel.Wearer.gender, apparel?.Wearer?.story?.bodyType?.defName, SizedApparelUtility.BreastSeverityInt(BreastSeverity))).pathWithSizeIndex;
if(resultPath != null)
{
//sizedGraphic = SizedApparelUtility.GetSizedApparelGraphic(rec.graphic, BreastSeverity, apparel?.Wearer?.def.defName, breastHediff.def.defName);
@ -582,7 +583,7 @@ namespace SizedApparel
return;
//comp.ClearAll(false);
//comp.needToCheckApparelGraphicRecords = true;
comp.SetDirty();
comp.SetDirty(false,true,false,false,false); // Check Hediff. If you don't the crotch will not have graphic on first load
}
}
@ -881,6 +882,13 @@ namespace SizedApparel
var comp = __instance.pawn.GetComp<ApparelRecorderComp>();
if (comp == null) // maybe it can be null? but why...? mechanoids?
return;
if (drawClothes)
{
if (comp.hasUnsupportedApparel)
return;
}
Material bodyMat = null;
Material sizedApparelBaseBodyMat = null;
switch (bodyCondition)