From d20ab4d74463c883158f8a0d21a9735ad3d10ac9 Mon Sep 17 00:00:00 2001 From: Sauceke Date: Thu, 31 Aug 2023 22:04:30 +0300 Subject: [PATCH 1/3] [HC] Add HoneyCome --- src/LoveMachine.HC/HoneyComeGame.cs | 90 +++++++++++++++++++++++ src/LoveMachine.HC/LoveMachine.HC.csproj | 62 ++++++++++++++++ src/LoveMachine.HC/Plugin.cs | 9 +++ src/LoveMachine.HC/PluginInfo.ini | Bin 0 -> 396 bytes src/LoveMachine.sln | 10 +++ 5 files changed, 171 insertions(+) create mode 100644 src/LoveMachine.HC/HoneyComeGame.cs create mode 100644 src/LoveMachine.HC/LoveMachine.HC.csproj create mode 100644 src/LoveMachine.HC/Plugin.cs create mode 100644 src/LoveMachine.HC/PluginInfo.ini diff --git a/src/LoveMachine.HC/HoneyComeGame.cs b/src/LoveMachine.HC/HoneyComeGame.cs new file mode 100644 index 0000000..997d9b5 --- /dev/null +++ b/src/LoveMachine.HC/HoneyComeGame.cs @@ -0,0 +1,90 @@ +using System.Collections; +using System.Reflection; +using HarmonyLib; +using LoveMachine.Core.Common; +using LoveMachine.Core.Game; +using UnityEngine; + +namespace LoveMachine.HC; + +public class HoneyComeGame: GameAdapter +{ + private Traverse ctrlFlag; + private GameObject[] females; + private Transform[] penises; + private Traverse loopType; + private Traverse nowOrgasm; + + private Traverse AnimationInfo => ctrlFlag.Property("NowAnimationInfo"); + + private int AnimationId => AnimationInfo.Property("ID").Value; + + private string AnimationName => AnimationInfo.Property("NameAnimation").Value; + + protected override MethodInfo[] StartHMethods => + new[] { AccessTools.Method("H.HScene, Assembly-CSharp:Start") }; + + protected override MethodInfo[] EndHMethods => + new[] { AccessTools.Method("H.HScene, Assembly-CSharp:OnDestroy") }; + + protected override Dictionary FemaleBoneNames => new Dictionary + { + { Bone.LeftBreast, "k_f_munenipL_00" }, + { Bone.RightBreast, "k_f_munenipR_00" }, + { Bone.Vagina, "cf_n_pee" }, + { Bone.Anus, "k_f_ana_00" }, + { Bone.LeftButt, "k_f_siriL_00" }, + { Bone.RightButt, "k_f_siriR_00" }, + { Bone.Mouth, "cf_J_MouthCavity" }, + { Bone.LeftHand, "cf_j_index03_L" }, + { Bone.RightHand, "cf_j_index03_R" }, + { Bone.LeftFoot, "k_f_toeL_00" }, + { Bone.RightFoot, "k_f_toeR_00" }, + }; + + protected override Transform PenisBase => throw new NotImplementedException(); + + protected override Transform[] PenisBases => penises; + + protected override int AnimationLayer => 0; + + protected override int HeroineCount => females.Length; + + protected override int MaxHeroineCount => 2; + + protected override bool IsHardSex => false; + + protected override Animator GetFemaleAnimator(int girlIndex) => + females[girlIndex].GetComponent(); + + protected override GameObject GetFemaleRoot(int girlIndex) => females[girlIndex]; + + protected override string GetPose(int girlIndex) => + $"{AnimationName}.{AnimationId}.{GetAnimatorStateInfo(girlIndex).fullPathHash}"; + + protected override bool IsIdle(int girlIndex) => loopType.Value == -1; + + protected override bool IsOrgasming(int girlIndex) => nowOrgasm.Value; + + protected override void SetStartHInstance(object hscene) + { + ctrlFlag = Traverse.Create(hscene).Property("CtrlFlag"); + loopType = ctrlFlag.Property("LoopType"); + nowOrgasm = ctrlFlag.Property("NowOrgasm"); + } + + protected override IEnumerator UntilReady() + { + yield return new WaitForSeconds(10f); + females = new[] { "chaF_00", "chaF_01" } + .Select(GameObject.Find) + .Where(go => go != null && go.active) + .Select(chara => chara.transform.Find("BodyTop/p_cf_jm_body_bone_00").gameObject) + .ToArray(); + penises = new[] { "chaM_00", "chaM_01" } + .Select(GameObject.Find) + .Where(go => go != null && go.active) + .Select(chara => FindDeepChildrenByName(chara, "k_f_tamaC_00").First()) + .ToArray(); + } +} \ No newline at end of file diff --git a/src/LoveMachine.HC/LoveMachine.HC.csproj b/src/LoveMachine.HC/LoveMachine.HC.csproj new file mode 100644 index 0000000..9630cf0 --- /dev/null +++ b/src/LoveMachine.HC/LoveMachine.HC.csproj @@ -0,0 +1,62 @@ + + + net6.0 + enable + enable + true + ..\bin\LoveMachine.HC\BepInEx\plugins\HC_LoveMachine\ + + + + + + + ..\LoveMachine.Core.IL2CPP\Lib\0Harmony.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Core.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Unity.Common.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Unity.IL2CPP.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Common.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Generator.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.HarmonySupport.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Runtime.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\Il2Cppmscorlib.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.AnimationModule.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.CoreModule.dll + False + + + ..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.IMGUIModule.dll + False + + + \ No newline at end of file diff --git a/src/LoveMachine.HC/Plugin.cs b/src/LoveMachine.HC/Plugin.cs new file mode 100644 index 0000000..ce89816 --- /dev/null +++ b/src/LoveMachine.HC/Plugin.cs @@ -0,0 +1,9 @@ +using BepInEx; +using LoveMachine.Core; +using LoveMachine.Core.PlatformSpecific; + +namespace LoveMachine.HC; + +[BepInPlugin(Globals.GUID, Globals.PluginName, Globals.Version)] +internal class Plugin : LoveMachinePlugin +{ } \ No newline at end of file diff --git a/src/LoveMachine.HC/PluginInfo.ini b/src/LoveMachine.HC/PluginInfo.ini new file mode 100644 index 0000000000000000000000000000000000000000..0b57124de9806527773cbc82e7b209da1332aaf9 GIT binary patch literal 396 zcmZvY&n^Q|6o_l9Y+RL;pvNe8)z6wCS?LATpW$15RZEk;`l}cE*|c zd8E2*k$5&)XN^m9=e#nt;tdt|%y`o3&^PxwG9x38`htFoJ#XKfK)uV%V=QQ`xMQo; z+*k6Md?epVh^D+W`U^8F7A*Bl8*;{jeN{Yr+Ppc_cC1}U+&TS{TTWudTDf%2o*TGO kx3IG-XC8QR?V)z5=l?Ei#Z|AhTG&_Eb{aLp{)$-r4}~v1T>t<8 literal 0 HcmV?d00001 diff --git a/src/LoveMachine.sln b/src/LoveMachine.sln index 37b8ab3..006b55b 100644 --- a/src/LoveMachine.sln +++ b/src/LoveMachine.sln @@ -56,6 +56,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoveMachine.AI", "LoveMachi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoveMachine.HS", "LoveMachine.HS\LoveMachine.HS.csproj", "{356DC42A-82EF-4D66-930E-F092ED3E7590}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoveMachine.HC", "LoveMachine.HC\LoveMachine.HC.csproj", "{5502A264-E13A-40AE-9476-46FB8413BBAD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -224,6 +226,13 @@ Global {356DC42A-82EF-4D66-930E-F092ED3E7590}.Release-net6|Any CPU.ActiveCfg = Release|Any CPU {356DC42A-82EF-4D66-930E-F092ED3E7590}.Release-netfx3|Any CPU.ActiveCfg = Release|Any CPU {356DC42A-82EF-4D66-930E-F092ED3E7590}.Release-netfx3|Any CPU.Build.0 = Release|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Release|Any CPU.Build.0 = Release|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Release-netfx3|Any CPU.ActiveCfg = Debug|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Release-net6|Any CPU.ActiveCfg = Release|Any CPU + {5502A264-E13A-40AE-9476-46FB8413BBAD}.Release-net6|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -251,6 +260,7 @@ Global {8032C929-0C88-4E91-A11D-B8B32ED0658D} = {C9AD8132-2D49-41BF-8AFB-E7AE8870880C} {DAB043BB-2B90-4226-B41F-28C590F343D2} = {C9AD8132-2D49-41BF-8AFB-E7AE8870880C} {356DC42A-82EF-4D66-930E-F092ED3E7590} = {C9AD8132-2D49-41BF-8AFB-E7AE8870880C} + {5502A264-E13A-40AE-9476-46FB8413BBAD} = {C9AD8132-2D49-41BF-8AFB-E7AE8870880C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {446d456d-8d87-438a-9dac-1b76093e0305} From 3d1ac4313eb1ae1d13b6dfbb0be7bd46ee2d7e6a Mon Sep 17 00:00:00 2001 From: Sauceke Date: Thu, 31 Aug 2023 22:07:16 +0300 Subject: [PATCH 2/3] [CI] Update bepinex il2cpp-be version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a84fd2..11c96c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: INNO_SETUP_URL: https://web.archive.org/web/20220519201547if_/https://files.jrsoftware.org/is/6/innosetup-6.2.1.exe BEPINEX_32_URL: https://github.com/BepInEx/BepInEx/releases/download/v5.4.18/BepInEx_x86_5.4.18.0.zip BEPINEX_64_URL: https://github.com/BepInEx/BepInEx/releases/download/v5.4.18/BepInEx_x64_5.4.18.0.zip - BEPINEX_IL2CPP_64_URL: https://builds.bepinex.dev/projects/bepinex_be/660/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.660%2B40bf261.zip + BEPINEX_IL2CPP_64_URL: https://builds.bepinex.dev/projects/bepinex_be/673/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.673%2B06a7278.zip BEPINEX_CONF_MGR_URL: https://github.com/BepInEx/BepInEx.ConfigurationManager/releases/download/v16.4/BepInEx.ConfigurationManager_v16.4.zip defaults: From 0997b08bf33bb51b00bb19fcf9d8e46112d07fc5 Mon Sep 17 00:00:00 2001 From: Sauceke Date: Thu, 31 Aug 2023 22:19:59 +0300 Subject: [PATCH 3/3] thanks for nothing webarchive --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11c96c6..4df72cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true - INNO_SETUP_URL: https://web.archive.org/web/20220519201547if_/https://files.jrsoftware.org/is/6/innosetup-6.2.1.exe + INNO_SETUP_URL: https://files.jrsoftware.org/is/6/innosetup-6.2.1.exe BEPINEX_32_URL: https://github.com/BepInEx/BepInEx/releases/download/v5.4.18/BepInEx_x86_5.4.18.0.zip BEPINEX_64_URL: https://github.com/BepInEx/BepInEx/releases/download/v5.4.18/BepInEx_x64_5.4.18.0.zip BEPINEX_IL2CPP_64_URL: https://builds.bepinex.dev/projects/bepinex_be/673/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.673%2B06a7278.zip