mirror of
https://gitgud.io/ll.mirrors/sizedapparel.git
synced 2024-08-15 00:43:40 +00:00
Mirror of 1.4.17 from Lovers Lab
This commit is contained in:
parent
a5ed05c17b
commit
ac3b77b5ba
210 changed files with 258 additions and 290 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue