prettier code (me if i was code)
This commit is contained in:
parent
03bdf4a1e0
commit
73c65893e8
|
@ -18,6 +18,9 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.*" IncludeAssets="compile" />
|
||||
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" />
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>./BepInEx/interop/UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>./BepInEx/interop/Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
using HarmonyLib;
|
||||
|
||||
namespace MetalButtplug.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(BeatSequencer), nameof(BeatSequencer.UpdateBeat))]
|
||||
internal class TestPatch {
|
||||
private static void Prefix(BeatStatusProvider beatStatus) {
|
||||
if (beatStatus.BeatFlags.HasFlag(BeatFlags.Quarter)) {
|
||||
Plugin.Log.LogInfo("Quarter beat");
|
||||
}
|
||||
}
|
||||
}
|
19
Patches/UpdateBeat.cs
Normal file
19
Patches/UpdateBeat.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using HarmonyLib;
|
||||
|
||||
namespace MetalButtplug.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(BeatSequencer), nameof(BeatSequencer.UpdateBeat))]
|
||||
internal class UpdateBeatPatch {
|
||||
private static void Prefix(BeatStatusProvider beatStatus) {
|
||||
if (beatStatus.BeatFlags.HasFlag(BeatFlags.Quarter)) {
|
||||
var playerController = UnityEngine.Object.FindObjectOfType<FirstPersonController>();
|
||||
var player = playerController.m_player;
|
||||
var controller = player.ScoreController;
|
||||
|
||||
Plugin.Log.LogInfo(
|
||||
$"Quarter beat, multiplier: {controller.GetCurrentTierIndex()}/{controller.GetNumTiers()} ({1 << controller.GetCurrentTierIndex()}x)"
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,6 +14,6 @@ public class Plugin : BasePlugin {
|
|||
|
||||
Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
|
||||
Log.LogInfo("GAY SEX!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
harmony.PatchAll(typeof(Patches.TestPatch));
|
||||
harmony.PatchAll(typeof(Patches.UpdateBeatPatch));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue