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

@ -55,7 +55,16 @@ namespace SizedApparel
}
[StaticConstructorOnStartup]
[HarmonyPatch(typeof(Pawn_AgeTracker), "PostResolveLifeStageChange")]
public class PawnAgeTrackerPatch
{
public static void Postfix(Pawn ___pawn)
{
var comp = ___pawn.GetComp<ApparelRecorderComp>();
comp.SetDirty(false,false,false,true,true);//Apparel and Hediff will be changed with other reason. just set skeleton dirty.
}
}
@ -670,6 +679,7 @@ namespace SizedApparel
}
}
//RimWorld 1.3
//WIPWIPWIP TODO
[HarmonyPatch(typeof(PawnRenderer), "BaseHeadOffsetAt")]
public class BaseHeadOffsetAtPatch
{
@ -680,8 +690,8 @@ namespace SizedApparel
return;
if (apparelRecorder.customPose != null)
{
var item = apparelRecorder.currentCustomPose.headOffset.FirstOrDefault(b => b.bodyType == ___pawn.story.bodyType.label);
__result += item.offsets.GetOffset(rotation);
//var item = apparelRecorder.currentCustomPose.headOffset.FirstOrDefault(b => b.bodyType == ___pawn.story.bodyType.label);
//__result += item.offsets.GetOffset(rotation);
}
}
}
@ -862,7 +872,13 @@ namespace SizedApparel
if (__result.NullOrEmpty())
return;
if (!SizedApparelUtility.CanApplySizedApparel(__instance.pawn))
return;
var comp = __instance.pawn.GetComp<ApparelRecorderComp>();
if (comp == null) // maybe it can be null? but why...? mechanoids?
return;
Material bodyMat = null;
Material sizedApparelBaseBodyMat = null;
switch (bodyCondition)