Mirror of 1.4.25 from Lovers Lab

This commit is contained in:
ghostclinic3YTB 2023-04-27 16:02:48 -04:00
parent e47a1fc4f0
commit 442ebc1679
767 changed files with 311 additions and 914 deletions

View file

@ -245,8 +245,10 @@ namespace SizedApparel
//Log.Message("SizedApparelforRJW::AlienRacePatch");
Log.Message("[SizedApparel] RimNudeWorld Patching...: RevealingApparel");
harmony.Patch(AccessTools.Method(typeof(RevealingApparel.RevealingApparel), "CanDrawRevealing"),
//harmony.Patch(AccessTools.Method(typeof(RevealingApparel.RevealingApparel), "CanDrawRevealing"),
harmony.Patch(AccessTools.Method(typeof(RevealingApparel.RevealingExtensionEntry), "CanDrawRevealing"),
postfix: new HarmonyMethod(typeof(RevealingApparelPatch), "Postfix"));
//this patch must be failed. RNW has been updated. but I cannot patch it yet.
Log.Message("[SizedApparel] RimNudeWorld Patched: RevealingApparel");
}
else

View file

@ -963,14 +963,22 @@ namespace SizedApparel
Material mat;
//If ForceWriteDepth, draw Cutout mesh for write depth. this is for avoid problem of body addons drawing under other meshes. such as breasts front of body but behind tail.
if (forceWriteZ || (!flags.FlagSet(PawnRenderFlags.Cache) && !isOverlay))// //(!flags.FlagSet(PawnRenderFlags.Cache) && !isOverlay)
if (forceWriteZ)//|| (!flags.FlagSet(PawnRenderFlags.Cache) && !isOverlay) //(!flags.FlagSet(PawnRenderFlags.Cache) && !isOverlay)
{
Graphic Zgraphic = graphic.GetColoredVersion(ShaderDatabase.CutoutComplex, drawColor1, drawColor2); // ShaderDatabase.Cutout
Color c1 = drawColor1;
c1.a = 0;
Color c2 = drawColor2;
c2.a = 0;
Graphic Zgraphic = graphic.GetColoredVersion(ShaderDatabase.CutoutSkin, c1, c2); // ShaderDatabase.Cutout //ShaderDatabase.CutoutComplex
Vector3 drawPositionZ = drawPosition;
drawPositionZ.y = 0; //Send Back of body, but it can still write depth.
//drawPositionZ.y = Mathf.Min(rootLoc.y + 0.008687258f + 0.0014478763f, drawPosition.y) - 0.001f; //Mathf.Min( rootLoc.y , drawPosition.y) - 0.0001f; //Send Back of body, but it can still write depth.
//Rimworld's Pawn Renderer Add 0.008687258f and 0.0014478763f to render naked body
drawPositionZ.y = drawPositionZ.y - 0.0001f; ;//Send Back of body, but it can still write depth.
mat = flags.FlagSet(PawnRenderFlags.Cache) ? Zgraphic.MatAt(targetRot) : (Material)overrideMatMethod.Invoke(pawnRenderer, new object[] { Zgraphic.MatAt(facing), pawn, flags.FlagSet(PawnRenderFlags.Portrait) });
GenDraw.DrawMeshNowOrLater(scaledBodyMesh, drawPositionZ, quaternion, mat, flags.FlagSet(PawnRenderFlags.DrawNow)); // draw for writeZ data to solve shadow issue
//Draw Zero Opacity Mesh for write depth only.
//This is Nessesary for avoid cliping graphics such as BroadshieldPack.
}
//shader must be mask

View file

@ -656,7 +656,7 @@ namespace SizedApparel
listingStandard.Label("SizedApparel System Apply (apparel and body parts)");
listingStandard.CheckboxLabeled(" Apply Humanlikes", ref SizedApparelSettings.ApplyHumanlikes, "Try to Apply SizedApparel to Humanlikes if The textures are valid.\nDefault: true");
listingStandard.CheckboxLabeled(" Apply Animals", ref SizedApparelSettings.ApplyAnimals, "Try to Apply SizedApparel to Animals if The textures are valid.\nDefault: false");
listingStandard.CheckboxLabeled(" Apply Animals", ref SizedApparelSettings.ApplyAnimals, "Try to Apply SizedApparel to Animals if The textures are valid.\nThis may heavy performance \nDefault: false");
//TODO
/*
if (SizedApparelSettings.ApplyAnimals)

View file

@ -295,11 +295,11 @@ namespace SizedApparel
if (key.customPose != null && graphic == null)
{
customPose = false;
graphic = SizedApparelUtility.GetSizedApparelGraphic(sourceGraphic, SizedApparelUtility.BreastSizeIndexToSeverity(key.targetSize), out indexOut, out currentSeverityOut, out flag, out hediffResult , targetRaceName, key.hediffName , null ,key.gender);
graphic = SizedApparelUtility.GetSizedApparelGraphic(sourceGraphic, SizedApparelUtility.BreastSizeIndexToSeverity(key.targetSize), out indexOut, out currentSeverityOut, out flag, out hediffResult , targetRaceName, key.hediffName , null ,key.gender);//Search No Custom Pose
if (graphic == null && key.gender != Gender.None)
{
//try Genderless
graphic = SizedApparelUtility.GetSizedApparelGraphic(sourceGraphic, SizedApparelUtility.BreastSizeIndexToSeverity(key.targetSize), out indexOut, out currentSeverityOut, out flag, out hediffResult, targetRaceName, key.hediffName, null, Gender.None);//key.customPose
graphic = SizedApparelUtility.GetSizedApparelGraphic(sourceGraphic, SizedApparelUtility.BreastSizeIndexToSeverity(key.targetSize), out indexOut, out currentSeverityOut, out flag, out hediffResult, targetRaceName, key.hediffName, null, Gender.None);//Search No Custom Pose
}
}
@ -357,7 +357,7 @@ namespace SizedApparel
if (SupportedBodyPartResultPath.ContainsKey(key))
return SupportedBodyPartResultPath.TryGetValue(key);
int currentSize = -1;
string hediffResult;
string hediffResult = null;
Graphic graphic = null;
//Find Points from result's path
@ -426,7 +426,7 @@ namespace SizedApparel
//HumanLike Search
AlienRaceSetting raceSetting;
raceSetting = SizedApparelSettings.alienRaceSettings.FirstOrDefault((AlienRaceSetting s) => s.raceName == key.raceName);
if (raceSetting !=null && key.raceName == "Human" || !raceSetting.asHuman) //old: !SizedApparelSettings.UnsupportedRaceToUseHumanlike
if (raceSetting !=null && (key.raceName == "Human" || !raceSetting.asHuman)) //old: !SizedApparelSettings.UnsupportedRaceToUseHumanlike
{
//Cannot find Any result
result = new PathAndSize(null, -1);