Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HarmonyPostfix, HarmonyPatch(typeof(H_Lookat_dan), "setInfo")]
- private static void LateReplaceKokan(H_Lookat_dan __instance, System.Text.StringBuilder ___assetName)
- {
- if (__instance.transLookAtNull == null)
- return;
- lookAtFemale = __instance.transLookAtNull.transform.GetComponentInParent<AIChara.ChaControl>();
- if (lookAtFemale == null)
- {
- Console.WriteLine("Female is null");
- }
- else
- {
- newLookAtTarget = lookAtFemale.GetComponentsInChildren<Transform>().Where(x => x.name.Contains("cervix")).FirstOrDefault();
- Console.WriteLine("newLookAtTarget is " + newLookAtTarget.name);
- }
- if (newLookAtTarget == null)
- {
- Console.WriteLine("Previous is null");
- }
- var fOpen = BepInEx.Paths.PluginPath + "/PVCollider.Exclusions.txt";
- excludedPoses = System.IO.File.ReadAllLines(fOpen).ToList();
- Console.WriteLine("List of excluded poses to retarget penis at:");
- if (excludedPoses != null)
- {
- foreach (var item in excludedPoses)
- Console.WriteLine(item);
- }
- else
- {
- Console.Write(fOpen + " not found");
- }
- poseName = ___assetName.ToString();
- Transform lookatTarget = __instance.transLookAtNull;
- Console.WriteLine(lookatTarget.name);
- if (excludedPoses.Contains(poseName))
- {
- Console.WriteLine("Pose " + poseName + " found in exclusion list, aborting");
- }
- else
- {
- if (lookatTarget.name.Contains("k_f_kokan_00"))
- {
- Console.WriteLine("Target set to " + lookatTarget.name + ". Changing...");
- if (lookAtFemale != null)
- {
- if (newLookAtTarget != null)
- {
- __instance.transLookAtNull = newLookAtTarget;
- __instance.dan_Info.SetTargetTransform(newLookAtTarget);
- Console.WriteLine("New target is " + __instance.transLookAtNull.name);
- }
- else
- {
- Console.WriteLine("Could not find any additional vagina target, leaving as is");
- }
- }
- }
- if (lookatTarget != null)
- {
- PenisOffset = new Vector3(lookatTarget.position.x + _lookAtTargetOffset_x.Value, lookatTarget.position.y + _lookAtTargetOffset_y.Value, lookatTarget.position.z + _lookAtTargetOffset_z.Value);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement