diff --git a/src/LoveMachine.OA/LoveMachine.OA.csproj b/src/LoveMachine.OA/LoveMachine.OA.csproj
index 425c52b..3cc275a 100644
--- a/src/LoveMachine.OA/LoveMachine.OA.csproj
+++ b/src/LoveMachine.OA/LoveMachine.OA.csproj
@@ -1,12 +1,13 @@
- net45
+ net6.0
+ enable
+ enable
+ true
..\bin\LoveMachine.OA\BepInEx\plugins\OA_LoveMachine\
+ none
-
-
-
-
+
\ No newline at end of file
diff --git a/src/LoveMachine.OA/OurApartmentGame.cs b/src/LoveMachine.OA/OurApartmentGame.cs
index 68416c7..23c5bee 100644
--- a/src/LoveMachine.OA/OurApartmentGame.cs
+++ b/src/LoveMachine.OA/OurApartmentGame.cs
@@ -1,76 +1,80 @@
using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
using System.Reflection;
using HarmonyLib;
-using LoveMachine.Core.Game;
using LoveMachine.Core.Common;
+using LoveMachine.Core.Game;
using UnityEngine;
-namespace LoveMachine.OA
+namespace LoveMachine.OA;
+
+internal sealed class OurApartmentGame : GameAdapter
{
- internal sealed class OurApartmentGame : GameAdapter
- {
- private static readonly string[] layerNames =
- { "Base SexSim", "From Behind SexSim", "Couch Missionary SexSim" };
+ private static readonly string[] layerNames =
+ { "Base SexSim", "From Behind SexSim", "Couch Missionary SexSim" };
- private Traverse isSex;
- private Animator naomiAnimator;
- private IEnumerable animationLayers;
+ private Traverse isSex;
+ private Animator naomiAnimator;
+ private IEnumerable animationLayers;
- protected override Dictionary FemaleBoneNames => new Dictionary
- {
- { Bone.Vagina, "cc_pussy_clit" },
- { Bone.LeftBreast, "cc_boob.l" },
- { Bone.RightBreast, "cc_boob.r" },
- { Bone.Mouth, "c_teeth_top.x" },
- { Bone.LeftFoot, "c_toes_thumb1.l" },
- { Bone.RightFoot, "c_toes_thumb1.r" },
- { Bone.LeftHand, "index1.l" },
- { Bone.RightHand, "index1.r" }
- };
+ protected override Dictionary FemaleBoneNames => new Dictionary
+ {
+ { Bone.Vagina, "cc_pussy_clit" },
+ { Bone.LeftBreast, "cc_boob.l" },
+ { Bone.RightBreast, "cc_boob.r" },
+ { Bone.Mouth, "c_teeth_top.x" },
+ { Bone.LeftFoot, "c_toes_thumb1.l" },
+ { Bone.RightFoot, "c_toes_thumb1.r" },
+ { Bone.LeftHand, "index1.l" },
+ { Bone.RightHand, "index1.r" }
+ };
- protected override int HeroineCount => 1; // Just Naomi
+ protected override int HeroineCount => 1; // Just Naomi
- protected override int MaxHeroineCount => 1;
+ protected override int MaxHeroineCount => 1;
- protected override bool IsHardSex => GetPose(0).Contains("Pump2");
+ protected override bool IsHardSex => GetPose(0).Contains("Pump2");
- protected override int AnimationLayer => animationLayers
- .Where(i => naomiAnimator.GetLayerWeight(i) == 1f)
- .DefaultIfEmpty(-1)
- .First();
+ protected override int AnimationLayer => animationLayers
+ .Where(i => naomiAnimator.GetLayerWeight(i) == 1f)
+ .DefaultIfEmpty(-1)
+ .First();
- protected override float PenisSize => 0.2f;
+ protected override float PenisSize => 0.2f;
- protected override MethodInfo[] StartHMethods =>
- new[] { AccessTools.Method("SexSimControl, Assembly-CSharp:InitializeAsync") };
+ protected override MethodInfo[] StartHMethods => new[]
+ {
+ AccessTools.Method("Momoirosoft.Managers.SexSimControl, Assembly-CSharp:InitializeAsync")
+ };
- protected override MethodInfo[] EndHMethods =>
- new[] { AccessTools.Method("SexSimControl, Assembly-CSharp:RunSexConclusion") };
+ protected override MethodInfo[] EndHMethods => new[]
+ {
+ AccessTools.Method("Momoirosoft.Managers.SexSimControl, Assembly-CSharp:RunSexConclusion")
+ };
- protected override Animator GetFemaleAnimator(int girlIndex) => naomiAnimator;
+ protected override Animator GetFemaleAnimator(int girlIndex) => naomiAnimator;
- protected override GameObject GetFemaleRoot(int girlIndex) => null;
+ protected override GameObject GetFemaleRoot(int girlIndex) => null;
- protected override Transform PenisBase =>
- GameObject.Find("cc_balls1.l")?.transform ?? transform;
+ protected override Transform PenisBase =>
+ GameObject.Find("cc_balls1.l")?.transform ?? transform;
- protected override string GetPose(int girlIndex) =>
- naomiAnimator.GetCurrentAnimatorClipInfo(AnimationLayer).FirstOrDefault().clip?.name
- ?? "unknown_pose";
+ protected override string GetPose(int girlIndex) =>
+ naomiAnimator.GetCurrentAnimatorClipInfo(AnimationLayer).FirstOrDefault().clip?.name
+ ?? "unknown_pose";
- protected override bool IsIdle(int girlIndex) => !isSex.Value;
+ protected override bool IsIdle(int girlIndex) => !isSex.Value;
- protected override bool IsOrgasming(int girlIndex) => GetPose(0).Contains("Cum");
-
- protected override IEnumerator UntilReady(object sexSimControl)
+ protected override bool IsOrgasming(int girlIndex) => GetPose(0).Contains("Cum");
+
+ protected override IEnumerator UntilReady(object sexSimControl)
+ {
+ while (naomiAnimator == null)
{
- yield return new WaitWhile(() =>
- (naomiAnimator = GameObject.Find("NaomiRig").GetComponent()) == null);
- isSex = Traverse.Create(sexSimControl).Field("_sexActive");
- animationLayers = Enumerable.Range(0, naomiAnimator.layerCount)
- .Where(i => layerNames.Contains(naomiAnimator.GetLayerName(i)));
+ yield return new WaitForSeconds(1f);
+ naomiAnimator = GameObject.Find("NaomiRig")?.GetComponent();
}
+ isSex = Traverse.Create(sexSimControl).Property("_sexActive");
+ animationLayers = Enumerable.Range(0, naomiAnimator.layerCount)
+ .Where(i => layerNames.Contains(naomiAnimator.GetLayerName(i)));
}
}
\ No newline at end of file
diff --git a/src/LoveMachine.OA/Plugin.cs b/src/LoveMachine.OA/Plugin.cs
index 7352dc9..17d2939 100644
--- a/src/LoveMachine.OA/Plugin.cs
+++ b/src/LoveMachine.OA/Plugin.cs
@@ -2,9 +2,8 @@
using LoveMachine.Core;
using LoveMachine.Core.NonPortable;
-namespace LoveMachine.OA
-{
- [BepInPlugin(Globals.GUID, Globals.PluginName, Globals.Version)]
- internal class Plugin : LoveMachinePlugin
- { }
-}
\ No newline at end of file
+namespace LoveMachine.OA;
+
+[BepInPlugin(Globals.GUID, Globals.PluginName, Globals.Version)]
+internal class Plugin : LoveMachinePlugin
+{ }
\ No newline at end of file
diff --git a/src/LoveMachine.OA/PluginInfo.ini b/src/LoveMachine.OA/PluginInfo.ini
index c136ac6..a0a5f8a 100644
Binary files a/src/LoveMachine.OA/PluginInfo.ini and b/src/LoveMachine.OA/PluginInfo.ini differ