-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from Sauceke/hc
[HC] Add HoneyCome
- Loading branch information
Showing
6 changed files
with
173 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<int> loopType; | ||
private Traverse<bool> nowOrgasm; | ||
|
||
private Traverse AnimationInfo => ctrlFlag.Property("NowAnimationInfo"); | ||
|
||
private int AnimationId => AnimationInfo.Property<int>("ID").Value; | ||
|
||
private string AnimationName => AnimationInfo.Property<string>("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<Bone, string> FemaleBoneNames => new Dictionary<Bone, string> | ||
{ | ||
{ 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<Animator>(); | ||
|
||
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<int>("LoopType"); | ||
nowOrgasm = ctrlFlag.Property<bool>("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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
<OutputPath>..\bin\LoveMachine.HC\BepInEx\plugins\HC_LoveMachine\</OutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\LoveMachine.Core.IL2CPP\LoveMachine.Core.IL2CPP.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\0Harmony.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx.Core"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx.Unity.Common"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Unity.Common.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx.Unity.IL2CPP"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\BepInEx.Unity.IL2CPP.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2CppInterop.Common"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Common.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2CppInterop.Generator"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Generator.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2CppInterop.HarmonySupport"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.HarmonySupport.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2CppInterop.Runtime"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\Il2CppInterop.Runtime.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Il2Cppmscorlib"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\Il2Cppmscorlib.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AnimationModule"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.AnimationModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.CoreModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.IMGUIModule"> | ||
<HintPath>..\LoveMachine.Core.IL2CPP\Lib\UnityEngine.IMGUIModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<HoneyComeGame> | ||
{ } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters